Skip to content

Commit

Permalink
make grails-wrapper a default feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfredley committed Oct 31, 2024
1 parent 3434332 commit 1d4a33c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,21 @@
import org.grails.forge.application.ApplicationType;
import org.grails.forge.application.OperatingSystem;
import org.grails.forge.application.generator.GeneratorContext;
import org.grails.forge.feature.Category;
import org.grails.forge.feature.DefaultFeature;
import org.grails.forge.feature.Feature;
import org.grails.forge.options.Options;
import org.grails.forge.template.BinaryTemplate;

import java.util.Set;

@Singleton
public class GrailsWrapper implements GrailsWrapperFeature {
public class GrailsWrapper implements DefaultFeature {

@Override
public boolean shouldApply(ApplicationType applicationType, Options options, Set<Feature> selectedFeatures) {
return true;
}

@Override
public String getName() {
Expand All @@ -41,7 +52,7 @@ public String getDescription() {

@Override
public boolean isVisible() {
return true;
return false;
}

@Override
Expand All @@ -59,4 +70,9 @@ public void apply(GeneratorContext generatorContext) {
public boolean supports(ApplicationType applicationType) {
return true;
}

@Override
public String getCategory() {
return Category.DEV_TOOLS;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GrailsWrapperSpec extends ApplicationContextSpec implements CommandOutputF
@Unroll
void "test grails-wrapper.jar, grailsw and grailsw.bat files are present for #applicationType application"() {
when:
def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ['grails-wrapper'])
def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11))

then:
output.containsKey("grails-wrapper.jar")
Expand Down

0 comments on commit 1d4a33c

Please sign in to comment.