
Compatibility with the incremental build pipeline: Unity only runs OnModifyAndroidProjectFiles when its dependencies change which makes it compatible with the incremental build pipeline. This means that, whenever Unity changes its default templates to upgrade to new versions of Gradle, you shouldn’t need to perform substantial upgrade steps. Upgradability: This API will be compatible with future versions of Gradle that contain different file configuration options. The Android Project Configuration Manager is a replacement for Gradle files templates and its benefits are: The entry point for the Android Project Configuration Manager is the OnModifyAndroidProjectFiles method in the AndroidProjectFilesModifier interface. Unity applies the modifications during the build post-process, so you can see what values the Editor sets and change them if you want. You can use the API to modify properties and other values in supported Gradle project file types. The Android Project Configuration Manager is a set of classes that represent Gradle project files in C#. Important: If you use custom Gradle template files, be aware that if you upgrade your Unity project to a version of Unity that uses different default template files, you must rewrite your custom Gradle template files.įor information on how to use this method to modify Gradle project files, refer to Modify Gradle project files with Gradle template files. Gradle merges the manifests from your Android libraries into a final main manifest and makes sure that the final configuration is correct. You can override these templates to control how Unity produces the final files. Unity uses templates to produce the final Gradle project files. The following table shows which methods you can use to modify each Gradle project file. Not every method is compatible with every Gradle project file. Learn about the available methods that you can use to modify the contents of Gradle project files.
However, sometimes you might need more control over the Gradle project files. When Unity builds your project, it takes these configuration options and uses them to generate Gradle project files.
Unity provides Player Settings and Build settings to configure your application.