File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
grails-forge/grails-forge-core/src
main/java/org/grails/forge/feature/grails
test/groovy/org/grails/forge/feature/view
grails-profiles/web-plugin Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ public void apply(GeneratorContext generatorContext) {
7171
7272 if (applicationType == ApplicationType .PLUGIN || applicationType == ApplicationType .WEB_PLUGIN ) {
7373 generatorContext .addBuildPlugin (GradlePlugin .builder ().id ("org.apache.grails.gradle.grails-plugin" ).useApplyPlugin (true ).build ());
74- }
75- if (generatorContext .getFeature (GrailsWeb .class ).isPresent ()) {
74+ } else if (generatorContext .getFeature (GrailsWeb .class ).isPresent ()) {
7675 generatorContext .addBuildPlugin (GradlePlugin .builder ().id ("org.apache.grails.gradle.grails-web" ).useApplyPlugin (true ).build ());
7776 }
77+
7878 if (generatorContext .getFeature (GrailsGsp .class ).isPresent ()) {
7979 generatorContext .addBuildPlugin (GradlePlugin .builder ().id ("org.apache.grails.gradle.grails-gsp" ).useApplyPlugin (true ).build ());
8080 }
Original file line number Diff line number Diff line change @@ -111,7 +111,22 @@ class GrailsGspSpec extends ApplicationContextSpec implements CommandOutputFixtu
111111 build. contains(" implementation \" org.apache.grails:grails-gsp\" " )
112112
113113 where :
114- applicationType << [ApplicationType . WEB , ApplicationType . WEB_PLUGIN ]
114+ applicationType << [ApplicationType . WEB ]
115+ }
116+
117+ @Unroll
118+ void " test grails-plugin gradle plugins and dependencies are present for #applicationType application" () {
119+ when :
120+ final def output = generate(applicationType, new Options (TestFramework . SPOCK ))
121+ final String build = output[' build.gradle' ]
122+
123+ then :
124+ build. contains(' apply plugin: "org.apache.grails.gradle.grails-plugin"' )
125+ build. contains(' apply plugin: "org.apache.grails.gradle.grails-gsp"' )
126+ build. contains(" implementation \" org.apache.grails:grails-gsp\" " )
127+
128+ where :
129+ applicationType << [ApplicationType . WEB_PLUGIN ]
115130 }
116131
117132 @Unroll
Original file line number Diff line number Diff line change 3535 - plugin
3636 excludes :
3737 - war
38+ - org.apache.grails.gradle.grails-web
3839
3940
You can’t perform that action at this time.
0 commit comments