From c737d46d904b40a12dac037136a614d277ec765b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 8 Mar 2019 14:17:45 +0100 Subject: [PATCH] android: update gradle plugin version --- android/app/build.gradle | 17 +++++++---------- android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- android/sdk/build.gradle | 18 +++++++++++------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7adabb88e..9a1fd085f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -115,16 +115,13 @@ gradle.projectsEvaluated { android.applicationVariants.all { variant -> variant.outputs.each { output -> output.processManifest.doLast { - def f = new File(manifestOutputDirectory, 'AndroidManifest.xml') - if (!f.isFile()) { - f = new File(new File(manifestOutputDirectory, output.dirName), 'AndroidManifest.xml') - } - if (f.exists()) { - def charset = 'UTF-8' - def s = f.getText(charset) - s = s.replace('', "${dropboxActivity}") - f.write(s, charset) - } + def outputDir = manifestOutputDirectory.get().asFile + def manifestPath = new File(outputDir, 'AndroidManifest.xml') + def charset = 'UTF-8' + def text + text = manifestPath.getText(charset) + text = text.replace('', "${dropboxActivity}") + manifestPath.write(text, charset) } } } diff --git a/android/build.gradle b/android/build.gradle index cc2d4850a..f05a3c996 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,7 +12,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.google.gms:google-services:4.2.0' classpath 'io.fabric.tools:gradle:1.27.0' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 29f01aa3c..ffb3f8225 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Dec 19 12:02:47 CET 2018 +#Fri Mar 08 13:36:51 CET 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index c0b90fac0..6203f4634 100644 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -107,13 +107,17 @@ android.libraryVariants.all { def variant -> currentBundleTask.ext.generatedResFolders = files(resourcesDir).builtBy(currentBundleTask) currentBundleTask.ext.generatedAssetsFolders = files(jsBundleDir).builtBy(currentBundleTask) - variant.registerGeneratedResFolders(currentBundleTask.generatedResFolders) - variant.mergeResources.dependsOn(currentBundleTask) - def assetsDir = variant.mergeAssets.outputDir + def mergeAssetsTask = variant.mergeAssetsProvider.get() + def mergeResourcesTask = variant.mergeResourcesProvider.get() + + mergeAssetsTask.dependsOn(currentBundleTask) + mergeResourcesTask.dependsOn(currentBundleTask) + + mergeAssetsTask.doLast { + def assetsDir = mergeAssetsTask.outputDir - variant.mergeAssets.doLast { // Bundle fonts // copy { @@ -139,19 +143,19 @@ android.libraryVariants.all { def variant -> // if (currentBundleTask.enabled) { copy { - from(jsBundleDir) + from(jsBundleFile) into(assetsDir) } } } - variant.mergeResources.doLast { + mergeResourcesTask.doLast { // Copy React resources // if (currentBundleTask.enabled) { copy { from(resourcesDir) - into(variant.mergeResources.outputDir) + into(mergeResourcesTask.outputDir) } } }