From 1fa15e76e3f86930076a819e50f2ca8358ba2029 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 23 Aug 2020 00:42:51 +0530 Subject: [PATCH] build: minor cleanups and reorganization Signed-off-by: Harsh Shandilya --- ui/build.gradle | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ui/build.gradle b/ui/build.gradle index e59fa764..40671740 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -11,15 +11,6 @@ final def keystorePropertiesFile = rootProject.file("keystore.properties") android { buildToolsVersion '29.0.3' - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = '1.8' - } - } compileSdkVersion 29 buildFeatures.dataBinding = true buildFeatures.viewBinding = true @@ -31,12 +22,12 @@ android { versionName wireguardVersionName buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel" } - // If the keystore file exists + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } 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 { @@ -87,3 +78,9 @@ tasks.withType(JavaCompile) { options.compilerArgs << '-Xlint:unchecked' options.deprecation = true } + +tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } +}