1- import com.android.build.gradle.internal.lint.AndroidLintTask
1+
22import dev.detekt.gradle.Detekt
33import dev.detekt.gradle.DetektCreateBaselineTask
44import org.jetbrains.kotlin.gradle.dsl.JvmTarget
@@ -30,7 +30,11 @@ kotlin {
3030 namespace = " com.benromdhane.omar.offroadsoft.monads"
3131 compileSdk = libs.versions.android.compileSdk.get().toInt()
3232 minSdk = libs.versions.android.minSdk.get().toInt()
33-
33+ lint {
34+ checkReleaseBuilds = false
35+ abortOnError = false
36+ disable + = setOf (" LintBaseline" , " LintError" )
37+ }
3438 withJava()
3539 withHostTestBuilder {}.configure {}
3640 withDeviceTestBuilder {
@@ -46,11 +50,19 @@ kotlin {
4650 }
4751 }
4852 }
49- lint {
50- checkReleaseBuilds = false
51- }
53+ }
54+ tasks.withType< JavaCompile >().configureEach {
55+ options.compilerArgs.add( " -Xlint:none " )
5256 }
5357
58+ afterEvaluate {
59+ tasks.matching {
60+ it.name.contains(" extractAnnotations" , ignoreCase = true ) ||
61+ it.name.contains(" ExtractAnnotations" , ignoreCase = true )
62+ }.configureEach {
63+ enabled = false
64+ }
65+ }
5466 linuxX64()
5567
5668 @OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl ::class )
@@ -137,8 +149,6 @@ kotlin {
137149 tasks.named(" sonar" ) {
138150 dependsOn(subprojects.map { it.tasks.named(" koverXmlReport" ) })
139151 }
140- tasks.withType<AndroidLintTask >().all { enabled = false }
141- tasks.withType<Javadoc >().all { enabled = false }
142152}
143153
144154publishing {
0 commit comments