Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Android build dependencies #400

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ release/
# Gradle files
.gradle/
build/
gradle.properties

# Local configuration file (sdk path, etc)
local.properties
Expand Down
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 14 additions & 16 deletions EventBusPerformance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,38 @@ 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'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}

dependencies {
compile project(':EventBus')
annotationProcessor project(':EventBusAnnotationProcessor')
compile 'com.squareup:otto:1.3.8'
}
43 changes: 16 additions & 27 deletions EventBusTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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'
}

4 changes: 0 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ if (JavaVersion.current().isJava8Compatible()) {
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
22 changes: 15 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -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" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down