Skip to content

Commit 795c8ab

Browse files
authored
Merge pull request #15223 from apache/chore/gsp_and_gson_dependencies_and_apply
[chore] Correct docs with apply and dependencies for gsp and gson
2 parents c3f8de4 + 118f9da commit 795c8ab

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@ 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` file.
21+
22+
If you use the Grails BOM:
23+
24+
[source,groovy]
25+
implementation "org.apache.grails:grails-views-gson"
26+
27+
otherwise, add the version explicitly:
2128

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

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

@@ -29,16 +36,16 @@ buildscript {
2936
...
3037
dependencies {
3138
...
32-
classpath "org.apache.grails:grails-gradle-bom:{version}"
39+
classpath platform("org.apache.grails:grails-gradle-bom:{version}")
3340
classpath "org.apache.grails:grails-gradle-plugins"
3441
}
3542
}
3643

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

3946
[source,groovy]
4047
...
41-
apply plugin: "org.apache.grails:grails-web"
42-
apply plugin: "org.apache.grails.grails-views-gson"
48+
apply plugin: "org.apache.grails.gradle.grails-web"
49+
apply plugin: "org.apache.grails.gradle.grails-gson"
4350

4451
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)