Skip to content

Commit

Permalink
Replace android-apt with annotationProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
friederbluemle committed Mar 23, 2017
1 parent 298e6d2 commit 2ffa42e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 34 deletions.
26 changes: 12 additions & 14 deletions EventBusPerformance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,37 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

repositories {
jcenter()
}

dependencies {
compile project(':EventBus')
apt project(':EventBusAnnotationProcessor')
compile 'com.squareup:otto:1.3.8'
}

apt {
arguments {
eventBusIndex "org.greenrobot.eventbusperf.MyEventBusIndex"
}
}

android {
buildToolsVersion '25.0.2' // When updating, don't forget to adjust .travis.yml
compileSdkVersion 19

defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: "org.greenrobot.eventbusperf.MyEventBusIndex"]
}
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}

dependencies {
compile project(':EventBus')
annotationProcessor project(':EventBusAnnotationProcessor')
compile 'com.squareup:otto:1.3.8'
}
36 changes: 16 additions & 20 deletions EventBusTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

repositories {
jcenter()
}

dependencies {
androidTestApt project(':EventBusAnnotationProcessor')
androidTestCompile project(':EventBus')
compile fileTree(dir: 'libs', include: '*.jar')
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4.1'
}

android {
buildToolsVersion '25.0.2' // When updating, don't forget to adjust .travis.yml
compileSdkVersion 19

defaultConfig {
testApplicationId "de.greenrobot.event.test"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: "org.greenrobot.eventbus.EventBusTestsIndex"]
}
}
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand All @@ -37,16 +37,12 @@ android {
java.srcDirs = ['src']
}
}

defaultConfig {
testApplicationId "de.greenrobot.event.test"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}

apt {
arguments {
eventBusIndex "org.greenrobot.eventbus.EventBusTestsIndex"
}
dependencies {
androidTestAnnotationProcessor project(':EventBusAnnotationProcessor')
androidTestCompile project(':EventBus')
compile fileTree(dir: 'libs', include: '*.jar')
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4.1'
}

0 comments on commit 2ffa42e

Please sign in to comment.