Skip to content

Commit

Permalink
Update to Android Studio 3.0/Gradle 3.0.0 (#302)
Browse files Browse the repository at this point in the history
* Update to Android Studio/Gradle 3.0
* Workaround for Groovy code compilation due to (groovy/groovy-android-gradle-plugin#156)
  • Loading branch information
mapyo authored and uKL committed Nov 6, 2017
1 parent 4e3d6fc commit cc6e24e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: android
android:
components:
- tools
- build-tools-25.0.3
- build-tools-26.0.2
- android-25
- extra-android-m2repository
licenses:
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ apply from: 'checkstyle.gradle'

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.2.0'
}
Expand Down
1 change: 0 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ext {
supportVersion = '25.3.1'
buildToolsVersionVariable = "25.0.3"
rxJavaVersion = '1.3.1'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Apr 14 14:13:27 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
1 change: 0 additions & 1 deletion mockrxandroidble/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

android {
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildToolsVersionVariable

defaultConfig {
minSdkVersion 18
Expand Down
15 changes: 14 additions & 1 deletion rxandroidble/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

android {
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildToolsVersionVariable

defaultConfig {
minSdkVersion 18
Expand Down Expand Up @@ -43,6 +42,20 @@ android {
preBuild.dependsOn 'checkstyle'
}

// Workaround until groovy-android-gradle-plugin 1.3.0 is released
tasks.whenTaskAdded { task ->
if (task.name.contains('UnitTestGroovyWithGroovyc')) {
task.doFirst {
['debug','release'].each {
def dir = file("build/generated/source/apt/test/$it")
if(!dir.isDirectory()){
dir.mkdirs()
}
}
}
}
}

dependencies {
compile rootProject.ext.libs.rxjava
compile rootProject.ext.libs.rxrelay
Expand Down
1 change: 0 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ repositories {

android {
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildToolsVersionVariable

defaultConfig {
applicationId "com.polidea.rxandroidble.sample"
Expand Down

0 comments on commit cc6e24e

Please sign in to comment.