summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-07-27 18:39:57 +0530
committerHarsh Shandilya <msfjarvis@gmail.com>2019-07-28 12:09:29 +0530
commit499c4ef46086c6d77fd1897c24f93c9fd241db3f (patch)
tree9f7f71eb9dfb4062c00b486f76232f272309c119
parent0c1245cd4dfdee2cabab28e43a8958301b713c68 (diff)
Configure compiler options
Enable Kotlin 1.3.41's new type inference Warn about deprecated methods in Java Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
-rw-r--r--app/build.gradle.kts14
1 files changed, 14 insertions, 0 deletions
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<JavaCompile> {
+ options.compilerArgs.add("-Xlint:unchecked")
+ options.isDeprecation = true
+ }
+ withType<KotlinCompile> {
+ kotlinOptions {
+ jvmTarget = "1.8"
+ freeCompilerArgs += "-Xnew-inference"
+ }
+ }
+}