108 lines
3.9 KiB
Groovy
108 lines
3.9 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'
|
|
}
|
|
|
|
def javaVersion = JavaVersion.VERSION_1_8
|
|
def aux = [
|
|
'com.crashlytics.sdk.android:crashlytics:2.10.1',
|
|
'com.google.firebase:firebase-analytics:17.2.0',
|
|
]
|
|
def lifecycleVersion = '2.2.0-rc01'
|
|
def roomVersion = '2.2.1'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
compileOptions {
|
|
sourceCompatibility javaVersion
|
|
targetCompatibility javaVersion
|
|
}
|
|
kotlinOptions.jvmTarget = javaVersion
|
|
defaultConfig {
|
|
applicationId "be.mygod.vpnhotspot"
|
|
minSdkVersion 21
|
|
targetSdkVersion 29
|
|
resConfigs "ru", "zh-rCN"
|
|
versionCode 215
|
|
versionName '2.6.2'
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
javaCompileOptions.annotationProcessorOptions.arguments = [
|
|
"room.incremental": "true",
|
|
"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
|
|
}
|
|
|
|
dependencies {
|
|
kapt "androidx.room:room-compiler:$roomVersion"
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.browser:browser:1.2.0-alpha09'
|
|
implementation 'androidx.core:core-ktx:1.1.0'
|
|
implementation 'androidx.emoji:emoji:1.0.0'
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
|
|
implementation 'androidx.preference:preference:1.1.0'
|
|
implementation "androidx.room:room-ktx:$roomVersion"
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
|
implementation 'com.android.billingclient:billing:2.0.3'
|
|
implementation 'com.github.topjohnwu.libsu:core:2.5.1'
|
|
implementation 'com.google.android.material:material:1.1.0-beta01'
|
|
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-collections-immutable:0.3'
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
|
|
for (dep in aux) {
|
|
freedomImplementation dep
|
|
googleImplementation dep
|
|
}
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1'
|
|
}
|