Skip to content

Commit c0da9ca

Browse files
committed
build(rollbar-java): update canonical path for generated code
1 parent 3fbba5a commit c0da9ca

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rollbar-java/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ val versionName = project.version.toString().ifEmpty { "unspecified" }
3333
* are not as reliable under relocation as a strongly typed bytecode reference to a compiled class.
3434
*/
3535
val createVersionClass by tasks.registering {
36-
val outputDir = layout.buildDirectory.dir("src/generated/main")
36+
val outputDir = layout.buildDirectory.dir("generated/sources/version/java/main")
3737
outputs.dir(outputDir)
3838

3939
doLast {
@@ -63,22 +63,23 @@ sourceSets {
6363
}
6464
}
6565

66-
tasks.named("compileJava") {
66+
tasks.withType<JavaCompile>().configureEach {
6767
dependsOn(createVersionClass)
6868
}
6969

7070
tasks.named("checkstyleMain") {
7171
dependsOn(createVersionClass)
7272
}
7373

74-
//Ensure sourcesJar runs after version class is created
74+
// Ensure sourcesJar runs after version class is created
7575
tasks.withType<Jar>().configureEach {
7676
if (name == "sourcesJar") {
7777
dependsOn(createVersionClass)
7878
}
7979
}
8080

8181
tasks.test {
82+
dependsOn(createVersionClass)
8283
// This helps us test the VersionHelper class since there's no jar manifest available when
8384
// running tests.
8485
systemProperty("ROLLBAR_IMPLEMENTATION_VERSION", versionName)

0 commit comments

Comments
 (0)