diff --git a/grails-doc/src/en/guide/theWebLayer/gson/jsonInstallation.adoc b/grails-doc/src/en/guide/theWebLayer/gson/jsonInstallation.adoc index 2cdca365a00..7e1ca831855 100644 --- a/grails-doc/src/en/guide/theWebLayer/gson/jsonInstallation.adoc +++ b/grails-doc/src/en/guide/theWebLayer/gson/jsonInstallation.adoc @@ -17,10 +17,17 @@ specific language governing permissions and limitations under the License. //// -To activate JSON views, add the following dependency to the `dependencies` block of your `build.gradle`: +To activate JSON views, add the following dependency to the `dependencies` block of your `build.gradle` file. + +If you use the Grails BOM: + +[source,groovy] +implementation "org.apache.grails:grails-views-gson" + +otherwise, add the version explicitly: [source,groovy,subs="attributes"] -compile "org.apache.grails:grails-views-gson:{version}" +implementation "org.apache.grails:grails-views-gson:{version}" To enable Gradle compilation of JSON views for production environment add the following to the `buildscript` `dependencies` block: @@ -29,16 +36,16 @@ buildscript { ... dependencies { ... - classpath "org.apache.grails:grails-gradle-bom:{version}" + classpath platform("org.apache.grails:grails-gradle-bom:{version}") classpath "org.apache.grails:grails-gradle-plugins" } } -Then apply the `org.apache.grails.grails-views-gson` Gradle plugin after any Grails core gradle plugins: +Then apply the `org.apache.grails.gradle.grails-gson` Gradle plugin after any Grails core gradle plugins: [source,groovy] ... -apply plugin: "org.apache.grails:grails-web" -apply plugin: "org.apache.grails.grails-views-gson" +apply plugin: "org.apache.grails.gradle.grails-web" +apply plugin: "org.apache.grails.gradle.grails-gson" This will add a `compileGsonViews` task to Gradle that is executed when producing a JAR or WAR file. diff --git a/grails-doc/src/en/guide/theWebLayer/gsp.adoc b/grails-doc/src/en/guide/theWebLayer/gsp.adoc index ac84112fd60..d7fc1e78203 100644 --- a/grails-doc/src/en/guide/theWebLayer/gsp.adoc +++ b/grails-doc/src/en/guide/theWebLayer/gsp.adoc @@ -37,7 +37,7 @@ In addition, for production compilation you should apply the `grails-gsp` Gradle [source,groovy] .build.gradle ---- -apply plugin: "org.apache.grails:grails-gsp" +apply plugin: "org.apache.grails.gradle.grails-gsp" ---- GSPs live in the `grails-app/views` directory and are typically rendered automatically (by convention) or with the link:{controllersRef}render.html[render] method such as: