Files
vpnhotspotmod/mobile/build.gradle
2019-05-10 12:48:41 +08:00

103 lines
3.6 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
if (!getGradle().getStartParameter().getTaskRequests().toString().contains("Fdroid")) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
}
android {
compileSdkVersion 'android-Q'
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
defaultConfig {
applicationId "be.mygod.vpnhotspot"
minSdkVersion 21
targetSdkVersion 28
resConfigs "ru", "zh-rCN"
versionCode 202
versionName "2.4.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
buildConfigField "boolean", "DONATIONS", "true"
}
buildTypes {
debug {
pseudoLocalesEnabled true
}
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding.enabled = true
flavorDimensions("freedom")
packagingOptions.exclude '**/*.kotlin_*'
productFlavors {
fdroid {
dimension "freedom"
}
freedom {
dimension "freedom"
}
google {
dimension "freedom"
buildConfigField "boolean", "DONATIONS", "false"
}
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
}
androidExtensions {
experimental = true
}
def aux = [
'com.crashlytics.sdk.android:crashlytics:2.10.0',
'com.google.firebase:firebase-core:16.0.9',
]
def lifecycleVersion = '2.0.0'
def roomVersion = '2.1.0-beta01'
dependencies {
kapt "androidx.room:room-compiler:$roomVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.emoji:emoji:1.0.0'
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation 'androidx.preference:preference:1.1.0-alpha05'
implementation "androidx.room:room-ktx:$roomVersion"
implementation 'com.android.billingclient:billing:2.0.0'
implementation 'com.github.topjohnwu.libsu:core:2.5.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
implementation 'net.glxn.qrgen:android:2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1'
for (dep in aux) {
freedomImplementation dep
googleImplementation dep
}
testImplementation "androidx.arch.core:core-testing:$lifecycleVersion"
testImplementation 'junit:junit:4.12'
androidTestImplementation "androidx.room:room-testing:$roomVersion"
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.0'
}