Commit 1e72fa20 authored by Andy Wilkinson's avatar Andy Wilkinson

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
parent 4486da8e
...@@ -30,7 +30,7 @@ dependencies { ...@@ -30,7 +30,7 @@ dependencies {
sourceSets { sourceSets {
main { main {
output.dir(generatedResources, builtBy: 'reproducibleLoaderJar') resources.srcDirs generatedResources
} }
} }
...@@ -45,6 +45,6 @@ task reproducibleLoaderJar(type: Jar) { ...@@ -45,6 +45,6 @@ task reproducibleLoaderJar(type: Jar) {
destinationDirectory = file("${generatedResources}/META-INF/loader") destinationDirectory = file("${generatedResources}/META-INF/loader")
} }
jar { processResources {
dependsOn reproducibleLoaderJar dependsOn reproducibleLoaderJar
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment