Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variables:
BUILD_JOB_NAME: "build"
DEPENDENCY_CACHE_POLICY: pull
BUILD_CACHE_POLICY: pull
GRADLE_VERSION: "8.4" # must match gradle-wrapper.properties
GRADLE_VERSION: "8.5" # must match gradle-wrapper.properties
MAVEN_REPOSITORY_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/maven-central/"
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
JAVA_BUILD_IMAGE_VERSION: "v25.05"
Expand Down
16 changes: 13 additions & 3 deletions dd-java-agent/instrumentation/scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
def (major, minor) = version.split('_').collect(Integer.&valueOf)
final javaConcatenation = major > 2 || minor > 11 // after 2.11 scala uses java.lang.StringBuilder to perform concatenation

final configuration = configurations.create("${version}Implementation")
final configuration = configurations.create("${version}Implementation") {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was required for the upgrade, since we couldn't use the same configuration here both to declare dependencies and to retrieve the class path.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this for consistency with the new variable.

Suggested change
final configuration = configurations.create("${version}Implementation") {
final implementationConfiguration = configurations.create("${version}Implementation") {

canBeConsumed = false
canBeResolved = false
canBeDeclared = true
}
final classPathConfiguration = configurations.create("${version}CompileClasspath") {
canBeConsumed = false
canBeResolved = true
canBeDeclared = false
extendsFrom(configuration)
}

dependencies { handler ->
handler.add(configuration.name, scalaLibrary)
Expand All @@ -40,7 +50,7 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
final customSourceSet = sourceSets.create("${version}") {
scala {
srcDirs = ['src/test/scala']
compileClasspath += configuration
compileClasspath += classPathConfiguration
}
}

Expand All @@ -49,7 +59,7 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
.filter { !it.toString().contains('scala-library') } // exclude default scala-library
.minus(files(sourceSets.test.scala.classesDirectory)) // exclude default /build/classes/scala/test folder
.plus(customSourceSet.output.classesDirs) // add /build/classes/scala/${version} folder
.plus(configuration) // add new scala-library configuration
.plus(classPathConfiguration) // add new scala-library configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: alignment

Suggested change
.plus(classPathConfiguration) // add new scala-library configuration
.plus(classPathConfiguration) // add new scala-library configuration

systemProperty('uses.java.concat', javaConcatenation)
dependsOn(tasks.named("compile${version.capitalize()}Scala"))
group = 'verification'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# Please note that the version specific cache directory in
# .gitlab-ci.yml needs to match this version.
distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is there a reason to use the -all (which include sources), nowadays IDE can download the sources with the -bin distribution.

networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.