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>
This commit is contained in:
parent
0c1245cd4d
commit
499c4ef460
1 changed files with 14 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue