Skip to content

Commit d90485d

Browse files
authored
Fix project.buildDir deprecation warning (#9509)
1 parent df05d20 commit d90485d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conventions/src/main/kotlin/io.opentelemetry.instrumentation.base.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ tasks {
143143
inputs.property("instrumentation.name", name)
144144
inputs.property("instrumentation.version", version)
145145

146-
val propertiesDir = File(project.buildDir, "generated/instrumentationVersion/META-INF/io/opentelemetry/instrumentation/")
146+
val propertiesDir = layout.buildDirectory.dir("generated/instrumentationVersion/META-INF/io/opentelemetry/instrumentation/")
147147
outputs.dir(propertiesDir)
148148

149149
doLast {
150-
File(propertiesDir, "$name.properties").writeText("version=$version")
150+
File(propertiesDir.get().asFile, "$name.properties").writeText("version=$version")
151151
}
152152
}
153153
}

0 commit comments

Comments
 (0)