From 96b7cd1235cb752c58e6e202efb9e13ec4238adc Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 25 Dec 2018 06:49:30 +0300 Subject: [PATCH] Add project for running native stdlib source generator This project only works with a substituted kotlin-stdlib-gen dependency from included kotlin build. --- runtime/generator/build.gradle | 16 ++++++++++++++++ settings.gradle | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 runtime/generator/build.gradle diff --git a/runtime/generator/build.gradle b/runtime/generator/build.gradle new file mode 100644 index 00000000000..eeebc8911b4 --- /dev/null +++ b/runtime/generator/build.gradle @@ -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"] +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 67086c3c6b9..1b53d891f0e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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') } } }