2017-12-04 07:21:55 +01:00
|
|
|
apply plugin: 'com.android.application'
|
2016-08-05 18:58:05 +02:00
|
|
|
|
2018-08-20 06:02:38 +02:00
|
|
|
def configProps = new Properties()
|
2018-09-06 20:25:35 +02:00
|
|
|
def configPath = project.hasProperty('configPath') ? project.configPath : rootProject.file('config.prop')
|
|
|
|
configProps.load(new FileInputStream(configPath))
|
2018-08-20 06:02:38 +02:00
|
|
|
|
2017-12-04 07:21:55 +01:00
|
|
|
android {
|
2018-03-25 21:52:12 +02:00
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
2017-12-04 07:21:55 +01:00
|
|
|
|
|
|
|
defaultConfig {
|
2018-12-27 22:15:59 +01:00
|
|
|
minSdkVersion 17
|
2017-12-04 07:21:55 +01:00
|
|
|
applicationId "com.topjohnwu.magisk"
|
2018-03-25 21:52:12 +02:00
|
|
|
targetSdkVersion rootProject.ext.compileSdkVersion
|
2018-12-27 07:35:55 +01:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2016-08-05 18:58:05 +02:00
|
|
|
}
|
|
|
|
|
2018-08-20 06:02:38 +02:00
|
|
|
signingConfigs {
|
|
|
|
config {
|
|
|
|
storeFile rootProject.file('release-key.jks')
|
|
|
|
storePassword configProps['keyStorePass']
|
|
|
|
keyAlias configProps['keyAlias']
|
|
|
|
keyPassword configProps['keyPass']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-04 07:21:55 +01:00
|
|
|
buildTypes {
|
2018-08-28 18:17:27 +02:00
|
|
|
debug {
|
|
|
|
// If keystore exists, sign the APK with custom signature
|
|
|
|
if (signingConfigs.config.storeFile.exists())
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
}
|
2017-12-04 07:21:55 +01:00
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2018-03-27 20:23:50 +02:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2018-08-20 06:02:38 +02:00
|
|
|
signingConfig signingConfigs.config
|
2017-12-04 07:21:55 +01:00
|
|
|
}
|
|
|
|
}
|
2018-05-27 08:34:05 +02:00
|
|
|
|
|
|
|
flavorDimensions "mode"
|
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
full {
|
2018-08-20 06:02:38 +02:00
|
|
|
versionName configProps['appVersion']
|
|
|
|
versionCode configProps['appVersionCode'] as Integer
|
2018-08-08 17:09:29 +02:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
argument('butterknife.debuggable', 'false')
|
|
|
|
}
|
|
|
|
}
|
2018-05-27 08:34:05 +02:00
|
|
|
}
|
|
|
|
stub {
|
|
|
|
versionCode 1
|
|
|
|
versionName "stub"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-04 07:21:55 +01: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-10 04:04:04 +01:00
|
|
|
implementation 'androidx.core:core:1.0.1'
|
2018-12-12 11:51:45 +01:00
|
|
|
implementation project(':net')
|
2018-12-02 10:47:57 +01:00
|
|
|
fullImplementation project(':utils')
|
2018-12-13 10:35:50 +01:00
|
|
|
fullImplementation project(':core')
|
2018-11-10 04:04:04 +01:00
|
|
|
fullImplementation 'androidx.appcompat:appcompat:1.0.2'
|
2018-09-10 08:27:45 +02: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-12-27 15:07:47 +01:00
|
|
|
fullImplementation 'android.arch.work:work-runtime:1.0.0-beta01'
|
2018-12-31 08:43:46 +01:00
|
|
|
fullImplementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
|
|
|
fullImplementation 'androidx.room:room-runtime:2.0.0'
|
2018-11-25 09:33:41 +01:00
|
|
|
fullImplementation 'com.github.topjohnwu:libsu:2.1.2'
|
2018-05-27 08:34:05 +02:00
|
|
|
fullImplementation 'org.kamranzafar:jtar:2.3'
|
2018-12-23 12:29:25 +01:00
|
|
|
fullImplementation 'ru.noties:markwon:2.0.1'
|
|
|
|
fullImplementation 'com.caverock:androidsvg-aar:1.3'
|
2018-10-17 03:00:01 +02:00
|
|
|
|
2018-12-24 11:23:33 +01:00
|
|
|
def butterKnifeVersion = '9.0.0-rc3'
|
2018-10-17 03:00:01 +02: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-05 18:58:05 +02:00
|
|
|
}
|