From 4d3953dc7e8114d44a89e296b3a1d1f426a67533 Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 17 Sep 2024 08:17:35 +0200 Subject: [PATCH] build: upgrade Gradle and dependencies Upgraded Gradle plugin to version 8.1.0 and updated the wrapper to use Gradle 8.0. Updated build settings to modern standards, including non-final resource IDs and non-transitive R class. Moved lintOptions block to the proper lint configuration block in build.gradle. Removed the redundant package attribute from the AndroidManifest.xml since it's now defined in the namespace block. These updates address compatibility issues and take advantage of new features and performance improvements provided by the latest Gradle version. --- app/build.gradle | 7 ++++--- app/src/main/AndroidManifest.xml | 3 +-- build.gradle | 2 +- gradle.properties | 3 +++ gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a3725521..1824b0cb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,9 +28,6 @@ android { } } } - lintOptions { - abortOnError false - } buildFeatures { dataBinding = true } @@ -52,6 +49,10 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'org.shadowice.flocke.andotp' + lint { + abortOnError false + } } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5aa2195e..f3a4a4e8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,8 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:ignore="GoogleAppIndexingWarning" - android:installLocation="auto" - package="org.shadowice.flocke.andotp"> + android:installLocation="auto"> diff --git a/build.gradle b/build.gradle index ec3ea54f..0cf4a207 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:8.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle.properties b/gradle.properties index c59ae7be..ee30d77e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,10 @@ # 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 # org.gradle.parallel=true +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true # reuse task outputs from any previous build for diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a25..da1db5f0 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.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists