87 lines
2.4 KiB
Kotlin
87 lines
2.4 KiB
Kotlin
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath("com.github.jengelman.gradle.plugins:shadow:1.2.3")
|
|
}
|
|
}
|
|
|
|
val projectsToShadow = listOf(
|
|
":core:builtins",
|
|
":plugins:annotation-based-compiler-plugins-ide-support",
|
|
":compiler:backend",
|
|
":compiler:backend-common",
|
|
":build-common",
|
|
":compiler:cli-common",
|
|
":compiler:container",
|
|
":compiler:daemon-common",
|
|
":core",
|
|
":eval4j",
|
|
":idea:formatter",
|
|
":compiler:frontend",
|
|
":compiler:frontend.java",
|
|
":compiler:frontend.script",
|
|
":idea:ide-common",
|
|
":idea",
|
|
":idea:idea-android",
|
|
":idea:idea-android-output-parser",
|
|
":idea:idea-core",
|
|
":idea:idea-jps-common",
|
|
//":idea-ultimate",
|
|
":compiler:ir.psi2ir",
|
|
":compiler:ir.tree",
|
|
":j2k",
|
|
":js:js.ast",
|
|
":js:js.frontend",
|
|
":js:js.parser",
|
|
":js:js.serializer",
|
|
":compiler:light-classes",
|
|
":compiler:plugin-api",
|
|
":compiler:preloader",
|
|
":compiler:resolution",
|
|
":compiler:serialization",
|
|
":compiler:util",
|
|
":core:util.runtime")
|
|
|
|
val packedJars by configurations.creating
|
|
val sideJars by configurations.creating
|
|
|
|
dependencies {
|
|
packedJars(commonDep("com.github.spullara.cli-parser", "cli-parser"))
|
|
packedJars(preloadedDeps("protobuf-${rootProject.extra["versions.protobuf-java"]}"))
|
|
sideJars(project(":kotlin-script-runtime"))
|
|
sideJars(commonDep("io.javaslang", "javaslang"))
|
|
sideJars(commonDep("javax.inject"))
|
|
sideJars(preloadedDeps("markdown", "kotlinx-coroutines-core", "kotlinx-coroutines-jdk8", "uast-java"))
|
|
}
|
|
|
|
val targetJar = File(buildDir, "libs", "kotlin-plugin.jar")
|
|
|
|
val shadowTask = task<ShadowJar>("shadowJar") {
|
|
setupRuntimeJar("Kotlin IDEA plugin")
|
|
archiveName = targetJar.canonicalPath
|
|
projectsToShadow.forEach {
|
|
dependsOn("$it:classes")
|
|
project(it).let { p ->
|
|
p.pluginManager.withPlugin("java") {
|
|
from(p.the<JavaPluginConvention>().sourceSets.getByName("main").output)
|
|
}
|
|
}
|
|
}
|
|
from(files("$rootDir/resources/kotlinManifest.properties"))
|
|
from(packedJars.files)
|
|
}
|
|
|
|
ideaPlugin {
|
|
dependsOn(shadowTask)
|
|
from(targetJar)
|
|
dependsOn(":kotlin-script-runtime:jar")
|
|
from(sideJars)
|
|
}
|
|
|