@@ -66,7 +66,7 @@ val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"
6666
6767val downloadSemanticConventions by tasks.registering(Download ::class ) {
6868 src(semanticConventionsRepoZip)
69- dest(" $buildDir / semantic-conventions-${semanticConventionsVersion} /semantic-conventions.zip" )
69+ dest(layout.buildDirectory.file( " semantic-conventions-${semanticConventionsVersion} /semantic-conventions.zip" ) )
7070 overwrite(false )
7171}
7272
@@ -79,7 +79,7 @@ val unzipConfigurationSchema by tasks.registering(Copy::class) {
7979 val pathParts = path.split(" /" )
8080 path = pathParts.subList(1 , pathParts.size).joinToString(" /" )
8181 })
82- into(" $buildDir / semantic-conventions-${semanticConventionsVersion} /" )
82+ into(layout.buildDirectory.dir( " semantic-conventions-${semanticConventionsVersion} /" ) )
8383}
8484
8585fun generateTask (taskName : String , incubating : Boolean ) {
@@ -102,10 +102,11 @@ fun generateTask(taskName: String, incubating: Boolean) {
102102 val gid = unix.getGid() // $(id -g $USERNAME)
103103 listOf (" -u" , " $uid :$gid " )
104104 }
105+ val modelPath = layout.buildDirectory.dir(" semantic-conventions-${semanticConventionsVersion} /model" ).get()
105106 val weaver_args = listOf (
106107 " --rm" ,
107108 " --platform=linux/x86_64" ,
108- " --mount" , " type=bind,source=$buildDir /semantic-conventions- ${semanticConventionsVersion} /model ,target=/home/weaver/source,readonly" ,
109+ " --mount" , " type=bind,source=${modelPath} ,target=/home/weaver/source,readonly" ,
109110 " --mount" , " type=bind,source=$projectDir /buildscripts/templates,target=/home/weaver/templates,readonly" ,
110111 " --mount" , " type=bind,source=$projectDir /$outputDir ,target=/home/weaver/target" ,
111112 " otel/weaver:$generatorVersion " ,
0 commit comments