74 lines
1.9 KiB
Groovy
74 lines
1.9 KiB
Groovy
// This build file illustrates how to apply ProGuard in the Android build
|
|
// process, with ProGuard's own plugin instead of the built-in minification
|
|
// support of the Android Gradle plugin.
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal() // For local testing
|
|
google() // For the Android Gradle plugin.
|
|
mavenCentral() // For the ProGuard Gradle Plugin and anything else.
|
|
}
|
|
dependencies {
|
|
classpath 'com.guardsquare:proguard-gradle:7.3.0'
|
|
classpath 'com.android.tools.build:gradle:7.0.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'com.guardsquare.proguard'
|
|
|
|
repositories {
|
|
google() // For the Android plugin.
|
|
mavenCentral() // For anything else.
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
|
|
signingConfigs {
|
|
debug {
|
|
storeFile file('debug.keystore')
|
|
storePassword 'android'
|
|
keyAlias 'androiddebugkey'
|
|
keyPassword 'android'
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdkVersion 11
|
|
targetSdkVersion 29
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
resources.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
renderscript.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
// Disable the built-in minification
|
|
minifyEnabled false
|
|
}
|
|
release {
|
|
// Disable the built-in minification
|
|
minifyEnabled false
|
|
}
|
|
}
|
|
}
|
|
|
|
proguard {
|
|
configurations {
|
|
release {
|
|
defaultConfiguration 'proguard-android-optimize.txt'
|
|
configuration 'proguard-project.txt'
|
|
}
|
|
}
|
|
}
|