Skip to content

Commit

Permalink
Update Gradle to 8.2.1 (google#2087)
Browse files Browse the repository at this point in the history
This includes removing (hopefully temporarily) the gradle-lint plugin as
it is incompatible with various Gradle versions (see
nebula-plugins/gradle-lint-plugin#393). This
is somewhat unfortunate since the plugin is useful for removing unused
dependencies, though with the relatively small amount of Gradle code we
write hopefully it will not be missed much. If Nebula changes their
code to be compatible with Gradle 8+, we can re-add it easily.

This upgrade means we can remove the code added in 342051e.
  • Loading branch information
gbrodman authored Jul 27, 2023
1 parent f583977 commit 4aa1bd0
Show file tree
Hide file tree
Showing 26 changed files with 2,822 additions and 2,935 deletions.
15 changes: 9 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ buildscript {

plugins {
// Java static analysis plugins. Keep versions consistent with
// ./buildSrc/build.gradle
id 'nebula.lint' version '16.0.2'
// ./buildSrc/build.gradle.kts

// Re-enable when compatible with Gradle 8
// id 'nebula.lint' version '16.0.2'
id 'net.ltgt.errorprone' version '2.0.2'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
Expand All @@ -47,7 +49,7 @@ plugins {
id "com.github.node-gradle.node" version "3.0.1"

id 'idea'
id 'com.diffplug.gradle.spotless' version '3.25.0'
id 'com.diffplug.spotless' version '6.20.0'

id 'jacoco'
id 'com.dorongold.task-tree' version '2.1.0'
Expand Down Expand Up @@ -110,7 +112,8 @@ tasks.build.dependsOn(tasks.checkLicense)
// Provide defaults for all of the project properties.

// Only do linting if the build is successful.
gradleLint.autoLintAfterFailure = false
// Re-enable when compatible with Gradle 8
// gradleLint.autoLintAfterFailure = false

// Paths to main and test sources.
ext.projectRootDir = "${rootDir}"
Expand Down Expand Up @@ -269,14 +272,14 @@ subprojects {
project.tasks.create(
taskName, com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
mergeServiceFiles()
baseName = binaryName
archiveBaseName = binaryName
if (mainClass != '') {
manifest {
attributes 'Main-Class': mainClass
}
}
zip64 = true
classifier = ''
archiveClassifier = ''
archiveVersion = ''
configurations = configs
from srcOutput
Expand Down
20 changes: 6 additions & 14 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ buildscript {

plugins {
// Java static analysis plugins. Keep versions consistent with ../build.gradle
// id("nebula.lint") version "16.0.2" // unsupported for kotlin

// We don't anticipate enabling the Gradle lint plugin because they will not support Kotlin
// See https://github.com/nebula-plugins/gradle-lint-plugin/issues/166
// id 'nebula.lint' version '16.0.2'
id("net.ltgt.errorprone") version "2.0.2"
checkstyle
id("com.diffplug.gradle.spotless") version "3.25.0"
id("com.diffplug.spotless") version "6.20.0"
}

checkstyle {
Expand Down Expand Up @@ -84,12 +87,8 @@ project.the<SourceSetContainer>()["main"].java {
srcDir("${project.buildDir}/generated/source/apt/main")
}

// checkstyle {
// configDir file("../config/checkstyle")
// }

dependencies {
val deps = project.ext["dependencyMap"] as Map<String, String>
val deps = project.ext["dependencyMap"] as Map<*, *>
val implementation by configurations
val testImplementation by configurations
val annotationProcessor by configurations
Expand Down Expand Up @@ -119,13 +118,6 @@ gradle.projectsEvaluated {
}

tasks.register("exportDependencies") {
val outputFileProperty = "dependencyExportFile"
val output = if (project.hasProperty(outputFileProperty)) {
PrintStream(file(project.ext.properties[outputFileProperty]))
} else {
System.out
}

doLast {
project.configurations.forEach {
println("dependency is $it")
Expand Down
33 changes: 19 additions & 14 deletions buildSrc/buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@
com.diffplug.durian:durian-collect:1.2.0=classpath
com.diffplug.durian:durian-core:1.2.0=classpath
com.diffplug.durian:durian-io:1.2.0=classpath
com.diffplug.gradle.spotless:com.diffplug.gradle.spotless.gradle.plugin:3.25.0=classpath
com.diffplug.spotless:spotless-lib-extra:1.25.0=classpath
com.diffplug.spotless:spotless-lib:1.25.0=classpath
com.diffplug.spotless:spotless-plugin-gradle:3.25.0=classpath
com.diffplug.durian:durian-swt.os:4.2.0=classpath
com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:6.20.0=classpath
com.diffplug.spotless:spotless-lib-extra:2.40.0=classpath
com.diffplug.spotless:spotless-lib:2.40.0=classpath
com.diffplug.spotless:spotless-plugin-gradle:6.20.0=classpath
com.googlecode.concurrent-trees:concurrent-trees:2.6.1=classpath
com.googlecode.javaewah:JavaEWAH:1.1.6=classpath
com.jcraft:jsch:0.1.55=classpath
com.jcraft:jzlib:1.1.1=classpath
com.googlecode.javaewah:JavaEWAH:1.2.3=classpath
com.squareup.okhttp3:okhttp:4.10.0=classpath
com.squareup.okio:okio-jvm:3.0.0=classpath
com.squareup.okio:okio:3.0.0=classpath
dev.equo.ide:solstice:1.3.1=classpath
net.ltgt.errorprone:net.ltgt.errorprone.gradle.plugin:2.0.2=classpath
net.ltgt.gradle:gradle-errorprone-plugin:2.0.2=classpath
org.bouncycastle:bcpg-jdk15on:1.61=classpath
org.bouncycastle:bcpkix-jdk15on:1.61=classpath
org.bouncycastle:bcprov-jdk15on:1.61=classpath
org.codehaus.groovy:groovy-xml:2.4.7=classpath
org.codehaus.groovy:groovy:2.4.7=classpath
org.eclipse.jgit:org.eclipse.jgit:5.5.0.201909110433-r=classpath
org.slf4j:slf4j-api:1.7.2=classpath
org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r=classpath
org.eclipse.platform:org.eclipse.osgi:3.18.300=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.8.20=classpath
org.jetbrains:annotations:13.0=classpath
org.slf4j:slf4j-api:1.7.36=classpath
org.tukaani:xz:1.9=classpath
empty=
Loading

0 comments on commit 4aa1bd0

Please sign in to comment.