Files
kotlin-fork/plugins/scripting/scripting-gradle/build.gradle.kts
T
Ilya Chernikov a46dd5b30e Avoid using reflected types in the scripting API
since it causes numerous classloading issues. Using the wrapping types
and reload them in the proper context when needed.
Note: this version supports only classes, but the wrapping type could
be extended to support other types in the future.
+ numerous fixes related to proper loading and handling of the templates.
2018-05-28 22:10:56 +02:00

64 lines
1.4 KiB
Kotlin

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.pill.PillExtension.Variant
description = "Kotlin Scripting Compiler Plugin for Gradle"
plugins {
kotlin("jvm")
id("com.gradle.plugin-publish")
`java-gradle-plugin`
id("jps-compatible")
}
pill {
variant = Variant.FULL
}
val packedJars by configurations.creating
dependencies {
compile(project(":kotlin-gradle-plugin-api"))
compileOnly(project(":kotlin-scripting-compiler"))
packedJars(project(":kotlin-scripting-compiler")) { isTransitive = false }
runtime(project(":kotlin-scripting-common"))
runtime(project(":kotlin-scripting-jvm"))
runtime(project(":kotlin-scripting-misc"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
val jar: Jar by tasks
jar.apply {
classifier = "base"
}
runtimeJar(rewriteDepsToShadedCompiler(
task<ShadowJar>("shadowJar") {
from(packedJars)
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
}
))
sourcesJar()
javadocJar()
val gradlePluginId = "org.jetbrains.kotlin.plugin.scripting"
pluginBundle {
(plugins) {
gradlePluginId {
id = gradlePluginId
displayName = "Gradle plugin for kotlin scripting"
description = displayName
}
}
}
publish()
projectTest {
workingDir = rootDir
}