Skip to content

Commit ad17349

Browse files
authored
Remove deprecated usages of buildSrc (#144)
1 parent 78479c9 commit ad17349

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,23 @@ protobuf {
6868
}
6969
}
7070

71-
val protoArchive = file("$buildDir/archives/opentelemetry-proto-$protoVersion.zip")
71+
val protoArchive = layout.buildDirectory.file("archives/opentelemetry-proto-$protoVersion.zip")
7272

7373
tasks {
7474
test {
7575
useJUnitPlatform()
7676
}
7777

7878
val downloadProtoArchive by registering(Download::class) {
79-
onlyIf { !protoArchive.exists() }
8079
src("https://github.com/open-telemetry/opentelemetry-proto/archive/v$protoVersion.zip")
8180
dest(protoArchive)
81+
overwrite(false)
8282
}
8383

8484
val unzipProtoArchive by registering(Copy::class) {
8585
dependsOn(downloadProtoArchive)
8686
from(zipTree(protoArchive))
87-
into("$buildDir/protos")
87+
into(layout.buildDirectory.dir("protos"))
8888
}
8989

9090
named("processResources") {
@@ -101,7 +101,7 @@ tasks {
101101
sourceSets {
102102
main {
103103
proto {
104-
srcDir("$buildDir/protos/opentelemetry-proto-$protoVersion")
104+
srcDir(layout.buildDirectory.dir("protos/opentelemetry-proto-$protoVersion"))
105105
}
106106
}
107107
}

0 commit comments

Comments
 (0)