91 lines
3.5 KiB
Groovy
91 lines
3.5 KiB
Groovy
import java.util.regex.Matcher
|
|
import java.util.regex.Pattern
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
def getCurrentFlavor() {
|
|
Gradle gradle = getGradle()
|
|
String tskReqStr = gradle.getStartParameter().getTaskRequests().toString()
|
|
|
|
Pattern pattern;
|
|
|
|
if( tskReqStr.contains( "assemble" ) )
|
|
pattern = Pattern.compile("assemble(\\w+)(Release|Debug)")
|
|
else
|
|
pattern = Pattern.compile("generate(\\w+)(Release|Debug)")
|
|
|
|
Matcher matcher = pattern.matcher( tskReqStr )
|
|
|
|
if( matcher.find() )
|
|
return matcher.group(1).toLowerCase()
|
|
else
|
|
{
|
|
println "NO MATCH FOUND"
|
|
return "";
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion rootProject.sdkVersion
|
|
defaultConfig {
|
|
applicationId "com.github.shadowsocks"
|
|
minSdkVersion rootProject.minSdkVersion
|
|
targetSdkVersion rootProject.sdkVersion
|
|
versionCode 200
|
|
versionName "4.4.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables.useSupportLibrary true
|
|
resConfigs "fa", "ja", "ko", "ru", "zh-rCN", "zh-rTW"
|
|
}
|
|
buildTypes {
|
|
release {
|
|
shrinkResources true
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
sourceSets.main.jniLibs.srcDirs +=
|
|
new File(project(':core').buildDir, "intermediates/bundles/${getCurrentFlavor()}/jni")
|
|
sourceSets.main.jniLibs.srcDirs += new File(project(':core').projectDir, "src/main/jni/overture")
|
|
}
|
|
|
|
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.github.jorgecastilloprz:fabprogresscircle:1.01'
|
|
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'
|