Skip to content

Commit 768fb04

Browse files
committed
[chore] Correct docs with apply and dependencies for gsp and gson
1 parent 35102c5 commit 768fb04

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

grails-doc/src/en/guide/theWebLayer/gson/jsonInstallation.adoc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ specific language governing permissions and limitations
1717
under the License.
1818
////
1919

20-
To activate JSON views, add the following dependency to the `dependencies` block of your `build.gradle`:
20+
To activate JSON views, add the following dependency to the `dependencies` block of your `build.gradle`, if you use the Grails BOM:
21+
22+
[source,groovy]
23+
implementation "org.apache.grails:grails-views-gson"
24+
25+
otherwise add version information
2126

2227
[source,groovy,subs="attributes"]
23-
compile "org.apache.grails:grails-views-gson:{version}"
28+
implementation "org.apache.grails:grails-views-gson:{version}"
2429

2530
To enable Gradle compilation of JSON views for production environment add the following to the `buildscript` `dependencies` block:
2631

@@ -29,16 +34,16 @@ buildscript {
2934
...
3035
dependencies {
3136
...
32-
classpath "org.apache.grails:grails-gradle-bom:{version}"
37+
classpath platform("org.apache.grails:grails-gradle-bom:{version}")
3338
classpath "org.apache.grails:grails-gradle-plugins"
3439
}
3540
}
3641

37-
Then apply the `org.apache.grails.grails-views-gson` Gradle plugin after any Grails core gradle plugins:
42+
Then apply the `org.apache.grails.gradle.grails-gson` Gradle plugin after any Grails core gradle plugins:
3843

3944
[source,groovy]
4045
...
41-
apply plugin: "org.apache.grails:grails-web"
42-
apply plugin: "org.apache.grails.grails-views-gson"
46+
apply plugin: "org.apache.grails.gradle.grails-web"
47+
apply plugin: "org.apache.grails.gradle.grails-gson"
4348

4449
This will add a `compileGsonViews` task to Gradle that is executed when producing a JAR or WAR file.

grails-doc/src/en/guide/theWebLayer/gsp.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In addition, for production compilation you should apply the `grails-gsp` Gradle
3737
[source,groovy]
3838
.build.gradle
3939
----
40-
apply plugin: "org.apache.grails:grails-gsp"
40+
apply plugin: "org.apache.grails.gradle.grails-gsp"
4141
----
4242

4343
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:

0 commit comments

Comments
 (0)