Gradle: Basic Kotlin NodeJS tests runner

#KT-30531 Fixed
#KT-30528 Fixed
This commit is contained in:
Sergey Rostov
2019-02-20 15:14:05 +03:00
parent b6e675f934
commit d467e4209a
54 changed files with 3968 additions and 64 deletions
@@ -15,13 +15,14 @@ publish()
// todo: make lazy
val jar: Jar by tasks
runtimeJar(rewriteDepsToShadedCompiler(jar))
val jarContents by configurations.creating
sourcesJar()
javadocJar()
repositories {
google()
maven(url = "https://plugins.gradle.org/m2/")
}
pill {
@@ -61,6 +62,9 @@ dependencies {
runtime(projectRuntimeJar(":kotlin-scripting-compiler-embeddable"))
runtime(project(":kotlin-reflect"))
jarContents(compileOnly(intellijDep()) { includeJars("serviceMessages") })
jarContents(projectArchives(":kotlin-test-nodejs-runner"))
// com.android.tools.build:gradle has ~50 unneeded transitive dependencies
compileOnly("com.android.tools.build:gradle:3.0.0") { isTransitive = false }
compileOnly("com.android.tools.build:gradle-core:3.0.0") { isTransitive = false }
@@ -77,6 +81,17 @@ dependencies {
testCompileOnly(project(":kotlin-annotation-processing-gradle"))
}
runtimeJar(rewriteDepsToShadedCompiler(jar)) {
dependsOn(jarContents)
from {
jarContents.asFileTree.map {
if (it.endsWith(".jar")) zipTree(it)
else it
}
}
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String