@@ -58,8 +58,9 @@ dependencies {
5858// ... proceed with normal sourcesJar, compileJava, etc
5959
6060val configurationTag = " 1.0.0-rc.1"
61- val configurationRef = " refs/tags/v$configurationTag " // Replace with commit SHA to point to experiment with a specific commit
62- val configurationRepoZip = " https://github.com/open-telemetry/opentelemetry-configuration/archive/$configurationRef .zip"
61+ // todo revert this when config PR is merged: https://github.com/open-telemetry/opentelemetry-configuration/pull/275
62+ val configurationRef = " refs/heads/authenticator" // Replace with commit SHA to point to experiment with a specific commit
63+ val configurationRepoZip = " https://github.com/zeitlinger/opentelemetry-configuration/archive/$configurationRef .zip"
6364val buildDirectory = layout.buildDirectory.asFile.get()
6465
6566val downloadConfigurationSchema by tasks.registering(Download ::class ) {
@@ -69,8 +70,15 @@ val downloadConfigurationSchema by tasks.registering(Download::class) {
6970}
7071
7172val unzipConfigurationSchema by tasks.registering(Copy ::class ) {
72- from(" /home/gregor/source/opentelemetry-configuration/schema" )
73- into(" $buildDirectory /configuration/schema/" )
73+ dependsOn(downloadConfigurationSchema)
74+
75+ from(zipTree(downloadConfigurationSchema.get().dest))
76+ eachFile(closureOf<FileCopyDetails > {
77+ // Remove the top level folder "/opentelemetry-configuration-$configurationRef"
78+ val pathParts = path.split(" /" )
79+ path = pathParts.subList(1 , pathParts.size).joinToString(" /" )
80+ })
81+ into(" $buildDirectory /configuration/" )
7482}
7583
7684val deleteTypeDescriptions by tasks.registering(Delete ::class ) {
0 commit comments