Skip to content

Commit af8dcff

Browse files
authored
Fix gradle warnings (#151)
* Fix gradle warnings * Improve syntax * file to dir where appropriate
1 parent 21bff96 commit af8dcff

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"
6666

6767
val 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

8585
fun 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",

buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ spotless {
7070
"*.sh",
7171
"src/**/*.properties",
7272
)
73-
indentWithSpaces()
73+
leadingTabsToSpaces()
7474
trimTrailingWhitespace()
7575
endWithNewline()
7676
}

0 commit comments

Comments
 (0)