Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"

val downloadSemanticConventions by tasks.registering(Download::class) {
src(semanticConventionsRepoZip)
dest("$buildDir/semantic-conventions-${semanticConventionsVersion}/semantic-conventions.zip")
dest(layout.buildDirectory.file("semantic-conventions-${semanticConventionsVersion}/semantic-conventions.zip"))
overwrite(false)
}

Expand All @@ -79,7 +79,7 @@ val unzipConfigurationSchema by tasks.registering(Copy::class) {
val pathParts = path.split("/")
path = pathParts.subList(1, pathParts.size).joinToString("/")
})
into("$buildDir/semantic-conventions-${semanticConventionsVersion}/")
into(layout.buildDirectory.file("semantic-conventions-${semanticConventionsVersion}/"))
}

fun generateTask(taskName: String, incubating: Boolean) {
Expand All @@ -102,10 +102,11 @@ fun generateTask(taskName: String, incubating: Boolean) {
val gid = unix.getGid() // $(id -g $USERNAME)
listOf("-u", "$uid:$gid")
}
val modelPath = layout.buildDirectory.file("semantic-conventions-${semanticConventionsVersion}/model").get()
val weaver_args = listOf(
"--rm",
"--platform=linux/x86_64",
"--mount", "type=bind,source=$buildDir/semantic-conventions-${semanticConventionsVersion}/model,target=/home/weaver/source,readonly",
"--mount", "type=bind,source=${modelPath},target=/home/weaver/source,readonly",
"--mount", "type=bind,source=$projectDir/buildscripts/templates,target=/home/weaver/templates,readonly",
"--mount", "type=bind,source=$projectDir/$outputDir,target=/home/weaver/target",
"otel/weaver:$generatorVersion",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spotless {
"*.sh",
"src/**/*.properties",
)
indentWithSpaces()
leadingTabsToSpaces()
trimTrailingWhitespace()
endWithNewline()
}
Expand Down