mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -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,
|
class CompilerDescription(override val name: String, override val sourceDirectory: String,
|
||||||
override val sourceSuffixes: List<String>, val compiler: ICompiler,
|
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 {
|
override fun compile(project: Project, context: KobaltContext, info: CompilerActionInfo): TaskResult {
|
||||||
val result =
|
val result =
|
||||||
if (info.sourceFiles.size > 0) {
|
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 */
|
/** The Kotlin compiler should run before the Java one, hence priority - 5 */
|
||||||
val compiler = CompilerDescription(PLUGIN_NAME, "kotlin", SOURCE_SUFFIXES, KotlinCompiler(),
|
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)
|
override fun compilersFor(project: Project, context: KobaltContext) = arrayListOf(compiler)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue