This is an automated email from the ASF dual-hosted git repository. jamesfredley pushed a commit to branch use-webjar-jquery-bootstrap in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit ca3f0832056cd531149a512d7d222a9a43a476e5 Author: James Fredley <[email protected]> AuthorDate: Thu Apr 24 17:23:06 2025 -0400 use webjars dependencies to provide jquery and bootstrap js libraries --- gradle/webjar-asset-pipeline-config.gradle | 30 ++++++++++++++++++++++ .../examples/grails3-neo4j-hibernate/build.gradle | 8 ++++++ .../grails-app/assets/javascripts/application.js | 2 +- .../examples/grails3-neo4j/build.gradle | 8 ++++++ .../grails-app/assets/javascripts/application.js | 2 +- grails-test-examples/app1/build.gradle | 2 ++ .../grails-app/assets/javascripts/application.js | 2 +- grails-test-examples/app2/build.gradle | 2 ++ .../grails-app/assets/javascripts/application.js | 2 +- grails-test-examples/demo33/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 4 +-- .../grails-app/assets/stylesheets/application.css | 2 +- grails-test-examples/geb/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 5 ++-- .../grails-app/assets/stylesheets/application.css | 2 +- grails-test-examples/gsp-sitemesh3/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 5 ++-- .../grails-app/assets/stylesheets/application.css | 2 +- .../grails-database-per-tenant/build.gradle | 3 +++ .../grails-app/assets/javascripts/application.js | 2 +- .../hibernate5/grails-hibernate/build.gradle | 3 +++ .../grails-app/assets/javascripts/application.js | 2 +- .../grails-partitioned-multi-tenancy/build.gradle | 3 +++ .../grails-app/assets/javascripts/application.js | 2 +- .../grails-schema-per-tenant/build.gradle | 3 +++ .../grails-app/assets/javascripts/application.js | 2 +- .../hibernate5/issue450/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 5 ++-- .../grails-app/assets/stylesheets/application.css | 2 +- grails-test-examples/hyphenated/build.gradle | 7 +++-- .../grails-app/assets/javascripts/application.js | 2 +- grails-test-examples/issue-11102/build.gradle | 5 ++++ .../grails-app/assets/javascripts/application.js | 4 +-- .../grails-app/assets/stylesheets/application.css | 2 +- grails-test-examples/micronaut/build.gradle | 9 ++++++- .../grails-app/assets/javascripts/application.js | 5 ++-- .../grails-app/assets/stylesheets/application.css | 2 +- grails-test-examples/mongodb/base/build.gradle | 5 +++- .../grails-app/assets/javascripts/application.js | 2 +- .../mongodb/database-per-tenant/build.gradle | 6 ++++- .../grails-app/assets/javascripts/application.js | 2 +- .../mongodb/gson-templates/build.gradle | 6 ++++- .../grails-app/assets/javascripts/application.js | 2 +- .../mongodb/hibernate5/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 2 +- grails-test-examples/namespaces/build.gradle | 3 +++ .../grails-app/assets/javascripts/application.js | 2 +- .../views-functional-tests/build.gradle | 4 +++ .../grails-app/assets/javascripts/application.js | 2 +- 49 files changed, 154 insertions(+), 43 deletions(-) diff --git a/gradle/webjar-asset-pipeline-config.gradle b/gradle/webjar-asset-pipeline-config.gradle new file mode 100644 index 0000000000..4c20a0a795 --- /dev/null +++ b/gradle/webjar-asset-pipeline-config.gradle @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +assets { + excludes = [ + 'webjars/jquery/**', + 'webjars/bootstrap/**', + ] + includes = [ + 'webjars/jquery/*/dist/jquery.js', + 'webjars/bootstrap/*/dist/js/bootstrap.bundle.js', + 'webjars/bootstrap/*/dist/css/bootstrap.css', + ] +} \ No newline at end of file diff --git a/grails-data-neo4j/examples/grails3-neo4j-hibernate/build.gradle b/grails-data-neo4j/examples/grails3-neo4j-hibernate/build.gradle index bcce3b5059..3acbe7bcd5 100644 --- a/grails-data-neo4j/examples/grails3-neo4j-hibernate/build.gradle +++ b/grails-data-neo4j/examples/grails3-neo4j-hibernate/build.gradle @@ -23,6 +23,8 @@ configurations.configureEach { } dependencies { + implementation platform(project(':grails-bom')) + implementation "org.springframework.boot:spring-boot-starter-logging" implementation "org.springframework.boot:spring-boot-autoconfigure" implementation "org.springframework.boot:spring-boot-starter-actuator" @@ -36,6 +38,8 @@ dependencies { implementation "org.apache.grails:grails-data-hibernate5:$hibernateDatastoreVersion" implementation "org.hibernate:hibernate-ehcache:$hibernateEhcacheVersion" + implementation 'org.webjars.npm:jquery' + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion" runtimeOnly "org.apache.grails:grails-scaffolding:$scaffoldingVersion" runtimeOnly "org.apache.grails:grails-fields:$fieldsVersion" @@ -80,3 +84,7 @@ webdriverBinaries { geckodriver "$geckodriverVersion" } } + +apply { + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-data-neo4j/examples/grails3-neo4j-hibernate/grails-app/assets/javascripts/application.js b/grails-data-neo4j/examples/grails3-neo4j-hibernate/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-data-neo4j/examples/grails3-neo4j-hibernate/grails-app/assets/javascripts/application.js +++ b/grails-data-neo4j/examples/grails3-neo4j-hibernate/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-data-neo4j/examples/grails3-neo4j/build.gradle b/grails-data-neo4j/examples/grails3-neo4j/build.gradle index c74d7dd355..75ccb6b78e 100644 --- a/grails-data-neo4j/examples/grails3-neo4j/build.gradle +++ b/grails-data-neo4j/examples/grails3-neo4j/build.gradle @@ -23,6 +23,8 @@ configurations.configureEach { } dependencies { + implementation platform(project(':grails-bom')) + implementation "org.springframework.boot:spring-boot-starter-logging" implementation "org.springframework.boot:spring-boot-autoconfigure" implementation "org.springframework.boot:spring-boot-starter-actuator" @@ -34,6 +36,8 @@ dependencies { implementation project(":grails-plugin") + implementation 'org.webjars.npm:jquery' + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion" runtimeOnly "org.apache.grails:grails-scaffolding:$scaffoldingVersion" runtimeOnly "org.apache.grails:grails-fields:$fieldsVersion" @@ -82,4 +86,8 @@ webdriverBinaries { chromedriver "$chromeDriverVersion" geckodriver "$geckodriverVersion" } +} + +apply { + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-data-neo4j/examples/grails3-neo4j/grails-app/assets/javascripts/application.js b/grails-data-neo4j/examples/grails3-neo4j/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-data-neo4j/examples/grails3-neo4j/grails-app/assets/javascripts/application.js +++ b/grails-data-neo4j/examples/grails3-neo4j/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/app1/build.gradle b/grails-test-examples/app1/build.gradle index 04f7108807..3d56ce7285 100644 --- a/grails-test-examples/app1/build.gradle +++ b/grails-test-examples/app1/build.gradle @@ -56,6 +56,7 @@ dependencies { implementation 'org.apache.grails:grails-data-hibernate5' implementation 'org.apache.grails:grails-cache' implementation 'org.apache.grails:grails-scaffolding' + implementation 'org.webjars.npm:jquery' runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.apache.grails:grails-fields' @@ -92,4 +93,5 @@ test { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/app1/grails-app/assets/javascripts/application.js b/grails-test-examples/app1/grails-app/assets/javascripts/application.js index 930026c96c..a0df02681e 100644 --- a/grails-test-examples/app1/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/app1/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/app2/build.gradle b/grails-test-examples/app2/build.gradle index 27cf34ea10..69e2beb690 100644 --- a/grails-test-examples/app2/build.gradle +++ b/grails-test-examples/app2/build.gradle @@ -53,6 +53,7 @@ dependencies { implementation 'org.apache.grails:grails-data-hibernate5' implementation 'org.apache.grails:grails-cache' + implementation 'org.webjars.npm:jquery' runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.apache.grails:grails-scaffolding' @@ -69,4 +70,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/app2/grails-app/assets/javascripts/application.js b/grails-test-examples/app2/grails-app/assets/javascripts/application.js index 930026c96c..a0df02681e 100644 --- a/grails-test-examples/app2/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/app2/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/demo33/build.gradle b/grails-test-examples/demo33/build.gradle index 5d559555d0..d438a6efd3 100644 --- a/grails-test-examples/demo33/build.gradle +++ b/grails-test-examples/demo33/build.gradle @@ -57,6 +57,9 @@ dependencies { implementation 'org.apache.grails:grails-data-hibernate5' implementation 'org.apache.grails:grails-views-gson' + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -75,4 +78,5 @@ tasks.named('compileTestGroovy').configure { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/demo33/grails-app/assets/javascripts/application.js b/grails-test-examples/demo33/grails-app/assets/javascripts/application.js index 5c6a18d085..cf2c4a86ec 100644 --- a/grails-test-examples/demo33/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/demo33/grails-app/assets/javascripts/application.js @@ -5,8 +5,8 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.2.0.min -//= require bootstrap +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_tree . //= require_self diff --git a/grails-test-examples/demo33/grails-app/assets/stylesheets/application.css b/grails-test-examples/demo33/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/demo33/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/demo33/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/geb/build.gradle b/grails-test-examples/geb/build.gradle index 880de7afeb..0a093391c6 100644 --- a/grails-test-examples/geb/build.gradle +++ b/grails-test-examples/geb/build.gradle @@ -66,6 +66,9 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-tomcat' implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'org.apache.tomcat:tomcat-jdbc' @@ -85,4 +88,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/geb/grails-app/assets/javascripts/application.js b/grails-test-examples/geb/grails-app/assets/javascripts/application.js index 6f6ef0b59e..1596219b1d 100644 --- a/grails-test-examples/geb/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/geb/grails-app/assets/javascripts/application.js @@ -5,7 +5,6 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-3.5.1.min -//= require popper.min -//= require bootstrap +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_self diff --git a/grails-test-examples/geb/grails-app/assets/stylesheets/application.css b/grails-test-examples/geb/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/geb/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/geb/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/gsp-sitemesh3/build.gradle b/grails-test-examples/gsp-sitemesh3/build.gradle index 2a9104b49c..bc610676bd 100644 --- a/grails-test-examples/gsp-sitemesh3/build.gradle +++ b/grails-test-examples/gsp-sitemesh3/build.gradle @@ -50,6 +50,9 @@ dependencies { implementation 'org.apache.grails:grails-controllers' implementation 'org.apache.grails:grails-rest-transforms' + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'org.apache.grails:grails-gsp' runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.fusesource.jansi:jansi' @@ -71,4 +74,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/gsp-sitemesh3/grails-app/assets/javascripts/application.js b/grails-test-examples/gsp-sitemesh3/grails-app/assets/javascripts/application.js index 6f6ef0b59e..1596219b1d 100644 --- a/grails-test-examples/gsp-sitemesh3/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/gsp-sitemesh3/grails-app/assets/javascripts/application.js @@ -5,7 +5,6 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-3.5.1.min -//= require popper.min -//= require bootstrap +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_self diff --git a/grails-test-examples/gsp-sitemesh3/grails-app/assets/stylesheets/application.css b/grails-test-examples/gsp-sitemesh3/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/gsp-sitemesh3/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/gsp-sitemesh3/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/hibernate5/grails-database-per-tenant/build.gradle b/grails-test-examples/hibernate5/grails-database-per-tenant/build.gradle index f30e1183ce..2bb1ec841f 100644 --- a/grails-test-examples/hibernate5/grails-database-per-tenant/build.gradle +++ b/grails-test-examples/hibernate5/grails-database-per-tenant/build.gradle @@ -34,6 +34,8 @@ dependencies { implementation 'org.apache.grails:grails-rest-transforms' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -53,4 +55,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } diff --git a/grails-test-examples/hibernate5/grails-database-per-tenant/grails-app/assets/javascripts/application.js b/grails-test-examples/hibernate5/grails-database-per-tenant/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/hibernate5/grails-database-per-tenant/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hibernate5/grails-database-per-tenant/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/hibernate5/grails-hibernate/build.gradle b/grails-test-examples/hibernate5/grails-hibernate/build.gradle index bdfd55e928..5832010d56 100644 --- a/grails-test-examples/hibernate5/grails-hibernate/build.gradle +++ b/grails-test-examples/hibernate5/grails-hibernate/build.gradle @@ -36,6 +36,8 @@ dependencies { implementation 'org.apache.grails:grails-rest-transforms' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -64,4 +66,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/hibernate5/grails-hibernate/grails-app/assets/javascripts/application.js b/grails-test-examples/hibernate5/grails-hibernate/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/hibernate5/grails-hibernate/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hibernate5/grails-hibernate/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/build.gradle b/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/build.gradle index cf3d1be978..8634d03137 100644 --- a/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/build.gradle +++ b/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/build.gradle @@ -34,6 +34,8 @@ dependencies { implementation 'org.apache.grails:grails-rest-transforms' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -52,4 +54,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/grails-app/assets/javascripts/application.js b/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hibernate5/grails-partitioned-multi-tenancy/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/hibernate5/grails-schema-per-tenant/build.gradle b/grails-test-examples/hibernate5/grails-schema-per-tenant/build.gradle index a2d19fa2d2..bca03c32d4 100644 --- a/grails-test-examples/hibernate5/grails-schema-per-tenant/build.gradle +++ b/grails-test-examples/hibernate5/grails-schema-per-tenant/build.gradle @@ -34,6 +34,8 @@ dependencies { implementation 'org.apache.grails:grails-rest-transforms' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -52,4 +54,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/hibernate5/grails-schema-per-tenant/grails-app/assets/javascripts/application.js b/grails-test-examples/hibernate5/grails-schema-per-tenant/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/hibernate5/grails-schema-per-tenant/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hibernate5/grails-schema-per-tenant/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/hibernate5/issue450/build.gradle b/grails-test-examples/hibernate5/issue450/build.gradle index 072b6177bd..ab3bbf6747 100644 --- a/grails-test-examples/hibernate5/issue450/build.gradle +++ b/grails-test-examples/hibernate5/issue450/build.gradle @@ -34,6 +34,9 @@ dependencies { implementation 'org.apache.grails:grails-rest-transforms' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -56,4 +59,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/hibernate5/issue450/grails-app/assets/javascripts/application.js b/grails-test-examples/hibernate5/issue450/grails-app/assets/javascripts/application.js index 658aeb3c6d..1596219b1d 100644 --- a/grails-test-examples/hibernate5/issue450/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hibernate5/issue450/grails-app/assets/javascripts/application.js @@ -5,7 +5,6 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-3.3.1.min -//= require bootstrap -//= require popper.min +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_self diff --git a/grails-test-examples/hibernate5/issue450/grails-app/assets/stylesheets/application.css b/grails-test-examples/hibernate5/issue450/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/hibernate5/issue450/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/hibernate5/issue450/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/hyphenated/build.gradle b/grails-test-examples/hyphenated/build.gradle index e44b809a8c..adbfb0d5bd 100644 --- a/grails-test-examples/hyphenated/build.gradle +++ b/grails-test-examples/hyphenated/build.gradle @@ -52,6 +52,9 @@ dependencies { implementation 'org.apache.grails:grails-web-boot' implementation 'org.apache.grails:grails-data-hibernate5' + + implementation 'org.webjars.npm:jquery' + runtimeOnly "org.hibernate:hibernate-ehcache:$hibernate5Version", { // exclude javax variant of hibernate-core exclude group: 'org.hibernate', module: 'hibernate-core' @@ -78,5 +81,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') -} - + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-test-examples/hyphenated/grails-app/assets/javascripts/application.js b/grails-test-examples/hyphenated/grails-app/assets/javascripts/application.js index 930026c96c..a0df02681e 100644 --- a/grails-test-examples/hyphenated/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/hyphenated/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/issue-11102/build.gradle b/grails-test-examples/issue-11102/build.gradle index 6bbc071902..0cf472fda5 100644 --- a/grails-test-examples/issue-11102/build.gradle +++ b/grails-test-examples/issue-11102/build.gradle @@ -62,6 +62,10 @@ dependencies { implementation 'org.apache.grails:grails-scaffolding' implementation 'org.apache.grails:grails-events' implementation 'org.apache.grails:grails-gsp' + + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + console 'org.apache.grails:grails-console' profile 'org.grails.profiles:web' runtimeOnly 'com.h2database:h2' @@ -91,4 +95,5 @@ bootRun { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/issue-11102/grails-app/assets/javascripts/application.js b/grails-test-examples/issue-11102/grails-app/assets/javascripts/application.js index 5c6a18d085..cf2c4a86ec 100644 --- a/grails-test-examples/issue-11102/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/issue-11102/grails-app/assets/javascripts/application.js @@ -5,8 +5,8 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.2.0.min -//= require bootstrap +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_tree . //= require_self diff --git a/grails-test-examples/issue-11102/grails-app/assets/stylesheets/application.css b/grails-test-examples/issue-11102/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/issue-11102/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/issue-11102/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/micronaut/build.gradle b/grails-test-examples/micronaut/build.gradle index 10197ea7cc..3ffe053392 100644 --- a/grails-test-examples/micronaut/build.gradle +++ b/grails-test-examples/micronaut/build.gradle @@ -49,6 +49,8 @@ configurations { } dependencies { + implementation platform(project(':grails-bom')) + developmentOnly('org.springframework.boot:spring-boot-devtools') implementation 'org.springframework.boot:spring-boot-starter-logging' implementation 'org.springframework.boot:spring-boot-autoconfigure' @@ -70,6 +72,10 @@ dependencies { implementation 'org.apache.grails:grails-data-hibernate5' implementation 'org.apache.grails:grails-gsp' compileOnly 'io.micronaut:micronaut-inject-groovy' + + implementation 'org.webjars.npm:bootstrap' + implementation 'org.webjars.npm:jquery' + console 'org.apache.grails:grails-console' profile 'org.grails.profiles:web' runtimeOnly 'com.h2database:h2' @@ -102,4 +108,5 @@ tasks.named('assetCompile').configure { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') -} + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-test-examples/micronaut/grails-app/assets/javascripts/application.js b/grails-test-examples/micronaut/grails-app/assets/javascripts/application.js index 658aeb3c6d..1596219b1d 100644 --- a/grails-test-examples/micronaut/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/micronaut/grails-app/assets/javascripts/application.js @@ -5,7 +5,6 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-3.3.1.min -//= require bootstrap -//= require popper.min +//= require webjars/jquery/3.7.1/dist/jquery.js +//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle //= require_self diff --git a/grails-test-examples/micronaut/grails-app/assets/stylesheets/application.css b/grails-test-examples/micronaut/grails-app/assets/stylesheets/application.css index 1889054bc6..e84b2cb991 100644 --- a/grails-test-examples/micronaut/grails-app/assets/stylesheets/application.css +++ b/grails-test-examples/micronaut/grails-app/assets/stylesheets/application.css @@ -7,7 +7,7 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * -*= require bootstrap +*= require webjars/bootstrap/5.3.3/dist/css/bootstrap *= require grails *= require main *= require mobile diff --git a/grails-test-examples/mongodb/base/build.gradle b/grails-test-examples/mongodb/base/build.gradle index 630c69e25a..ecaafe795f 100644 --- a/grails-test-examples/mongodb/base/build.gradle +++ b/grails-test-examples/mongodb/base/build.gradle @@ -34,6 +34,8 @@ dependencies { implementation 'org.apache.grails:grails-web-boot' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.fusesource.jansi:jansi' runtimeOnly 'org.apache.grails:grails-i18n' @@ -57,4 +59,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') -} + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-test-examples/mongodb/base/grails-app/assets/javascripts/application.js b/grails-test-examples/mongodb/base/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/mongodb/base/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/mongodb/base/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/mongodb/database-per-tenant/build.gradle b/grails-test-examples/mongodb/database-per-tenant/build.gradle index 0b81e90bbc..59df7f7e22 100644 --- a/grails-test-examples/mongodb/database-per-tenant/build.gradle +++ b/grails-test-examples/mongodb/database-per-tenant/build.gradle @@ -22,6 +22,7 @@ group = 'examples.mongo.tenant' apply plugin: 'groovy' apply plugin: 'org.apache.grails.gradle.grails-web' +apply plugin: 'asset-pipeline' dependencies { @@ -33,6 +34,8 @@ dependencies { implementation 'org.apache.grails:grails-web-boot' implementation 'org.apache.grails:grails-gsp' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.fusesource.jansi:jansi' runtimeOnly 'org.apache.grails:grails-i18n' @@ -49,4 +52,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') -} + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-test-examples/mongodb/database-per-tenant/grails-app/assets/javascripts/application.js b/grails-test-examples/mongodb/database-per-tenant/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/mongodb/database-per-tenant/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/mongodb/database-per-tenant/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/mongodb/gson-templates/build.gradle b/grails-test-examples/mongodb/gson-templates/build.gradle index 323aaccc6a..e2e0862ab7 100644 --- a/grails-test-examples/mongodb/gson-templates/build.gradle +++ b/grails-test-examples/mongodb/gson-templates/build.gradle @@ -22,6 +22,7 @@ group = 'examples' apply plugin: 'groovy' apply plugin: 'org.apache.grails.gradle.grails-web' +apply plugin: 'asset-pipeline' dependencies { implementation platform(project(':grails-bom')) @@ -36,6 +37,8 @@ dependencies { implementation 'org.apache.grails:grails-url-mappings' implementation 'org.apache.grails.data:grails-data-mongodb-core' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'org.springframework.boot:spring-boot-autoconfigure' runtimeOnly 'org.springframework.boot:spring-boot-starter-logging' runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat' @@ -49,4 +52,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') -} + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') +} \ No newline at end of file diff --git a/grails-test-examples/mongodb/gson-templates/grails-app/assets/javascripts/application.js b/grails-test-examples/mongodb/gson-templates/grails-app/assets/javascripts/application.js index 77147b1710..795e6cc2ac 100644 --- a/grails-test-examples/mongodb/gson-templates/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/mongodb/gson-templates/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/mongodb/hibernate5/build.gradle b/grails-test-examples/mongodb/hibernate5/build.gradle index 67313d51e6..15235e2520 100644 --- a/grails-test-examples/mongodb/hibernate5/build.gradle +++ b/grails-test-examples/mongodb/hibernate5/build.gradle @@ -22,6 +22,7 @@ group = 'examples' apply plugin: 'groovy' apply plugin: 'org.apache.grails.gradle.grails-web' +apply plugin: 'asset-pipeline' dependencies { @@ -34,6 +35,8 @@ dependencies { implementation 'org.apache.grails:grails-gsp' implementation 'org.apache.grails:grails-data-hibernate5' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.zaxxer:HikariCP' @@ -63,4 +66,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/mongodb/hibernate5/grails-app/assets/javascripts/application.js b/grails-test-examples/mongodb/hibernate5/grails-app/assets/javascripts/application.js index 1a35c7b995..a1c6a339e2 100644 --- a/grails-test-examples/mongodb/hibernate5/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/mongodb/hibernate5/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/namespaces/build.gradle b/grails-test-examples/namespaces/build.gradle index 8c04cfba9f..30b26a6ed1 100644 --- a/grails-test-examples/namespaces/build.gradle +++ b/grails-test-examples/namespaces/build.gradle @@ -54,6 +54,8 @@ dependencies { implementation 'org.apache.grails:grails-data-hibernate5' implementation 'org.apache.grails:grails-cache' + implementation 'org.webjars.npm:jquery' + runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' runtimeOnly 'org.apache.grails:grails-scaffolding' runtimeOnly 'org.apache.grails:grails-fields' @@ -70,4 +72,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/namespaces/grails-app/assets/javascripts/application.js b/grails-test-examples/namespaces/grails-app/assets/javascripts/application.js index 930026c96c..a0df02681e 100644 --- a/grails-test-examples/namespaces/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/namespaces/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self diff --git a/grails-test-examples/views-functional-tests/build.gradle b/grails-test-examples/views-functional-tests/build.gradle index 08c14b73c2..44187e22c1 100644 --- a/grails-test-examples/views-functional-tests/build.gradle +++ b/grails-test-examples/views-functional-tests/build.gradle @@ -22,6 +22,7 @@ plugins { id 'groovy' id 'org.apache.grails.gradle.grails-gsp' id 'org.apache.grails.gradle.grails-web' + id 'asset-pipeline' } version = "0.0.1" @@ -53,6 +54,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-logging' implementation 'org.springframework.boot:spring-boot-starter-tomcat' + implementation 'org.webjars.npm:jquery' + compileOnly 'org.slf4j:slf4j-api' // Provided by Tomcat runtimeOnly 'com.h2database:h2' @@ -70,4 +73,5 @@ dependencies { apply { from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') from rootProject.layout.projectDirectory.file('gradle/java-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/webjar-asset-pipeline-config.gradle') } \ No newline at end of file diff --git a/grails-test-examples/views-functional-tests/grails-app/assets/javascripts/application.js b/grails-test-examples/views-functional-tests/grails-app/assets/javascripts/application.js index 77147b1710..795e6cc2ac 100644 --- a/grails-test-examples/views-functional-tests/grails-app/assets/javascripts/application.js +++ b/grails-test-examples/views-functional-tests/grails-app/assets/javascripts/application.js @@ -5,7 +5,7 @@ // You're free to add application-wide JavaScript to this file, but it's generally better // to create separate JavaScript files as needed. // -//= require jquery-2.1.3.js +//= require webjars/jquery/3.7.1/dist/jquery.js //= require_tree . //= require_self
