10.1.8.1 Getting Started - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.3
10.1.8.1 Getting Started
If you are using the REST or AngularJS profiles then the JSON views plugin will already be included and you can skip the remainder of this section. Otherwise you will need to modify yourbuild.gradle
to include the necessary plugin to activate JSON views:compile 'org.grails.plugins:views-json:1.0.0' // or whatever is the latest version
Tip: The source code repository for JSON views can be found on Github if you are looking for more documentation and contributionsIn order to compile JSON views for production deployment you should also activate the Gradle plugin by first modifying the
buildscript
block:buildscript {
…
dependencies {
…
classpath "org.grails.plugins:views-gradle:1.0.0"
}
}
org.grails.plugins.views-json
Gradle plugin after any Grails core gradle plugins:… apply plugin: "org.grails.grails-web" apply plugin: "org.grails.plugins.views-json"
compileGsonViews
task to Gradle, which is invoked prior to creating the production JAR or WAR file.