1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-28 00:58:12 -07:00

Fix flag contributor bug.

This commit is contained in:
Cedric Beust 2016-02-07 07:18:10 +04:00
parent 403a3eccf4
commit f412e6eca0
6 changed files with 31 additions and 7 deletions

View file

@ -38,9 +38,10 @@ class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler)
return result
}
// ICompilerFlagsContributor
// ICompilerFlagsContributor
override fun flagsFor(project: Project, context: KobaltContext, currentFlags: List<String>)
= configurationFor(project)?.compilerArgs ?: listOf<String>()
= maybeCompilerArgs(project, configurationFor(project)?.compilerArgs ?: listOf<String>())
// ICompilerContributor
override val sourceSuffixes = listOf("java")

View file

@ -152,7 +152,7 @@ class KConfiguration @Inject constructor(val compiler: KotlinCompiler){
fun compilerArgs(s: List<String>) = args.addAll(s)
fun compile(project: Project? = null, context: KobaltContext? = null) : TaskResult {
return compiler.compile(project, context, dependencies, classpath, source, output, args + "-no-stdlib")
return compiler.compile(project, context, dependencies, classpath, source, output, args)
}
}

View file

@ -38,7 +38,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
// ICompilerFlagsContributor
override fun flagsFor(project: Project, context: KobaltContext, currentFlags: List<String>)
= configurationFor(project)?.compilerArgs ?: listOf<String>()
= maybeCompilerArgs(project, (configurationFor(project)?.compilerArgs ?: listOf<String>()) +
listOf("-no-stdlib"))
// override fun generateDoc(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
// val configs = dokkaConfigurations[project.name]