to gradle In command line, type gradle hello task hello { description “Hey MADMeetup! Don’t say I like your presentation, love it :D” group “Mumbai Android Developers” doLast { println description println group println “Hello World!” } }
density 2. Configure separate APKs per ABI Create different versions of your app android { splits { // Configures multiple APKs based on screen density. density { // Enables building multiple APKs. enable true exclude "ldpi", "mdpi" // APKs for: //include "hdpi", "xhdpi", "xxhdpi", "xxxhdpi" compatibleScreens 'normal', 'large', 'xlarge' } } } Configure separate APKs per screen density
density 2. Configure separate APKs per ABI Create different versions of your app Configure separate APKs per ABI android { //... splits { abi { // Enables building multiple APKs. enable true reset() include "x86", "armeabi-v7a", "mips" universalApk true } } }
{ // Sets the maximum number of DEX processes // that can be started concurrently. maxProcessCount 8 // Sets the maximum memory allocation pool size // for the dex operation. javaMaxHeapSize "2g" // Enables Gradle to pre-dex library dependencies. preDexLibraries true } } Tips : Total Memory = maxProcessCount * javaMaxHeapSize
// Encapsulates signing configurations. signingConfigs { // Creates a signing configuration called "release". release { // Specifies the path to your keystore file. storeFile file("my-release-key.jks") // Specifies the password for your keystore. storePassword "password" // Specifies the identifying name for your key. keyAlias "my-alias" // Specifies the password for your key. keyPassword "password" } } buildTypes { release { // Adds the "release" signing configuration to the release build type. signingConfig signingConfigs.release //... } } }
Use automation in version code • How to use product flavors, flavors dimension • Split apk if need for abi and screen density • Configure dexOptions in gradle file • Use signing config in Gradle