I cannot find anywhere what are the differences between internal and gradle. (I can find info about gradle, but unfortunately not about internal)
Can someone write pros and cons and which one is better to use, or it depends on app you are creating?
Gradle is an Android build system that automates a number of build processes and prevents many common build errors. In Unity, Gradle reduces the method reference count in DEX (Dalvik Executable format) files, which means you are less likely to come across DEX limit problems. Unity uses Gradle for all Android builds.
In software engineering, a unity build (also known as unified build or jumbo build) is a method used in C and C++ software development to speed up the compilation of projects by combining multiple translation units into a single one, usually achieved by using include directives to bundle multiple source files into one ...
Every Gradle build is composed of at least one project (e.g. a library JAR, a Java application, a web application). Each project is made up of one or more tasks. A task represents some atomic piece of work that a build performs.
Import a Gradle-based IntelliJ project If you are already using Gradle with your IntelliJ project, you can open it in Android Studio using the following steps: Click File > New > Import Project. Select your IntelliJ project directory, and click OK. Your project will open in Android Studio.
The Internal(Default) is used to build and even run your Unity Project on Android from the Editor. This can be done with the Build And Run button.
The Gradle(New) option gives you extra option to export your Unity project into Android Studio project if the Export Project option is checked. The Export Project option can only be checked when Gradle(New) is selected. Gradle(New) option is mostly useful for the Android platform only.
Another advantage of Gradle(New) is that it allows you to specify your own gradle file to build your Unity Project. Just name the gradle file "mainTemplate.gradle" and put it in the <ProjectName>Assets\Plugins\Android
directory.
In the old days, to use gradle file in your build, you must export the Unity Project as Android Project then use a third party software like Android Studio or Eclipse to add gradle support to your app. The Gradle(New) made that easier. You can now do that without exporting the project at-all with the Gradle(New) option.
Gradle is build system which automates a number of build processes. This automation means that many common build errors are less likely to occur. Most notably in Unity, it reduces the method reference count in DEX (Dalvik Executable format) files, meaning that you are less likely to come across DEX limit problems. However, due to the differences between Gradle and the default Unity Android build system, some existing projects may be hard to convert to Gradle.
You can either build the output package (APK) using the Gradle build system in Unity, or export the Gradle project and build it in an external tool (such as Android Studio).
To learn more, see Gradle’s resources on Getting Started with Gradle for Android Build. Internal Build is old system that used by unity technology to build the apk file The Internal build system creates an APK by invoking Android SDK utilities in a specific order. Unity automatically performs a number of steps to create the APK, including:
For more information about OBB files, see Unity documentation on OBB Support. For more information about the Android Manifest, see Unity Android Manifest documentation.
One recent and very major difference since Unity 2019.1.0b1 is that the internal build system is no longer supported!
Android: Remove internal build system
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With