diff --git a/.gitignore b/.gitignore index 36c5498b..2efc5853 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ release/ # Gradle files .gradle/ build/ -gradle.properties # Local configuration file (sdk path, etc) local.properties diff --git a/.travis.yml b/.travis.yml index 5f3aa2fd..86f5aee5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,15 @@ -sudo: false language: android -jdk: - - oraclejdk7 +jdk: oraclejdk8 # http://docs.travis-ci.com/user/languages/android/ android: components: - tools - - build-tools-23.0.2 - - android-10 + - build-tools-25.0.2 + - android-25 - extra-android-m2repository before_script: - - chmod +x gradlew # - echo no | android create avd --force -n test -t android-10 --abi armeabi # - emulator -avd test -no-skin -no-audio -no-window & # - android-wait-for-emulator diff --git a/EventBusPerformance/build.gradle b/EventBusPerformance/build.gradle index 53180e6e..3a5eb0a4 100644 --- a/EventBusPerformance/build.gradle +++ b/EventBusPerformance/build.gradle @@ -4,34 +4,27 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.2.1' - classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' + classpath 'com.android.tools.build:gradle:2.3.0' } } 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 '23.0.2' // When updating, don't forget to adjust .travis.yml + 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' @@ -39,5 +32,10 @@ android { res.srcDirs = ['res'] } } +} +dependencies { + compile project(':EventBus') + annotationProcessor project(':EventBusAnnotationProcessor') + compile 'com.squareup:otto:1.3.8' } diff --git a/EventBusTest/build.gradle b/EventBusTest/build.gradle index a1d04468..3dcd5cf6 100644 --- a/EventBusTest/build.gradle +++ b/EventBusTest/build.gradle @@ -4,35 +4,28 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.2.1' - classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' + classpath 'com.android.tools.build:gradle:2.3.0' } } apply plugin: 'com.android.application' -apply plugin: 'com.neenbedankt.android-apt' - -sourceCompatibility = 1.7 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 '23.0.2' // When updating, don't forget to adjust .travis.yml + buildToolsVersion '25.0.2' // When updating, don't forget to adjust .travis.yml compileSdkVersion 19 - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 + defaultConfig { + testApplicationId "de.greenrobot.event.test" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + javaCompileOptions { + annotationProcessorOptions { + arguments = [eventBusIndex: "org.greenrobot.eventbus.EventBusTestsIndex"] + } + } } sourceSets { @@ -44,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' } - diff --git a/build.gradle b/build.gradle index 9c519b5c..b3578a85 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,3 @@ if (JavaVersion.current().isJava8Compatible()) { } } } - -task wrapper(type: Wrapper) { - gradleVersion = '2.14.1' -} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..aac7c9b4 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,17 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d3b83982..e6ac7294 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4fde35c7..0245410a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jul 12 16:09:12 SGT 2016 +#Thu Mar 23 16:17:13 SGT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip diff --git a/gradlew b/gradlew index 27309d92..4453ccea 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save ( ) { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f6d5974e..e95643d6 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -49,7 +49,6 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line