Add project for running native stdlib source generator

This project only works with a substituted kotlin-stdlib-gen dependency
 from included kotlin build.
This commit is contained in:
Ilya Gorbunov
2018-12-25 06:49:30 +03:00
committed by Pavel Punegov
parent 68234016a5
commit 96b7cd1235
2 changed files with 18 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
configurations {
generatorRuntime
}
dependencies {
generatorRuntime "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
generatorRuntime "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
generatorRuntime "org.jetbrains.kotlin:kotlin-stdlib-gen:${kotlinVersion}"
}
task run(type: JavaExec) {
group 'application'
main 'generators.GenerateStandardLibKt'
classpath configurations.generatorRuntime
args = ["native", "${project(":runtime").projectDir}/src/main/kotlin/generated"]
}
+2
View File
@@ -39,10 +39,12 @@ includeBuild 'tools/kotlin-native-gradle-plugin'
if (hasProperty("kotlinProjectPath")) {
include ':runtime:generator'
includeBuild(kotlinProjectPath) {
dependencySubstitution {
substitute module('org.jetbrains.kotlin:kotlin-compiler') with project(':include:kotlin-compiler')
substitute module("org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion") with project(':include:kotlin-stdlib-common-sources')
substitute module("org.jetbrains.kotlin:kotlin-stdlib-gen:$kotlinVersion") with project(':tools:kotlin-stdlib-gen')
}
}
}