From fa6e296e962abfc2cfaddf7339ddff6c25d444d9 Mon Sep 17 00:00:00 2001 From: jasta Date: Sun, 17 Mar 2019 22:25:03 -0700 Subject: [PATCH 1/2] Fix Stetho fatjar after gradle upgrade afterEvaluate and configurations.compile are no longer valid in the same context and needed to be updated to go back to more traditional Gradle DSL features. --- stetho/build.gradle | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/stetho/build.gradle b/stetho/build.gradle index 92c79fb4..329ea9d8 100644 --- a/stetho/build.gradle +++ b/stetho/build.gradle @@ -36,18 +36,17 @@ android.libraryVariants.all { variant -> // Ugly kludge to rename license files in the bundled commons-cli // dependency so that they do not appear to describe Stetho's license. - afterEvaluate { - configurations.compile.each { - if (it.getName() == 'commons-cli-1.2.jar') { - def depJarPath = it.getPath() - task "tidyCommonsCli${name}"(type: Copy) { - from zipTree(depJarPath) - into "build/commons-cli-tidy-${name}" - rename 'LICENSE', 'commons-cli-LICENSE' - rename 'NOTICE', 'commons-cli-NOTICE' - } + task "tidyCommonsCli${name}"(type: Copy) { + from { + variant.javaCompile.classpath.findAll { + it.getName() == 'commons-cli-1.2.jar' + }.collect { + zipTree(it) } } + into "build/commons-cli-tidy-${name}" + rename 'LICENSE', 'commons-cli-LICENSE' + rename 'NOTICE', 'commons-cli-NOTICE' } task "metainf${name}"(type: Copy) { @@ -60,6 +59,6 @@ android.libraryVariants.all { variant -> from variant.javaCompile.destinationDir from "build/commons-cli-tidy-${name}" from "build/metainf-${name}" - exclude 'android/support/**/*' + exclude "android/support/**/*" } } From 2d16ec224b6b95db8198e398ef6ef6d2e2f7f5ca Mon Sep 17 00:00:00 2001 From: jasta Date: Sun, 17 Mar 2019 22:55:55 -0700 Subject: [PATCH 2/2] Fix travis CI issue with SDK manager and license acceptance Using recommended workaround from: https://github.com/travis-ci/travis-ci/issues/8874 --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8711de7f..31063d7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ jdk: - oraclejdk8 before_install: - - mkdir "$ANDROID_HOME/licenses" || true - - echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license" + - yes | sdkmanager "platforms;android-27" android: components: