From 499c4ef46086c6d77fd1897c24f93c9fd241db3f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 27 Jul 2019 18:39:57 +0530 Subject: [PATCH] Configure compiler options Enable Kotlin 1.3.41's new type inference Warn about deprecated methods in Java Signed-off-by: Harsh Shandilya --- app/build.gradle.kts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3bf71c6f..25e7e68d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,6 @@ import org.gradle.api.JavaVersion.* import org.jetbrains.kotlin.config.KotlinCompilerVersion +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("com.android.application") @@ -95,3 +96,16 @@ dependencies { androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0-alpha02") androidTestImplementation("androidx.test.espresso:espresso-intents:3.3.0-alpha02") } + +tasks { + withType { + options.compilerArgs.add("-Xlint:unchecked") + options.isDeprecation = true + } + withType { + kotlinOptions { + jvmTarget = "1.8" + freeCompilerArgs += "-Xnew-inference" + } + } +}