2017-07-29 06:10:37 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2020-02-14 10:57:17 +01:00
|
|
|
apply plugin: 'kotlin-android'
|
2020-03-21 06:36:00 +01:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2017-07-29 06:10:37 +02:00
|
|
|
|
2020-03-10 15:58:29 +01:00
|
|
|
version wireguardVersionName
|
|
|
|
group groupName
|
|
|
|
|
2018-06-05 16:24:53 +02:00
|
|
|
// Create a variable called keystorePropertiesFile, and initialize it to your
|
|
|
|
// keystore.properties file, in the rootProject folder.
|
|
|
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
|
2017-07-29 06:10:37 +02:00
|
|
|
android {
|
2020-02-28 07:58:02 +01:00
|
|
|
buildToolsVersion '29.0.3'
|
2017-12-26 21:06:32 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2020-02-23 14:49:25 +01:00
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
}
|
|
|
|
}
|
2019-09-30 08:59:06 +02:00
|
|
|
compileSdkVersion 29
|
2020-05-29 08:35:24 +02:00
|
|
|
buildFeatures.dataBinding = true
|
|
|
|
buildFeatures.viewBinding = true
|
2017-07-29 06:10:37 +02:00
|
|
|
defaultConfig {
|
2017-11-29 03:15:40 +01:00
|
|
|
applicationId 'com.wireguard.android'
|
2017-07-29 06:10:37 +02:00
|
|
|
minSdkVersion 21
|
2019-09-30 08:59:06 +02:00
|
|
|
targetSdkVersion 29
|
2020-03-10 04:54:27 +01:00
|
|
|
versionCode wireguardVersionCode
|
|
|
|
versionName wireguardVersionName
|
2018-07-28 18:27:45 +02:00
|
|
|
buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel"
|
2017-07-29 06:10:37 +02:00
|
|
|
}
|
2018-06-05 16:24:53 +02:00
|
|
|
// If the keystore file exists
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
// Initialize a new Properties() object called keystoreProperties.
|
|
|
|
final def keystoreProperties = new Properties()
|
|
|
|
|
|
|
|
// Load your keystore.properties file into the keystoreProperties object.
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
2020-03-20 15:42:22 +01:00
|
|
|
storeFile rootProject.file(keystoreProperties['storeFile'])
|
2018-06-05 16:24:53 +02:00
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
|
2018-12-18 17:48:00 +01:00
|
|
|
minifyEnabled true
|
2020-03-29 07:20:47 +02:00
|
|
|
proguardFiles "proguard-android-optimize.txt", "proguard-rules.pro"
|
2018-06-05 16:24:53 +02:00
|
|
|
}
|
2018-07-07 19:04:34 +02:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
versionNameSuffix "-debug"
|
|
|
|
}
|
2018-06-05 16:24:53 +02:00
|
|
|
}
|
2020-03-31 00:18:00 +02:00
|
|
|
lintOptions {
|
|
|
|
disable('LongLogTag')
|
|
|
|
}
|
2018-04-27 16:55:42 +02:00
|
|
|
}
|
2017-07-29 06:10:37 +02:00
|
|
|
|
|
|
|
dependencies {
|
2020-03-09 14:30:14 +01:00
|
|
|
implementation project(":tunnel")
|
2018-12-18 11:45:37 +01:00
|
|
|
implementation "androidx.annotation:annotation:$annotationsVersion"
|
|
|
|
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
2020-03-09 05:50:14 +01:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
|
|
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
|
2020-03-30 07:15:49 +02:00
|
|
|
implementation "androidx.biometric:biometric:$biometricVersion"
|
2020-02-23 15:30:03 +01:00
|
|
|
implementation "androidx.core:core-ktx:$coreKtxVersion"
|
2020-03-09 14:30:14 +01:00
|
|
|
implementation "androidx.databinding:databinding-runtime:$agpVersion"
|
2020-02-23 15:36:15 +01:00
|
|
|
implementation "androidx.fragment:fragment:$fragmentVersion"
|
2018-12-18 11:45:37 +01:00
|
|
|
implementation "androidx.preference:preference:$preferenceVersion"
|
|
|
|
implementation "com.google.android.material:material:$materialComponentsVersion"
|
2018-07-24 19:32:40 +02:00
|
|
|
implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion"
|
2020-02-14 10:57:17 +01:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
2020-03-24 07:42:25 +01:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
|
2020-03-10 18:48:10 +01:00
|
|
|
implementation "net.sourceforge.streamsupport:android-retrofuture:$streamsupportVersion"
|
2017-07-29 06:10:37 +02:00
|
|
|
}
|
2018-05-29 18:37:14 +02:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.compilerArgs << '-Xlint:unchecked'
|
|
|
|
options.deprecation = true
|
2018-05-29 19:08:55 +02:00
|
|
|
}
|