Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import org.gradle.util.GradleVersion

// define all versioned plugins here and apply in subprojects as necessary without version
plugins {
id 'com.github.sherter.google-java-format' version '0.9' apply false
id 'net.ltgt.errorprone' version '3.1.0' apply false
id 'net.researchgate.release' version '2.8.1' apply false
id 'net.researchgate.release' version '3.1.0' apply false
id 'com.gradle.plugin-publish' version '1.2.0' apply false
id 'io.freefair.maven-plugin' version '5.3.3.3' apply false

Expand Down Expand Up @@ -79,18 +81,23 @@ subprojects {
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'jacoco'

// Guava update breaks unit tests. Workaround mentioned in https://github.com/google/guava/issues/6612#issuecomment-1614992368.
sourceSets.all {
configurations.getByName(runtimeClasspathConfigurationName) {
attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
}
configurations.getByName(compileClasspathConfigurationName) {
attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
// Guava update breaks unit tests in Gradle 6.x. Workaround mentioned in https://github.com/google/guava/issues/6612#issuecomment-1614992368.
// Only needed for Gradle < 7, as Gradle 7+ handles this automatically
if (GradleVersion.current() < GradleVersion.version('7.0')) {
sourceSets.all {
configurations.getByName(runtimeClasspathConfigurationName) {
attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
}
configurations.getByName(compileClasspathConfigurationName) {
attributes.attribute(Attribute.of("org.gradle.jvm.environment", String), "standard-jvm")
}
}
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs += [ '-Xlint:deprecation' ]
compileTestJava.options.compilerArgs += [ '-Xlint:deprecation' ]
Expand Down Expand Up @@ -177,7 +184,7 @@ subprojects {

/* TEST CONFIG */
tasks.withType(Test).configureEach {
reports.html.outputLocation = file("${reporting.baseDir}/${name}")
reports.html.outputLocation = file("${project.buildDir}/reports/${name}")
}

test {
Expand Down Expand Up @@ -215,8 +222,7 @@ subprojects {

configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestImplementation.setCanBeResolved(true)
integrationTestRuntime.extendsFrom testRuntime
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}

// Integration tests must be run explicitly
Expand Down Expand Up @@ -397,7 +403,12 @@ subprojects {
sourceProjects += dependencyProject
// if we find any project dependencies that were brought in transitively, go remove them
project.configurations.implementation.dependencies.removeAll { d ->
return d instanceof ProjectDependency && sourceProjects.contains(d.dependencyProject)
if (d instanceof ProjectDependency) {
// Gradle 6.9.2 uses dependencyProject, Gradle 9+ uses path
def depProject = d.hasProperty('dependencyProject') ? d.dependencyProject : project.project(d.path)
return sourceProjects.contains(depProject)
}
return false
}
// adds dependencyProject's classes to jar (fat jar-esque)
jar {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading