From 30897130f6213406f5321eb286d94d89e2b3265f Mon Sep 17 00:00:00 2001 From: maxli Date: Mon, 26 Sep 2022 17:02:47 +0800 Subject: [PATCH] refactor(android): update gradle to 7.3.0 --- build.gradle | 14 +------ framework/android/build.gradle | 19 --------- framework/examples/android-demo/build.gradle | 41 ++++---------------- gradle.properties | 1 - gradle/wrapper/gradle-wrapper.properties | 2 +- modules/android/hippy_support/build.gradle | 19 --------- modules/android/link_supplier/build.gradle | 19 --------- modules/android/serialization/build.gradle | 19 --------- renderer/native/android/build.gradle | 19 --------- 9 files changed, 10 insertions(+), 143 deletions(-) diff --git a/build.gradle b/build.gradle index 3f93708d1b7..46b66f66fda 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" + classpath "com.android.tools.build:gradle:7.3.0" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -26,15 +26,3 @@ allprojects { resolutionStrategy.cacheDynamicVersionsFor 1, 'seconds' } } - -task clean(type: Delete) { - delete rootProject.buildDir -} - -project.afterEvaluate { - delete 'framework/examples/android-demo/src/main/assets' - copy{ - from "framework/examples/android-demo/res" - into "framework/examples/android-demo/src/main/assets" - } -} diff --git a/framework/android/build.gradle b/framework/android/build.gradle index 4cabdf4cc5c..b4a53368f23 100644 --- a/framework/android/build.gradle +++ b/framework/android/build.gradle @@ -23,25 +23,6 @@ apply plugin: 'com.android.library' apply from: './publish.gradle' -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - android { archivesBaseName = ARCHIVES_BASE_NAME compileSdkVersion COMPILE_VERSION as int diff --git a/framework/examples/android-demo/build.gradle b/framework/examples/android-demo/build.gradle index 7f067334ef7..b7222c68505 100644 --- a/framework/examples/android-demo/build.gradle +++ b/framework/examples/android-demo/build.gradle @@ -62,39 +62,6 @@ android { } } -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - ext { - MAVEN_USER = System.getenv('maven_username') - MAVEN_PWD = System.getenv('maven_password') - MAVEN_URL = System.getenv('maven_url') - } - repositories { - if (MAVEN_URL != null) { - maven { - url MAVEN_URL - credentials { - username MAVEN_USER - password MAVEN_PWD - } - } - } - google() - mavenCentral() - } -} - dependencies { if (verifyReleaseAar) { // options for maven packages or local libs integration @@ -115,3 +82,11 @@ dependencies { api 'com.github.bumptech.glide:glide:3.6.1' api 'androidx.legacy:legacy-support-v4:1.0.0' } + +project.afterEvaluate { + delete 'src/main/assets' + copy{ + from "res" + into "src/main/assets" + } +} diff --git a/gradle.properties b/gradle.properties index b37d486a77d..8c032d96289 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,6 @@ android.disableAutomaticComponentCreation=true org.gradle.warning.mode=all org.gradle.jvmargs = -Xms1024m -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -AGP_VERSION=7.2.2 COMPILE_VERSION=30 MIN_VERSION=21 TARGET_VERSION=30 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e6e5897b52..41dfb87909a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/modules/android/hippy_support/build.gradle b/modules/android/hippy_support/build.gradle index 04dbbbaeee1..bfd91a0cc55 100644 --- a/modules/android/hippy_support/build.gradle +++ b/modules/android/hippy_support/build.gradle @@ -1,24 +1,5 @@ apply plugin: 'com.android.library' -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - android { compileSdkVersion COMPILE_VERSION as int diff --git a/modules/android/link_supplier/build.gradle b/modules/android/link_supplier/build.gradle index 04dbbbaeee1..bfd91a0cc55 100644 --- a/modules/android/link_supplier/build.gradle +++ b/modules/android/link_supplier/build.gradle @@ -1,24 +1,5 @@ apply plugin: 'com.android.library' -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - android { compileSdkVersion COMPILE_VERSION as int diff --git a/modules/android/serialization/build.gradle b/modules/android/serialization/build.gradle index 04dbbbaeee1..bfd91a0cc55 100644 --- a/modules/android/serialization/build.gradle +++ b/modules/android/serialization/build.gradle @@ -1,24 +1,5 @@ apply plugin: 'com.android.library' -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - android { compileSdkVersion COMPILE_VERSION as int diff --git a/renderer/native/android/build.gradle b/renderer/native/android/build.gradle index 5d1d717e0b1..ad8dd3b3a5b 100644 --- a/renderer/native/android/build.gradle +++ b/renderer/native/android/build.gradle @@ -1,24 +1,5 @@ apply plugin: 'com.android.library' -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:$AGP_VERSION" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - android { compileSdkVersion COMPILE_VERSION as int