Gradle templates reference
Explore the Gradle templates you can use to configure how Unity builds Android applications.
読み終わるまでの所要時間 2 分最終更新 2ヶ月前
Gradle templates configure how to build an Android application using Gradle. Each Gradle template represents a single Gradle project. Gradle projects can include, and depend on, other Gradle projects.
Gradle template files
A Gradle template consists of the following files:
File | Location | Description |
|---|---|---|
| In the exported project, | Specifies configuration information that affects all modules in the final Gradle project, including which Android Gradle Plugin version to use and the locations of Java plugins. These locations are a combination of online repositories and Java plugins inside this project. |
| In the exported project, | Provides instructions for building the Android application, including bundling, signing, and whether to split the APK. Depends on the |
| In the exported project, | Provides instructions for building Unity as a Library, and outputs an .aar file. You can override the Unity template with a custom template in the Unity Editor. For more information, refer to the Modify Gradle project files with Gradle template files. |
| Varies | If an Android Library plug-in doesn't include a |
| In the exported project, | Specifies the names of modules that the Gradle build system should include when it builds the project. You can override the Unity template with a custom template in the Unity Editor. For more information, refer to the Modify Gradle project files with Gradle template files. |
| In the exported project, | Configures the Gradle build system and specifies properties such as the size of the Java virtual machine (JVM) heap. |
To have more control over the Gradle project files that Unity produces, you can override Unity's default Gradle template files. For information on how to do this, refer to Modify Gradle project files with Gradle template files.