# HG changeset patch # Parent f0a32fc98a498ae66754a647320c0321acf66f18 8177831: Adding redundant module-source-path to java compile Reviewed-by: diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -3340,21 +3340,6 @@ compile.options.compilerArgs += ["-XDignore.symbol.file", "-encoding", "UTF-8"] - // If I am a module.... - if (project.hasProperty('moduleSourcePath') && - (project.hasProperty('buildModule') && project.buildModule)) { - project.compileJava { - options.compilerArgs.addAll([ - '-implicit:none', - '--module-source-path', project.moduleSourcePath - ]) - } - // no jars needed for modules - project.jar.enabled = false - - // and redirect the resources into the module - project.processResources.destinationDir = project.moduleDir - } // we use a custom javadoc command project.javadoc.enabled = false @@ -3366,6 +3351,22 @@ } } // tasks with javaCompile + // If I am a module.... + if (project.hasProperty('moduleSourcePath') && + (project.hasProperty('buildModule') && project.buildModule)) { + project.compileJava { + options.compilerArgs.addAll([ + '-implicit:none', + '--module-source-path', project.moduleSourcePath + ]) + } + // no jars needed for modules + project.jar.enabled = false + + // and redirect the resources into the module + project.processResources.destinationDir = project.moduleDir + } + if (project.hasProperty('moduleSourcePathShim') && project.sourceSets.hasProperty('shims')) {