Enable -Werror for buildSrc

This commit is contained in:
Alexander Udalov
2021-03-10 18:33:57 +01:00
parent 848b08a475
commit 869a153327
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -199,6 +199,7 @@ java {
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.allWarningsAsErrors = true
kotlinOptions.freeCompilerArgs += listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xskip-runtime-version-check",
@@ -262,4 +263,4 @@ gradlePlugin {
implementationClass = "org.jetbrains.kotlin.NativeInteropPlugin"
}
}
}
}
@@ -135,9 +135,9 @@ val Project.globalTestArgs: List<String>
val Project.testTargetSupportsCodeCoverage: Boolean
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 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 {
proj.logger.info("MAPPING: $notation -> ${it.asPath}")
}