Skip to content

Commit bf0025c

Browse files
Replace android-apt with annotationProcessor
1 parent f1d6eb4 commit bf0025c

2 files changed

Lines changed: 28 additions & 34 deletions

File tree

EventBusPerformance/build.gradle

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,37 @@ buildscript {
55

66
dependencies {
77
classpath 'com.android.tools.build:gradle:2.2.3'
8-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
98
}
109
}
1110

1211
apply plugin: 'com.android.application'
13-
apply plugin: 'com.neenbedankt.android-apt'
1412

1513
repositories {
1614
jcenter()
1715
}
1816

19-
dependencies {
20-
compile project(':EventBus')
21-
apt project(':EventBusAnnotationProcessor')
22-
compile 'com.squareup:otto:1.3.8'
23-
}
24-
25-
apt {
26-
arguments {
27-
eventBusIndex "org.greenrobot.eventbusperf.MyEventBusIndex"
28-
}
29-
}
30-
3117
android {
3218
buildToolsVersion '25.0.2' // When updating, don't forget to adjust .travis.yml
3319
compileSdkVersion 19
3420

21+
defaultConfig {
22+
javaCompileOptions {
23+
annotationProcessorOptions {
24+
arguments = [eventBusIndex: "org.greenrobot.eventbusperf.MyEventBusIndex"]
25+
}
26+
}
27+
}
3528
sourceSets {
3629
main {
3730
manifest.srcFile 'AndroidManifest.xml'
3831
java.srcDirs = ['src']
3932
res.srcDirs = ['res']
4033
}
4134
}
35+
}
4236

37+
dependencies {
38+
compile project(':EventBus')
39+
annotationProcessor project(':EventBusAnnotationProcessor')
40+
compile 'com.squareup:otto:1.3.8'
4341
}

EventBusTest/build.gradle

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ buildscript {
55

66
dependencies {
77
classpath 'com.android.tools.build:gradle:2.2.3'
8-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
98
}
109
}
1110

1211
apply plugin: 'com.android.application'
13-
apply plugin: 'com.neenbedankt.android-apt'
1412

1513
repositories {
1614
jcenter()
1715
}
1816

19-
dependencies {
20-
androidTestApt project(':EventBusAnnotationProcessor')
21-
androidTestCompile project(':EventBus')
22-
compile fileTree(dir: 'libs', include: '*.jar')
23-
androidTestCompile 'com.android.support.test:runner:0.4.1'
24-
androidTestCompile 'com.android.support.test:rules:0.4.1'
25-
}
26-
2717
android {
2818
buildToolsVersion '25.0.2' // When updating, don't forget to adjust .travis.yml
2919
compileSdkVersion 19
3020

21+
defaultConfig {
22+
testApplicationId "de.greenrobot.event.test"
23+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
24+
javaCompileOptions {
25+
annotationProcessorOptions {
26+
arguments = [eventBusIndex: "org.greenrobot.eventbus.EventBusTestsIndex"]
27+
}
28+
}
29+
}
30+
3131
sourceSets {
3232
main {
3333
manifest.srcFile 'AndroidManifest.xml'
@@ -37,16 +37,12 @@ android {
3737
java.srcDirs = ['src']
3838
}
3939
}
40-
41-
defaultConfig {
42-
testApplicationId "de.greenrobot.event.test"
43-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
44-
}
4540
}
4641

47-
apt {
48-
arguments {
49-
eventBusIndex "org.greenrobot.eventbus.EventBusTestsIndex"
50-
}
42+
dependencies {
43+
androidTestAnnotationProcessor project(':EventBusAnnotationProcessor')
44+
androidTestCompile project(':EventBus')
45+
compile fileTree(dir: 'libs', include: '*.jar')
46+
androidTestCompile 'com.android.support.test:runner:0.4.1'
47+
androidTestCompile 'com.android.support.test:rules:0.4.1'
5148
}
52-

0 commit comments

Comments
 (0)