From aeb50b88791ed28794f7dfd1e59a0624b40295ec Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sat, 9 Mar 2024 15:13:07 +0000 Subject: [PATCH] Update to Android Gradle plugin version 8.3.0 (closes #1091) --- demo/.gitignore | 1 + demo/build.gradle.kts | 2 +- demo/gradle.properties | 8 ++++---- demo/gradle/wrapper/gradle-wrapper.properties | 2 +- demo/settings.gradle.kts | 8 +++++++- .../test/integration/data/base/8.3/gradle.properties | 2 +- .../test/integration/data/base/8.3/settings.gradle.kts | 2 +- server/pypi/pkgtest/.gitignore | 1 + server/pypi/pkgtest/.idea/kotlinc.xml | 6 ++++++ server/pypi/pkgtest/.idea/misc.xml | 7 +++++-- server/pypi/pkgtest/build.gradle | 2 +- server/pypi/pkgtest/gradle.properties | 10 +++++----- .../pkgtest/gradle/wrapper/gradle-wrapper.properties | 2 +- 13 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 server/pypi/pkgtest/.idea/kotlinc.xml diff --git a/demo/.gitignore b/demo/.gitignore index 6bd6cb288f..f5a2cf86d4 100644 --- a/demo/.gitignore +++ b/demo/.gitignore @@ -13,3 +13,4 @@ /captures .externalNativeBuild .cxx +local.properties diff --git a/demo/build.gradle.kts b/demo/build.gradle.kts index 878759d1e3..c743d78afc 100644 --- a/demo/build.gradle.kts +++ b/demo/build.gradle.kts @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all // sub-projects/modules. plugins { - id("com.android.application") version "8.2.2" apply false + id("com.android.application") version "8.3.0" apply false id("org.jetbrains.kotlin.android") version "1.9.0" apply false // com.chaquo.python is declared in settings.gradle.kts, because dynamic versions diff --git a/demo/gradle.properties b/demo/gradle.properties index cd0519bb2a..132244e5b8 100644 --- a/demo/gradle.properties +++ b/demo/gradle.properties @@ -8,11 +8,11 @@ # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects # org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK +# Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Kotlin code style for this project: "official" or "obsolete": @@ -20,4 +20,4 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true diff --git a/demo/gradle/wrapper/gradle-wrapper.properties b/demo/gradle/wrapper/gradle-wrapper.properties index 19d5f1c59e..cd77df81a2 100644 --- a/demo/gradle/wrapper/gradle-wrapper.properties +++ b/demo/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip diff --git a/demo/settings.gradle.kts b/demo/settings.gradle.kts index 8465c81feb..f6488b77bc 100644 --- a/demo/settings.gradle.kts +++ b/demo/settings.gradle.kts @@ -1,7 +1,13 @@ pluginManagement { repositories { maven { url = uri("../maven") } - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() gradlePluginPortal() } diff --git a/product/gradle-plugin/src/test/integration/data/base/8.3/gradle.properties b/product/gradle-plugin/src/test/integration/data/base/8.3/gradle.properties index f61b8838d1..2f063df4b5 100644 --- a/product/gradle-plugin/src/test/integration/data/base/8.3/gradle.properties +++ b/product/gradle-plugin/src/test/integration/data/base/8.3/gradle.properties @@ -1,7 +1,7 @@ # The test script uses this to set JAVA_HOME. chaquopy.java.version=17 -agpVersion=8.3.0-rc01 +agpVersion=8.3.0 # These variables will be filled in by the test script. chaquopyRepository= diff --git a/product/gradle-plugin/src/test/integration/data/base/8.3/settings.gradle.kts b/product/gradle-plugin/src/test/integration/data/base/8.3/settings.gradle.kts index c1e40461d0..2cd5e1fc21 100644 --- a/product/gradle-plugin/src/test/integration/data/base/8.3/settings.gradle.kts +++ b/product/gradle-plugin/src/test/integration/data/base/8.3/settings.gradle.kts @@ -5,6 +5,7 @@ pluginManagement { val agpVersion: String by settings repositories { + maven { url = uri(chaquopyRepository) } google { content { includeGroupByRegex("com\\.android.*") @@ -14,7 +15,6 @@ pluginManagement { } mavenCentral() gradlePluginPortal() - maven { url = uri(chaquopyRepository) } } plugins { diff --git a/server/pypi/pkgtest/.gitignore b/server/pypi/pkgtest/.gitignore index 6bd6cb288f..f5a2cf86d4 100644 --- a/server/pypi/pkgtest/.gitignore +++ b/server/pypi/pkgtest/.gitignore @@ -13,3 +13,4 @@ /captures .externalNativeBuild .cxx +local.properties diff --git a/server/pypi/pkgtest/.idea/kotlinc.xml b/server/pypi/pkgtest/.idea/kotlinc.xml new file mode 100644 index 0000000000..fdf8d994a6 --- /dev/null +++ b/server/pypi/pkgtest/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/server/pypi/pkgtest/.idea/misc.xml b/server/pypi/pkgtest/.idea/misc.xml index c352c4f24e..b74d04c327 100644 --- a/server/pypi/pkgtest/.idea/misc.xml +++ b/server/pypi/pkgtest/.idea/misc.xml @@ -1,10 +1,11 @@ + diff --git a/server/pypi/pkgtest/build.gradle b/server/pypi/pkgtest/build.gradle index e6d7ab371c..2a2ed3a055 100644 --- a/server/pypi/pkgtest/build.gradle +++ b/server/pypi/pkgtest/build.gradle @@ -15,7 +15,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.2.2' + classpath 'com.android.tools.build:gradle:8.3.0' classpath "com.chaquo.python:gradle:" + (chaquopyVersion ?: "+") } } diff --git a/server/pypi/pkgtest/gradle.properties b/server/pypi/pkgtest/gradle.properties index 74f76f95a3..132244e5b8 100644 --- a/server/pypi/pkgtest/gradle.properties +++ b/server/pypi/pkgtest/gradle.properties @@ -8,16 +8,16 @@ # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects # org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK +# Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Kotlin code style for this project: "official" or "obsolete": -# kotlin.code.style=official +kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true diff --git a/server/pypi/pkgtest/gradle/wrapper/gradle-wrapper.properties b/server/pypi/pkgtest/gradle/wrapper/gradle-wrapper.properties index 5ae20dfd89..7b6d079004 100644 --- a/server/pypi/pkgtest/gradle/wrapper/gradle-wrapper.properties +++ b/server/pypi/pkgtest/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip