Skip to content

Commit aa4c948

Browse files
authored
Replace deprecated tasks.create with tasks.register (open-telemetry#13691)
1 parent 8cd11e4 commit aa4c948

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

instrumentation/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ val instrumentationProjectTest = tasks.named("test")
77
// batching up the muzzle tasks alphabetically into 4 chunks
88
// to split them up into separate CI jobs (but not too many CI job)
99
val instrumentationProjectMuzzle = listOf(
10-
tasks.create("muzzle1"),
11-
tasks.create("muzzle2"),
12-
tasks.create("muzzle3"),
13-
tasks.create("muzzle4"),
10+
tasks.register("muzzle1"),
11+
tasks.register("muzzle2"),
12+
tasks.register("muzzle3"),
13+
tasks.register("muzzle4"),
1414
)
1515

1616
var counter = 0
@@ -33,6 +33,6 @@ subprojects {
3333
// relying on predictable ordering of subprojects
3434
// (see https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#N14CB4)
3535
// since we are splitting these muzzleX tasks across different github action jobs
36-
instrumentationProjectMuzzle[counter++ % 4].dependsOn(subProj.tasks.named("muzzle"))
36+
instrumentationProjectMuzzle[counter++ % 4].get().dependsOn(subProj.tasks.named("muzzle"))
3737
}
3838
}

instrumentation/runtime-telemetry/runtime-telemetry-java17/library/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
testImplementation("io.github.netmikey.logunit:logunit-jul:1.1.3")
1212
}
1313

14-
tasks.create("generateDocs", JavaExec::class) {
14+
tasks.register("generateDocs", JavaExec::class) {
1515
group = "build"
1616
description = "Generate table for README.md"
1717
classpath = sourceSets.test.get().runtimeClasspath

0 commit comments

Comments
 (0)