More entry points for compiler plugins
* In Kotlin/JS JPS compilation
* In kotlin-common CLI compiler
* In kotlin-common gradle build
Original commit: d6e5551237
This commit is contained in:
@@ -431,19 +431,6 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
project: JpsProject
|
project: JpsProject
|
||||||
): OutputItemsCollector? {
|
): OutputItemsCollector? {
|
||||||
|
|
||||||
if (JpsUtils.isJsKotlinModule(chunk.representativeTarget())) {
|
|
||||||
LOG.debug("Compiling to JS ${filesToCompile.values().size} files in ${filesToCompile.keySet().joinToString { it.presentableName }}")
|
|
||||||
return compileToJs(chunk, commonArguments, environment, project)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IncrementalCompilation.isEnabled()) {
|
|
||||||
for (target in chunk.targets) {
|
|
||||||
val cache = incrementalCaches[target]!!
|
|
||||||
val removedAndDirtyFiles = filesToCompile[target] + dirtyFilesHolder.getRemovedFiles(target).map(::File)
|
|
||||||
cache.markDirty(removedAndDirtyFiles)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val representativeTarget = chunk.representativeTarget()
|
val representativeTarget = chunk.representativeTarget()
|
||||||
|
|
||||||
fun concatenate(strings: Array<String>?, cp: List<String>) = arrayOf(*strings.orEmpty(), *cp.toTypedArray())
|
fun concatenate(strings: Array<String>?, cp: List<String>) = arrayOf(*strings.orEmpty(), *cp.toTypedArray())
|
||||||
@@ -459,6 +446,19 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
|
|||||||
LOG.debug("Plugin loaded: ${argumentProvider::class.java.simpleName}")
|
LOG.debug("Plugin loaded: ${argumentProvider::class.java.simpleName}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (JpsUtils.isJsKotlinModule(chunk.representativeTarget())) {
|
||||||
|
LOG.debug("Compiling to JS ${filesToCompile.values().size} files in ${filesToCompile.keySet().joinToString { it.presentableName }}")
|
||||||
|
return compileToJs(chunk, commonArguments, environment, project)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IncrementalCompilation.isEnabled()) {
|
||||||
|
for (target in chunk.targets) {
|
||||||
|
val cache = incrementalCaches[target]!!
|
||||||
|
val removedAndDirtyFiles = filesToCompile[target] + dirtyFilesHolder.getRemovedFiles(target).map(::File)
|
||||||
|
cache.markDirty(removedAndDirtyFiles)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return compileToJvm(allCompiledFiles, chunk, commonArguments, context, dirtyFilesHolder, environment, filesToCompile)
|
return compileToJvm(allCompiledFiles, chunk, commonArguments, context, dirtyFilesHolder, environment, filesToCompile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user