diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java b/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java index 60b7e7ff..a78c3161 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapper.java @@ -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 selectedFeatures) { + return true; + } @Override public String getName() { @@ -41,7 +52,7 @@ public String getDescription() { @Override public boolean isVisible() { - return true; + return false; } @Override @@ -59,4 +70,9 @@ public void apply(GeneratorContext generatorContext) { public boolean supports(ApplicationType applicationType) { return true; } + + @Override + public String getCategory() { + return Category.DEV_TOOLS; + } } diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapperFeature.java b/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapperFeature.java deleted file mode 100644 index 965c8f98..00000000 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/grailsWrapper/GrailsWrapperFeature.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2017-2024 original authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.grails.forge.feature.grailsWrapper; - -import org.grails.forge.application.ApplicationType; -import org.grails.forge.feature.Category; -import org.grails.forge.feature.OneOfFeature; - -public interface GrailsWrapperFeature extends OneOfFeature { - - @Override - default Class getFeatureClass() { - return GrailsWrapperFeature.class; - } - - @Override - default boolean supports(ApplicationType applicationType) { - return true; - } - - @Override - default String getCategory() { - return Category.DEV_TOOLS; - } -} diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy index 3a7298d0..5311219d 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy @@ -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), ['grails-wrapper']) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-wrapper.jar")