79 lines
3.4 KiB
Groovy
79 lines
3.4 KiB
Groovy
import java.util.regex.Matcher
|
|
import java.util.regex.Pattern
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
def getCurrentFlavor() {
|
|
String task = getGradle().getStartParameter().getTaskRequests().toString()
|
|
Matcher matcher = Pattern.compile("(assemble|generate)\\w*(Release|Debug)").matcher(task)
|
|
if (matcher.find()) return matcher.group(1).toLowerCase() else {
|
|
println "Warning: No match found for $task"
|
|
return "debug"
|
|
}
|
|
}
|
|
|
|
android {
|
|
buildToolsVersion rootProject.buildToolsVersion
|
|
compileSdkVersion rootProject.sdkVersion
|
|
defaultConfig {
|
|
applicationId "com.github.shadowsocks"
|
|
minSdkVersion rootProject.minSdkVersion
|
|
targetSdkVersion rootProject.sdkVersion
|
|
versionCode 202
|
|
versionName "4.4.2"
|
|
testApplicationId "com.github.shadowsocks.test"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables.useSupportLibrary true
|
|
resConfigs "fa", "ja", "ko", "ru", "zh-rCN", "zh-rTW"
|
|
}
|
|
buildTypes {
|
|
debug {
|
|
pseudoLocalesEnabled true
|
|
}
|
|
release {
|
|
shrinkResources true
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
sourceSets.main.jniLibs.srcDirs +=
|
|
new File(project(':core').buildDir, "intermediates/bundles/${getCurrentFlavor()}/jni")
|
|
sourceSets.main.jniLibs.srcDirs += new File(project(':core').projectDir, "src/overture/bin")
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':core')
|
|
implementation "com.android.support:customtabs:$supportLibraryVersion"
|
|
implementation "com.android.support:design:$supportLibraryVersion"
|
|
implementation "com.android.support:gridlayout-v7:$supportLibraryVersion"
|
|
implementation 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
|
|
implementation 'com.evernote:android-job:1.2.1'
|
|
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
|
|
implementation "com.google.android.gms:play-services-analytics:$playServicesVersion"
|
|
implementation "com.google.android.gms:play-services-gcm:$playServicesVersion"
|
|
implementation "com.google.firebase:firebase-config:$playServicesVersion"
|
|
implementation 'com.j256.ormlite:ormlite-android:5.0'
|
|
implementation 'com.mikepenz:crossfader:1.5.1'
|
|
implementation 'com.mikepenz:fastadapter:3.0.4'
|
|
implementation 'com.mikepenz:iconics-core:3.0.0'
|
|
implementation 'com.mikepenz:materialdrawer:6.0.2'
|
|
implementation 'com.mikepenz:materialize:1.1.2'
|
|
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
|
|
implementation "com.takisoft.fix:preference-v7-simplemenu:$takisoftFixVersion"
|
|
implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.2'
|
|
implementation 'dnsjava:dnsjava:2.1.8'
|
|
implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214'
|
|
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
|
implementation 'net.glxn.qrgen:android:2.0'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
|
|
testImplementation "junit:junit:$junitVersion"
|
|
androidTestImplementation "com.android.support.test:runner:$androidTestVersion"
|
|
androidTestImplementation "com.android.support.test.espresso:espresso-core:$androidEspressoVersion"
|
|
}
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
apply plugin: 'com.google.gms.google-services'
|