Skip to content

Commit 93b3f75

Browse files
Replace android-apt with annotationProcessor
1 parent 41b673a commit 93b3f75

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

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,31 +5,31 @@ 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
sourceCompatibility = 1.7
1614

1715
repositories {
1816
jcenter()
1917
}
2018

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

23+
defaultConfig {
24+
testApplicationId "de.greenrobot.event.test"
25+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
26+
javaCompileOptions {
27+
annotationProcessorOptions {
28+
arguments = [eventBusIndex: "org.greenrobot.eventbus.EventBusTestsIndex"]
29+
}
30+
}
31+
}
32+
3333
compileOptions {
3434
sourceCompatibility = JavaVersion.VERSION_1_7
3535
targetCompatibility = JavaVersion.VERSION_1_7
@@ -44,16 +44,12 @@ android {
4444
java.srcDirs = ['src']
4545
}
4646
}
47-
48-
defaultConfig {
49-
testApplicationId "de.greenrobot.event.test"
50-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
51-
}
5247
}
5348

54-
apt {
55-
arguments {
56-
eventBusIndex "org.greenrobot.eventbus.EventBusTestsIndex"
57-
}
49+
dependencies {
50+
androidTestAnnotationProcessor project(':EventBusAnnotationProcessor')
51+
androidTestCompile project(':EventBus')
52+
compile fileTree(dir: 'libs', include: '*.jar')
53+
androidTestCompile 'com.android.support.test:runner:0.4.1'
54+
androidTestCompile 'com.android.support.test:rules:0.4.1'
5855
}
59-

0 commit comments

Comments
 (0)