Skip to content
Browse files
Added a SourceSet for groovyScript files specifying the classpath tha…
…t should be used for compilation.


This helps IDEs navigate to the scripts' dependencies, making it easier
to spot issues during development.

However we don't want gradle to attempt to compile groovyScripts,
therefore the compileGroovyScriptsGroovy task is disabled.
  • Loading branch information
danwatford committed Jan 24, 2021
1 parent d7d424f commit da2ab82
Showing 1 changed file with 14 additions and 0 deletions.
@@ -281,6 +281,20 @@ sourceSets {
srcDirs = getDirectoryInActiveComponentsIfExists('src/test/resources')

groovyScripts {
groovy {
srcDirs += getDirectoryInActiveComponentsIfExists('groovyScripts')
compileClasspath += sourceSets.main.compileClasspath
compileClasspath += sourceSets.main.output

tasks.named('compileGroovyScriptsGroovy') {
// We don't want to build groovyScripts as they should be considered as standalone elements executed in
// isolation by ofbiz. Building them will result in numerous error due to duplicated classes.
enabled = false


0 comments on commit da2ab82

Please sign in to comment.