From 4c105acc30698c798f9dd30633870d084010f571 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Fri, 15 Nov 2024 17:17:37 -0800 Subject: [PATCH 1/3] Upgrade build dependencies for the project - Upgrade to Gradle 8.11 - Upgrade to Android Gradle Plugin 8.7.2 - Remove deprecated android.defaults.buildfeatures.buildconfig=true gradle property, it is not needed as mastodon/build.gradle already sets android { buildFeatures { buildConfig true } } - Move plugin repository definition to settings.gradle to match latest Gradle practices - Move to using plugin {} mechanism to add Android Gradle Plugin to match the latest Gradle practices - Remove root project clean task as this project does not produce any real artifacts, it seems to be leftover from original Android new project template --- build.gradle | 24 ++---------------------- gradle.properties | 3 +-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- settings.gradle | 13 +++++++++++++ 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index 1bf260e0d7..8a9e919507 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,3 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - maven { - url "https://www.jitpack.io" - content { - includeModule 'com.github.UnifiedPush', 'android-connector' - } - } - mavenLocal() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.0' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } +plugins { + id("com.android.application") version("8.7.2") apply(false) } - -task clean(type: Delete) { - delete rootProject.buildDir -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index cd211a89fe..1dd86d1f00 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=false -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=true android.nonFinalResIds=false -org.gradle.configuration-cache=true \ No newline at end of file +org.gradle.configuration-cache=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2c3425d49e..6fc951615d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 0e3f80fd37..a4a0c62018 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,16 @@ +pluginManagement { + repositories { + google() + mavenCentral() + maven { + url "https://www.jitpack.io" + content { + includeModule 'com.github.UnifiedPush', 'android-connector' + } + } + mavenLocal() + } +} dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { From 203c43343ae399c11c4b2b7c844c1c29ca440d98 Mon Sep 17 00:00:00 2001 From: Aurimas Date: Sun, 17 Nov 2024 18:46:43 -0800 Subject: [PATCH 2/3] Update build.gradle Co-authored-by: Zongle Wang --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8a9e919507..83af7215c3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,3 @@ plugins { - id("com.android.application") version("8.7.2") apply(false) + id("com.android.application") version "8.7.2" apply false } From 82bcfe3fa86230bef26282df1e2e32448cb20687 Mon Sep 17 00:00:00 2001 From: Aurimas Date: Sun, 17 Nov 2024 18:46:51 -0800 Subject: [PATCH 3/3] Update gradle.properties Co-authored-by: Zongle Wang --- gradle.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1dd86d1f00..9d4267fe2e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,6 +17,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=false -android.nonTransitiveRClass=true android.nonFinalResIds=false org.gradle.configuration-cache=true