Enable -Werror for buildSrc
This commit is contained in:
@@ -199,6 +199,7 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
|
kotlinOptions.allWarningsAsErrors = true
|
||||||
kotlinOptions.freeCompilerArgs += listOf(
|
kotlinOptions.freeCompilerArgs += listOf(
|
||||||
"-Xopt-in=kotlin.RequiresOptIn",
|
"-Xopt-in=kotlin.RequiresOptIn",
|
||||||
"-Xskip-runtime-version-check",
|
"-Xskip-runtime-version-check",
|
||||||
@@ -262,4 +263,4 @@ gradlePlugin {
|
|||||||
implementationClass = "org.jetbrains.kotlin.NativeInteropPlugin"
|
implementationClass = "org.jetbrains.kotlin.NativeInteropPlugin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,9 +135,9 @@ val Project.globalTestArgs: List<String>
|
|||||||
val Project.testTargetSupportsCodeCoverage: Boolean
|
val Project.testTargetSupportsCodeCoverage: Boolean
|
||||||
get() = this.testTarget.supportsCodeCoverage()
|
get() = this.testTarget.supportsCodeCoverage()
|
||||||
|
|
||||||
fun projectOrFiles(proj:Project, notation: String):Any?{
|
fun projectOrFiles(proj: Project, notation: String): Any? {
|
||||||
val propertyMapper = proj.findProperty("notationMapping") ?: return proj.project(notation)
|
val propertyMapper = proj.findProperty("notationMapping") ?: return proj.project(notation)
|
||||||
val mapping = (propertyMapper as? Map<String, String>)?.get(notation) ?: return proj.project(notation)
|
val mapping = (propertyMapper as? Map<*, *>)?.get(notation) as? String ?: return proj.project(notation)
|
||||||
return proj.files(mapping).also {
|
return proj.files(mapping).also {
|
||||||
proj.logger.info("MAPPING: $notation -> ${it.asPath}")
|
proj.logger.info("MAPPING: $notation -> ${it.asPath}")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user