Skip to content

Commit 1e72fa2

Browse files
committed
Rework loader-tools resource generation to work with Buildship
Previously, the generated resources were added as an output to the main source set. This worked on the command line, but resulted in the META-INF folder that contains the loader jar not being on the classpath of downstream projects in Eclipse. This commit changes loader-tools to add the generated resources as a srcDir to the main source set. This results in it appearing on the classpath of other projects in Eclipse that depend on loader-tools such as the Gradle plugin, thereby allowing its tests to be run in the IDE as well as on the command line. Fixes gh-19841
1 parent 4486da8 commit 1e72fa2

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-loader-tools

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies {
3030

3131
sourceSets {
3232
main {
33-
output.dir(generatedResources, builtBy: 'reproducibleLoaderJar')
33+
resources.srcDirs generatedResources
3434
}
3535
}
3636

@@ -45,6 +45,6 @@ task reproducibleLoaderJar(type: Jar) {
4545
destinationDirectory = file("${generatedResources}/META-INF/loader")
4646
}
4747

48-
jar {
48+
processResources {
4949
dependsOn reproducibleLoaderJar
5050
}

0 commit comments

Comments
 (0)