////
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.
////

The `create-app` command is available in both the Grails Shell CLI and the Forge CLI.

- Use `grails create-app myapp` to generate a default project using the Grails Shell CLI. This is the most common usage.
- Use `grails -t forge create-app myapp` to access advanced application generation options such as `--jdk`, `--gorm`, and other Forge-only flags.

The example below assumes you are using the Forge CLI, which is solely intended for **application generation**. It does not support running, building, or managing a Grails application.

When you create a new project with the link:{commandLineRef}create-app.html[create-app] command in the Forge CLI (`grails -t forge create-app`), a default `build.gradle` is generated for you.

[source,groovy]
----
plugins {
    id "groovy"
    id "war"
    id "idea"
    id "eclipse"
}

apply plugin: "cloud.wondrify.asset-pipeline"
apply plugin: "org.apache.grails.gradle.grails-web"
apply plugin: "org.apache.grails.gradle.grails-gsp"
----

The default plugins are as follows:

* `groovy` - The Groovy plugin adds support for Groovy projects. It can handle Groovy code mixed with Java. Read More: https://docs.gradle.org/{gradleVersion}/userguide/groovy_plugin.html[The Groovy Plugin]
* `war` - The https://docs.gradle.org/{gradleVersion}/userguide/war_plugin.html[WAR plugin] changes the packaging so that Gradle creates a WAR file. You can comment out this plugin to build a runnable JAR file for standalone deployment.
* `idea` - The IDEA plugin generates files used by https://www.jetbrains.com/idea/[IntelliJ IDEA], allowing the project to be opened from IDEA. Read More: https://docs.gradle.org/{gradleVersion}/userguide/idea_plugin.html[The IDEA Plugin]
* `eclipse` - The Eclipse plugins generate files for the https://eclipseide.org/[Eclipse IDE], enabling project import (File - Import... - Existing Projects into Workspace). Read More: https://docs.gradle.org/{gradleVersion}/userguide/eclipse_plugin.html[The Eclipse Plugin]
* `asset-pipeline` - The https://github.com/wondrify/asset-pipeline[Asset Pipeline] plugin enables compilation of static assets (JavaScript, CSS, etc.)

Many of these are built-in plugins provided by Gradle or third-party plugins. The Gradle plugins that Grails provides are as follows:

* `org.apache.grails.gradle.grails-app` - Marks the project as a Grails application
* `org.apache.grails.gradle.grails-docs` - Adds Grails doc publishing support
* `org.apache.grails.gradle.grails-gsp` - Adds support for compiling Groovy Server Pages (GSP)
* `org.apache.grails.gradle.grails-gson` - Adds support for compiling JSON Views (GSON)
* `org.apache.grails.gradle.grails-markup` - Adds support for compiling Markup Views (XML)
* `org.apache.grails.gradle.grails-plugin` - Marks the project as a Grails plugin
* `org.apache.grails.gradle.grails-web` - Adds the web URL mappings report to the Gradle project
* `org.apache.grails.gradle.grails-publish` - Assists in publishing to Maven or Nexus repositories
* `org.apache.grails.gradle.grails-profile` - Marks the project as a Grails profile
* `org.apache.grails.gradle.grails-publish-profile` - Adds support for publishing Grails Profiles