Skip to content

Commit c7e9a73

Browse files
Copilottrask
andcommitted
Fix all Gradle deprecation warnings for Gradle 9.0 compatibility
Co-authored-by: trask <[email protected]>
1 parent 208b5c9 commit c7e9a73

File tree

10 files changed

+11
-12
lines changed

10 files changed

+11
-12
lines changed

agent/agent-for-testing/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tasks {
5050
dependsOn(relocateJavaagentLibs)
5151
isolateClasses(relocateJavaagentLibs.get().outputs.files)
5252

53-
into("$buildDir/isolated/javaagentLibs")
53+
into("${layout.buildDirectory.get()}/isolated/javaagentLibs")
5454
}
5555

5656
// 3. the relocated and isolated javaagent libs are merged together with the bootstrap libs (which undergo relocation

agent/agent/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ tasks {
9595
dependsOn(relocateJavaagentLibs)
9696
isolateClasses(relocateJavaagentLibs.get().outputs.files)
9797

98-
into("$buildDir/isolated/javaagentLibs")
98+
into("${layout.buildDirectory.get()}/isolated/javaagentLibs")
9999
}
100100

101101
// 3. the relocated and isolated javaagent libs are merged together with the bootstrap libs (which undergo relocation

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ dependencies {
4545
implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.3")
4646

4747
// earlier versions aren't compatible with Gradle 8.1.1
48-
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.5.12")
48+
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.7.18")
4949
}

buildSrc/src/main/kotlin/ai.javaagent-instrumentation.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ tasks.withType<Test>().configureEach {
6262
// The sources are packaged into the testing jar so we need to make sure to exclude from the test
6363
// classpath, which automatically inherits them, to ensure our shaded versions are used.
6464
classpath = classpath.filter {
65-
if (file("$buildDir/resources/main") == it || file("$buildDir/classes/java/main") == it) {
65+
if (file("${layout.buildDirectory.get()}/resources/main") == it || file("${layout.buildDirectory.get()}/classes/java/main") == it) {
6666
return@filter false
6767
}
6868
return@filter true

buildSrc/src/main/kotlin/ai.sdk-version-file.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
`java-library`
33
}
44

5-
val sdkVersionDir = "${buildDir}/generated/resources/sdk-version"
5+
val sdkVersionDir = "${layout.buildDirectory.get()}/generated/resources/sdk-version"
66

77
abstract class GenerateVersionResourceTask : DefaultTask() {
88
@get:Input

buildSrc/src/main/kotlin/ai.smoke-test.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ configurations.all {
8787
}
8888

8989
tasks {
90-
task<Test>("smokeTest") {
90+
tasks.register<Test>("smokeTest") {
9191
useJUnitPlatform()
9292

9393
// this is just to force building the agent first

buildSrc/src/main/kotlin/ai.spotless-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spotless {
3535
"docs/**/*.md",
3636
"*.sh",
3737
"src/**/*.properties")
38-
indentWithSpaces()
38+
leadingTabsToSpaces()
3939
trimTrailingWhitespace()
4040
endWithNewline()
4141
}

etw/java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sourceSets {
2222
}
2323
}
2424

25-
archivesBaseName = "applicationinsights-java-etw-provider"
25+
base.archivesName = "applicationinsights-java-etw-provider"
2626

2727
logger.info "project ${project.path} prop: ai.etw.native.build=${System.properties['ai.etw.native.build']}"
2828

gradle.properties

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
1414
# org.gradle.warning.mode=fail
1515

1616
# To allow caching more tasks in buildSrc project
17-
# This property is not mentioned in Gradle documentation
18-
# See https://github.com/gradle/gradle/issues/15214 for background info
19-
systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=true
17+
# The system property org.gradle.kotlin.dsl.precompiled.accessors.strict
18+
# is now deprecated and defaults to true, so no longer needed
2019

2120
# Workaround https://youtrack.jetbrains.com/issue/KT-34862
2221
kotlin.incremental=false

smoke-tests/apps/gRPC/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import com.google.protobuf.gradle.*
22

33
plugins {
44
id("ai.smoke-test-jar")
5-
id("com.google.protobuf") version "0.8.19"
5+
id("com.google.protobuf") version "0.9.6"
66
}
77

88
val grpcVersion = "1.26.0" // first version with support for arm64

0 commit comments

Comments
 (0)