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 to Android Studio 3.0 #302

Merged
merged 2 commits into from
Nov 6, 2017
Merged
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
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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@friederbluemle if @dariuszseweryn is right, maybe temporary changing to classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.3.0-SNAPSHOT' would fix groovy compilation errors

Copy link

@friederbluemle friederbluemle Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, you could definitely give it a try! Ultimately it's up to you and the maintainers of RxAndroidBle if a snapshot dependency on the master branch is acceptable.
If the update does fix the issue and this is the only problem, maybe we could nudge groovy-android-gradle-plugin to release an official new version soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it locally. However, the test did not pass. I think that the change has not been uploaded in the snapshot yet.

http://oss.jfrog.org/oss-snapshot-local/org/codehaus/groovy/groovy-android-gradle-plugin/

1.3.0-SNAPSHOT/ 07-Jun-2017 17:25

}
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ./gradlew wrapper --gradle-version 4.1 --distribution-type all to upgrade gradle. You did not update the gradle-wrapper.jar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.3 is available, why have you picked 4.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed the latest version. to correct.

distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, can you squash the commits please @mapyo?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will use Squash and merge option when merging

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