Skip to content

Commit 1d02569

Browse files
committed
Gradle - allow disabling of exploded mode when running an application
1 parent 581f3de commit 1d02569

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsExtension.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class GrailsExtension {
3131
*/
3232
boolean packageAssets = true
3333

34+
/**
35+
* Whether to include subproject dependencies as directories directly on the classpath, instead of as JAR files
36+
*/
37+
boolean exploded = true
38+
3439
/**
3540
* Configure the reloading agent
3641
*/
@@ -47,7 +52,7 @@ class GrailsExtension {
4752
* Allows defining plugins in the available scopes
4853
*/
4954
void plugins(Closure pluginDefinitions) {
50-
def definer = new PluginDefiner(project)
55+
def definer = new PluginDefiner(project,exploded)
5156
ConfigureUtil.configure(pluginDefinitions, definer, Closure.DELEGATE_FIRST)
5257
}
5358
/**

grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/PluginDefiner.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ import org.gradle.api.artifacts.Dependency
1414
*/
1515
@PackageScope
1616
class PluginDefiner {
17-
Project project
17+
final Project project
18+
final exploded
1819

19-
PluginDefiner(Project project) {
20+
PluginDefiner(Project project, boolean exploded = true) {
2021
this.project = project
22+
this.exploded = exploded
2123
}
2224

2325
void methodMissing(String name, args) {
@@ -46,7 +48,7 @@ class PluginDefiner {
4648

4749
@CompileStatic
4850
Dependency project(String path) {
49-
if(Environment.isDevelopmentRun()) {
51+
if(Environment.isDevelopmentRun() && exploded) {
5052
project.dependencies.project(path:path, configuration:'exploded')
5153
}
5254
else {

0 commit comments

Comments
 (0)