Upgrade to gradle 8 (wip)

This commit is contained in:
José Rebelo 2024-04-07 14:55:05 +01:00
parent 75dc546aa9
commit 51be7682f1
4 changed files with 29 additions and 15 deletions

View File

@ -1,5 +1,3 @@
import com.github.spotbugs.SpotBugsTask
import java.nio.file.Files
apply plugin: "com.android.application"
@ -202,6 +200,9 @@ android {
includeAndroidResources = true
}
}
buildFeatures {
aidl true
}
}
pmd {
@ -317,8 +318,8 @@ task pmd(type: Pmd) {
exclude "**/gen/**"
reports {
xml.enabled = false
html.enabled = true
//xml.enabled = false
//html.enabled = true
xml {
destination file("$project.buildDir/reports/pmd/pmd.xml")
}
@ -336,19 +337,19 @@ sourceSets {
}
spotbugs {
toolVersion = "3.1.12"
toolVersion = "4.8.3"
ignoreFailures = !ABORT_ON_CHECK_FAILURE
effort = "default"
reportLevel = "medium"
//effort = "default"
//reportLevel = "medium"
}
tasks.withType(SpotBugsTask) {
source = fileTree('src/main/java')
spotbugsMain {
sourceDirs = fileTree('src/main/java')
classes = files("${project.rootDir}/app/build/intermediates/javac/debug/classes")
excludeFilter = new File("${project.rootDir}/config/findbugs/findbugs-filter.xml")
reports {
xml.enabled = false
html.enabled = true
//xml.enabled = false
//html.enabled = true
xml {
destination file("$project.buildDir/reports/spotbugs/spotbugs-output.xml")
}

View File

@ -9,10 +9,10 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.3.0'
classpath 'gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:2.0.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.9'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@ -19,3 +19,16 @@ org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
#
# AGP 8.x upgrade
#
# We do not use magen-publish
#android.disableAutomaticComponentCreation=true
# Keep the AGP 7.x defaults for now
android.enableR8.fullMode=false
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists