Revert "JS IR gradle plugin: don't run IC for the main module"
This reverts commit 525c5b886f.
This commit is contained in:
committed by
TeamCityServer
parent
1ae042edc3
commit
b684c2f8d7
+10
-16
@@ -117,7 +117,6 @@ abstract class KotlinJsIrLink @Inject constructor(
|
|||||||
|
|
||||||
val cacheBuilder = CacheBuilder(
|
val cacheBuilder = CacheBuilder(
|
||||||
buildDir,
|
buildDir,
|
||||||
compilation as KotlinCompilation<*>,
|
|
||||||
kotlinOptions,
|
kotlinOptions,
|
||||||
libraryFilter,
|
libraryFilter,
|
||||||
compilerRunner.get(),
|
compilerRunner.get(),
|
||||||
@@ -164,7 +163,6 @@ abstract class KotlinJsIrLink @Inject constructor(
|
|||||||
.buildCompilerArgs(
|
.buildCompilerArgs(
|
||||||
project.configurations.getByName(compilation.compileDependencyConfigurationName),
|
project.configurations.getByName(compilation.compileDependencyConfigurationName),
|
||||||
compilation.output.classesDirs,
|
compilation.output.classesDirs,
|
||||||
compilation,
|
|
||||||
associatedCaches
|
associatedCaches
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -194,7 +192,6 @@ abstract class KotlinJsIrLink @Inject constructor(
|
|||||||
|
|
||||||
internal class CacheBuilder(
|
internal class CacheBuilder(
|
||||||
private val buildDir: File,
|
private val buildDir: File,
|
||||||
private val rootCompilation: KotlinCompilation<*>,
|
|
||||||
private val kotlinOptions: KotlinJsOptions,
|
private val kotlinOptions: KotlinJsOptions,
|
||||||
private val libraryFilter: (File) -> Boolean,
|
private val libraryFilter: (File) -> Boolean,
|
||||||
private val compilerRunner: GradleCompilerRunner,
|
private val compilerRunner: GradleCompilerRunner,
|
||||||
@@ -218,7 +215,6 @@ internal class CacheBuilder(
|
|||||||
fun buildCompilerArgs(
|
fun buildCompilerArgs(
|
||||||
compileClasspath: Configuration,
|
compileClasspath: Configuration,
|
||||||
additionalForResolve: FileCollection?,
|
additionalForResolve: FileCollection?,
|
||||||
compilation: KotlinCompilation<*>,
|
|
||||||
associatedCaches: List<File>
|
associatedCaches: List<File>
|
||||||
): List<File> {
|
): List<File> {
|
||||||
|
|
||||||
@@ -243,18 +239,16 @@ internal class CacheBuilder(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compilation != rootCompilation) {
|
additionalForResolve?.files?.forEach { file ->
|
||||||
additionalForResolve?.files?.forEach { file ->
|
val cacheDirectory = rootCacheDirectory.resolve(file.name)
|
||||||
val cacheDirectory = rootCacheDirectory.resolve(file.name)
|
cacheDirectory.mkdirs()
|
||||||
cacheDirectory.mkdirs()
|
runCompiler(
|
||||||
runCompiler(
|
file,
|
||||||
file,
|
compileClasspath.files,
|
||||||
compileClasspath.files,
|
cacheDirectory,
|
||||||
cacheDirectory,
|
(allCacheDirectories + associatedCaches).distinct()
|
||||||
(allCacheDirectories + associatedCaches).distinct()
|
)
|
||||||
)
|
allCacheDirectories.add(cacheDirectory)
|
||||||
allCacheDirectories.add(cacheDirectory)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return associatedCaches + allCacheDirectories
|
return associatedCaches + allCacheDirectories
|
||||||
|
|||||||
Reference in New Issue
Block a user