2017-12-04 14:21:55 +08:00
|
|
|
apply plugin: 'com.android.application'
|
2016-08-06 00:58:05 +08:00
|
|
|
|
2018-08-20 12:02:38 +08:00
|
|
|
def configProps = new Properties()
|
2018-09-06 14:25:35 -04:00
|
|
|
def configPath = project.hasProperty('configPath') ? project.configPath : rootProject.file('config.prop')
|
|
|
|
configProps.load(new FileInputStream(configPath))
|
2018-08-20 12:02:38 +08:00
|
|
|
|
2017-12-04 14:21:55 +08:00
|
|
|
android {
|
2018-03-26 03:52:12 +08:00
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
2017-12-04 14:21:55 +08:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.topjohnwu.magisk"
|
|
|
|
minSdkVersion 21
|
2018-03-26 03:52:12 +08:00
|
|
|
targetSdkVersion rootProject.ext.compileSdkVersion
|
2016-08-06 00:58:05 +08:00
|
|
|
}
|
|
|
|
|
2018-08-20 12:02:38 +08:00
|
|
|
signingConfigs {
|
|
|
|
config {
|
|
|
|
storeFile rootProject.file('release-key.jks')
|
|
|
|
storePassword configProps['keyStorePass']
|
|
|
|
keyAlias configProps['keyAlias']
|
|
|
|
keyPassword configProps['keyPass']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-04 14:21:55 +08:00
|
|
|
buildTypes {
|
2018-08-28 12:17:27 -04:00
|
|
|
debug {
|
|
|
|
// If keystore exists, sign the APK with custom signature
|
|
|
|
if (signingConfigs.config.storeFile.exists())
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
}
|
2017-12-04 14:21:55 +08:00
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2018-03-28 02:23:50 +08:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2018-08-20 12:02:38 +08:00
|
|
|
signingConfig signingConfigs.config
|
2017-12-04 14:21:55 +08:00
|
|
|
}
|
|
|
|
}
|
2018-05-27 14:34:05 +08:00
|
|
|
|
|
|
|
flavorDimensions "mode"
|
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
full {
|
2018-08-20 12:02:38 +08:00
|
|
|
versionName configProps['appVersion']
|
|
|
|
versionCode configProps['appVersionCode'] as Integer
|
2018-08-08 23:09:29 +08:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
argument('butterknife.debuggable', 'false')
|
|
|
|
}
|
|
|
|
}
|
2018-05-27 14:34:05 +08:00
|
|
|
}
|
|
|
|
stub {
|
|
|
|
versionCode 1
|
|
|
|
versionName "stub"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-04 14:21:55 +08:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
dexOptions {
|
|
|
|
preDexLibraries true
|
|
|
|
javaMaxHeapSize "2g"
|
|
|
|
}
|
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2018-11-09 22:04:04 -05:00
|
|
|
implementation 'androidx.core:core:1.0.1'
|
2018-12-02 04:47:57 -05:00
|
|
|
fullImplementation project(':utils')
|
|
|
|
fullImplementation 'com.amitshekhar.android:android-networking:1.0.2'
|
2018-11-09 22:04:04 -05:00
|
|
|
fullImplementation 'androidx.appcompat:appcompat:1.0.2'
|
2018-09-10 02:27:45 -04:00
|
|
|
fullImplementation "androidx.preference:preference:${rootProject.ext.androidXVersion}"
|
|
|
|
fullImplementation "androidx.recyclerview:recyclerview:${rootProject.ext.androidXVersion}"
|
|
|
|
fullImplementation "androidx.cardview:cardview:${rootProject.ext.androidXVersion}"
|
|
|
|
fullImplementation "com.google.android.material:material:${rootProject.ext.androidXVersion}"
|
2018-11-25 03:33:41 -05:00
|
|
|
fullImplementation 'com.github.topjohnwu:libsu:2.1.2'
|
2018-05-27 14:34:05 +08:00
|
|
|
fullImplementation 'com.atlassian.commonmark:commonmark:0.11.0'
|
|
|
|
fullImplementation 'org.kamranzafar:jtar:2.3'
|
2018-10-16 21:00:01 -04:00
|
|
|
|
2018-11-25 03:33:41 -05:00
|
|
|
def butterKnifeVersion = '9.0.0-rc2'
|
2018-10-16 21:00:01 -04:00
|
|
|
if (properties.containsKey('android.injected.invoked.from.ide')) {
|
|
|
|
fullImplementation "com.jakewharton:butterknife-reflect:${butterKnifeVersion}"
|
|
|
|
} else {
|
|
|
|
fullImplementation "com.jakewharton:butterknife-runtime:${butterKnifeVersion}"
|
|
|
|
fullAnnotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}"
|
|
|
|
}
|
2016-08-06 00:58:05 +08:00
|
|
|
}
|