Reorganize stdlib-js sources specific to the current JS backend
Move kotlin-stdlib-js project and the sources specific to the current backend to 'stdlib/js-v1' directory, but leave sources that can be shared with the new IR backend in the common 'stdlib/js' location with exception for 'stdlib/js/src/generated', which is used exclusively for current backend. This simplifies sourceset configuration when building stdlib with the new backend.
This commit is contained in:
@@ -42,10 +42,10 @@ fun main(args: Array<String>) {
|
||||
when (args.size) {
|
||||
1 -> {
|
||||
val baseDir = File(args.first())
|
||||
targetBaseDirs[KotlinTarget.Common] = baseDir.resolveExistingDir("libraries/stdlib/common/src/generated")
|
||||
targetBaseDirs[KotlinTarget.Common] = baseDir.resolveExistingDir("libraries/stdlib/common/src/generated")
|
||||
targetBaseDirs[KotlinTarget.JVM] = baseDir.resolveExistingDir("libraries/stdlib/jvm/src/generated")
|
||||
targetBaseDirs[KotlinTarget.JS] = baseDir.resolveExistingDir("libraries/stdlib/js/src/generated")
|
||||
targetBaseDirs[KotlinTarget.JS_IR] = baseDir.resolveExistingDir("libraries/stdlib/js/irRuntime/generated")
|
||||
targetBaseDirs[KotlinTarget.JS_IR] = baseDir.resolveExistingDir("libraries/stdlib/js-ir/src/generated")
|
||||
}
|
||||
2 -> {
|
||||
val (targetName, targetDir) = args
|
||||
@@ -75,4 +75,4 @@ fun File.resolveExistingDir(subpath: String) = resolve(subpath).also { it.requir
|
||||
|
||||
fun File.requireExistingDir() {
|
||||
require(isDirectory) { "Directory $this doesn't exist"}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user