gradle: use idiomatic task handling
- The hand-rolled clean task is not required - Tasks should use configureEach to prevent eager evaluation Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
e843fccbc6
commit
052ff060b1
@ -23,10 +23,6 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
wrapper {
|
wrapper {
|
||||||
gradleVersion = "8.0.2"
|
gradleVersion = "8.0.2"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
@ -82,13 +84,11 @@ dependencies {
|
|||||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarVersion"
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.compilerArgs << '-Xlint:unchecked'
|
options.compilerArgs << '-Xlint:unchecked'
|
||||||
options.deprecation = true
|
options.deprecation = true
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
tasks.withType(KotlinCompile).configureEach {
|
||||||
kotlinOptions {
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
|
||||||
jvmTarget = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user