File tree Expand file tree Collapse file tree 4 files changed +28
-33
lines changed
main/java/org/grails/forge/feature
test/groovy/org/grails/forge/feature/assetPipeline Expand file tree Collapse file tree 4 files changed +28
-33
lines changed Original file line number Diff line number Diff line change 2525import org .grails .forge .feature .Category ;
2626import org .grails .forge .feature .DefaultFeature ;
2727import org .grails .forge .feature .Feature ;
28- import org .grails .forge .feature .assetPipeline .templates .assetPipelineExtension ;
2928import org .grails .forge .options .Options ;
30- import org .grails .forge .template .RockerWritable ;
3129import org .grails .forge .template .URLTemplate ;
32- import org .grails .forge .util .VersionInfo ;
3330
3431import java .util .Set ;
3532
@@ -61,13 +58,13 @@ public String getDescription() {
6158
6259 @ Override
6360 public void apply (GeneratorContext generatorContext ) {
64- generatorContext .addBuildPlugin (GradlePlugin .builder ()
65- .id ("com.bertramlabs.asset-pipeline" )
66- .extension (new RockerWritable (assetPipelineExtension .template (generatorContext .getApplicationType ())))
67- .version ("$assetPipelineGradleVersion" )
68- .build ());
6961
70- generatorContext .getBuildProperties ().put ("assetPipelineGradleVersion" , VersionInfo .getBomVersion ("asset-pipeline-gradle" ));
62+ generatorContext .addBuildscriptDependency (Dependency .builder ()
63+ .groupId ("com.bertramlabs.plugins" )
64+ .artifactId ("asset-pipeline-gradle" )
65+ .buildSrc ());
66+
67+ generatorContext .addBuildPlugin (GradlePlugin .builder ().id ("asset-pipeline" ).useApplyPlugin (true ).build ());
7168
7269 generatorContext .addDependency (Dependency .builder ()
7370 .groupId ("com.bertramlabs.plugins" )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -111,3 +111,24 @@ tasks.withType(Test) {
111111}
112112
113113@gradleBuild.renderExtensions()
114+
115+ @if(features.contains("asset-pipeline-grails")) {
116+ assets {
117+ @if (applicationType == ApplicationType.WEB_PLUGIN) {
118+ packagePlugin = true
119+ }
120+ excludes = [
121+ 'webjars/jquery/**',
122+ 'webjars/bootstrap/**',
123+ 'webjars/bootstrap-icons/**'
124+ ]
125+ includes = [
126+ 'webjars/jquery/*/dist/jquery.js',
127+ 'webjars/bootstrap/*/dist/js/bootstrap.bundle.js',
128+ 'webjars/bootstrap/*/dist/css/bootstrap.css',
129+ 'webjars/bootstrap-icons/*/font/bootstrap-icons.css',
130+ 'webjars/bootstrap-icons/*/font/fonts/*',
131+ ]
132+ }
133+
134+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class AssetPipelineSpec extends ApplicationContextSpec implements CommandOutputF
2727 .render()
2828
2929 then :
30- template. contains(" id \" com.bertramlabs. asset-pipeline\" " )
30+ template. contains(" apply plugin: \" asset-pipeline\" " )
3131 template. contains(" runtimeOnly \" com.bertramlabs.plugins:asset-pipeline-grails\" " )
3232 template. contains('''
3333assets {
You can’t perform that action at this time.
0 commit comments