mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Restore the Kotlin compiler's ability to compile directories.
This commit is contained in:
parent
f5560b2907
commit
bd6dfb494f
2 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,8 @@ interface ICompiler {
|
|||
|
||||
class CompilerDescription(override val name: String, override val sourceDirectory: String,
|
||||
override val sourceSuffixes: List<String>, val compiler: ICompiler,
|
||||
override val priority: Int = ICompilerDescription.DEFAULT_PRIORITY) : ICompilerDescription {
|
||||
override val priority: Int = ICompilerDescription.DEFAULT_PRIORITY,
|
||||
override val canCompileDirectories: Boolean = false) : ICompilerDescription {
|
||||
override fun compile(project: Project, context: KobaltContext, info: CompilerActionInfo): TaskResult {
|
||||
val result =
|
||||
if (info.sourceFiles.size > 0) {
|
||||
|
|
|
@ -111,7 +111,7 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen
|
|||
|
||||
/** The Kotlin compiler should run before the Java one, hence priority - 5 */
|
||||
val compiler = CompilerDescription(PLUGIN_NAME, "kotlin", SOURCE_SUFFIXES, KotlinCompiler(),
|
||||
ICompilerDescription.DEFAULT_PRIORITY - 5)
|
||||
ICompilerDescription.DEFAULT_PRIORITY - 5, canCompileDirectories = true)
|
||||
|
||||
override fun compilersFor(project: Project, context: KobaltContext) = arrayListOf(compiler)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue