Move strip-kotlin-annotations script to buildSrc

... and invoke it directly in kotlin-reflect's build file, instead of
running another instance of compiler to evaluate a script. Also only
strip kotlin.Metadata, since it's the only annotation with heavy
metadata on Kotlin-generated class files
This commit is contained in:
Alexander Udalov
2017-11-07 17:27:54 +01:00
parent 38bee07fd0
commit 208e68a968
7 changed files with 24 additions and 73 deletions
-19
View File
@@ -206,22 +206,3 @@ ext.createPreprocessorTask = { Project project, def name, def sourceDir, def tar
args = [sourceDir, targetDir, profile]
}
}
ext.createScriptTask = { Project project, def name, Closure<JavaExec> configureClosure = null ->
JavaExec task = project.tasks.create(name, JavaExec)
return project.configure(task) {
// dependsOn(rootProject.prepareBootstrap)
classpath = rootProject.configurations.scriptCompile
main = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler"
args = [
"-script",
"-version",
"-no-stdlib",
"-cp", rootProject.configurations.scriptRuntime.asPath]
if (configureClosure != null) {
configureClosure.delegate = it
configureClosure.call()
}
}
}