From 639c0249a42d4ca7875e37339668662cbf485315 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 30 Nov 2015 18:47:58 -0800 Subject: [PATCH] Warning. --- src/main/kotlin/com/beust/kobalt/internal/BuildGenerator.kt | 2 +- src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt | 4 ++-- .../kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/internal/BuildGenerator.kt b/src/main/kotlin/com/beust/kobalt/internal/BuildGenerator.kt index 6f28d461..3df705af 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/BuildGenerator.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/BuildGenerator.kt @@ -24,7 +24,7 @@ abstract class BuildGenerator : IInitContributor { } } - override fun affinity(dir: File) = KFiles.findRecursively(dir, fileMatch).size + override fun affinity(arg: File) = KFiles.findRecursively(arg, fileMatch).size private fun importPom(pomFile: File, mainDeps: ArrayList, testDeps: ArrayList, map: HashMap) { diff --git a/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt b/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt index 7512644c..8a5a8616 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt @@ -17,7 +17,7 @@ abstract class GenericTestRunner : ITestRunnerContributor { abstract fun args(project: Project, classpath: List) : List override fun run(project: Project, context: KobaltContext, classpath: List) - = TaskResult(runTests(project, context, classpath)) + = TaskResult(runTests(project, classpath)) protected fun findTestClasses(project: Project, classpath: List): List { @@ -46,7 +46,7 @@ abstract class GenericTestRunner : ITestRunnerContributor { /** * @return true if all the tests passed */ - fun runTests(project: Project, context: KobaltContext, classpath: List) : Boolean { + fun runTests(project: Project, classpath: List) : Boolean { val jvm = JavaInfo.create(File(SystemProperties.javaBase)) val java = jvm.javaExecutable val args = args(project, classpath) diff --git a/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt b/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt index d0e34e90..19a5507c 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt @@ -113,6 +113,7 @@ abstract class JvmCompilerPlugin @Inject constructor( protected fun compilerArgsFor(project: Project) : List { val result = project.projectProperties.get(COMPILER_ARGS) if (result != null) { + @Suppress("UNCHECKED_CAST") return result as List } else { return emptyList()