Created
July 5, 2021 08:34
-
-
Save Asutosh11/2bcdc68a5ca1062e78b7361f004899b4 to your computer and use it in GitHub Desktop.
some custom settings for generating APKs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildTypes { | |
release { | |
// this is for standard android release APK, the one we can upload to Play Store and Airwatch | |
debuggable false | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
signingConfig signingConfigs.release | |
} | |
debug { | |
// This is for generating an Unsigned APK for Intune and also compile APK on device | |
def sysprops = System.getProperties() | |
if (sysprops['idea.platform.prefix'] != null) { | |
// for android studio | |
debuggable true | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
signingConfig signingConfigs.release | |
} | |
else{ | |
// for intune | |
debuggable false | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
signingConfig null | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment