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:
parent
403a3eccf4
commit
f412e6eca0
6 changed files with 31 additions and 7 deletions
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue