Skip to content

Commit 8cf161f

Browse files
authored
Merge pull request #418 from grails/make-grails-wrapper-default
make grails-wrapper a default feature
2 parents 3434332 + 1d4a33c commit 8cf161f

File tree

3 files changed

+19
-41
lines changed

3 files changed

+19
-41
lines changed

grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@
1919
import org.grails.forge.application.ApplicationType;
2020
import org.grails.forge.application.OperatingSystem;
2121
import org.grails.forge.application.generator.GeneratorContext;
22+
import org.grails.forge.feature.Category;
23+
import org.grails.forge.feature.DefaultFeature;
24+
import org.grails.forge.feature.Feature;
25+
import org.grails.forge.options.Options;
2226
import org.grails.forge.template.BinaryTemplate;
2327

28+
import java.util.Set;
29+
2430
@Singleton
25-
public class GrailsWrapper implements GrailsWrapperFeature {
31+
public class GrailsWrapper implements DefaultFeature {
32+
33+
@Override
34+
public boolean shouldApply(ApplicationType applicationType, Options options, Set<Feature> selectedFeatures) {
35+
return true;
36+
}
2637

2738
@Override
2839
public String getName() {
@@ -41,7 +52,7 @@ public String getDescription() {
4152

4253
@Override
4354
public boolean isVisible() {
44-
return true;
55+
return false;
4556
}
4657

4758
@Override
@@ -59,4 +70,9 @@ public void apply(GeneratorContext generatorContext) {
5970
public boolean supports(ApplicationType applicationType) {
6071
return true;
6172
}
73+
74+
@Override
75+
public String getCategory() {
76+
return Category.DEV_TOOLS;
77+
}
6278
}

grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapperFeature.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class GrailsWrapperSpec extends ApplicationContextSpec implements CommandOutputF
1313
@Unroll
1414
void "test grails-wrapper.jar, grailsw and grailsw.bat files are present for #applicationType application"() {
1515
when:
16-
def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ['grails-wrapper'])
16+
def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11))
1717

1818
then:
1919
output.containsKey("grails-wrapper.jar")

0 commit comments

Comments
 (0)