Fix idea plugin jar name and ultimate build
This commit is contained in:
@@ -95,6 +95,7 @@ val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
|||||||
dependsOn("$p:classes")
|
dependsOn("$p:classes")
|
||||||
from(getSourceSetsFrom(p)["main"].output)
|
from(getSourceSetsFrom(p)["main"].output)
|
||||||
}
|
}
|
||||||
|
archiveName = "kotlin-plugin.jar"
|
||||||
}
|
}
|
||||||
|
|
||||||
ideaPlugin {
|
ideaPlugin {
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ buildscript {
|
|||||||
|
|
||||||
apply { plugin("kotlin") }
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
val ideaCommunityPlugin by configurations.creating
|
|
||||||
|
|
||||||
val ideaProjectResources = project(":idea").the<JavaPluginConvention>().sourceSets["main"].output.resourcesDir
|
val ideaProjectResources = project(":idea").the<JavaPluginConvention>().sourceSets["main"].output.resourcesDir
|
||||||
|
|
||||||
evaluationDependsOn(":prepare:idea-plugin")
|
evaluationDependsOn(":prepare:idea-plugin")
|
||||||
@@ -40,7 +38,6 @@ dependencies {
|
|||||||
compile(ideaUltimatePreloadedDeps("*.jar", subdir = "nodejs_plugin/NodeJS/lib"))
|
compile(ideaUltimatePreloadedDeps("*.jar", subdir = "nodejs_plugin/NodeJS/lib"))
|
||||||
compile(ideaUltimateSdkCoreDeps("annotations", "trove4j", "intellij-core"))
|
compile(ideaUltimateSdkCoreDeps("annotations", "trove4j", "intellij-core"))
|
||||||
compile(ideaUltimateSdkDeps("openapi", "idea", "util"))
|
compile(ideaUltimateSdkDeps("openapi", "idea", "util"))
|
||||||
// compile(ideaUltimatePluginDeps("gradle-tooling-api", plugin = "gradle"))
|
|
||||||
compile(ideaUltimatePluginDeps("*.jar", plugin = "CSS"))
|
compile(ideaUltimatePluginDeps("*.jar", plugin = "CSS"))
|
||||||
compile(ideaUltimatePluginDeps("*.jar", plugin = "DatabaseTools"))
|
compile(ideaUltimatePluginDeps("*.jar", plugin = "DatabaseTools"))
|
||||||
compile(ideaUltimatePluginDeps("*.jar", plugin = "JavaEE"))
|
compile(ideaUltimatePluginDeps("*.jar", plugin = "JavaEE"))
|
||||||
@@ -63,7 +60,6 @@ dependencies {
|
|||||||
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
|
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||||
testCompile(project(":generators")) { isTransitive = false }
|
testCompile(project(":generators")) { isTransitive = false }
|
||||||
testCompile(projectTests(":idea"))
|
testCompile(projectTests(":idea"))
|
||||||
// testCompileOnly(projectTests(":idea:idea-gradle"))
|
|
||||||
testCompile(commonDep("junit:junit"))
|
testCompile(commonDep("junit:junit"))
|
||||||
testCompile(ideaUltimateSdkDeps("gson"))
|
testCompile(ideaUltimateSdkDeps("gson"))
|
||||||
testCompile(preloadedDeps("kotlinx-coroutines-core"))
|
testCompile(preloadedDeps("kotlinx-coroutines-core"))
|
||||||
@@ -94,8 +90,6 @@ dependencies {
|
|||||||
testRuntime(ideaUltimatePluginDeps("*.jar", plugin = "copyright"))
|
testRuntime(ideaUltimatePluginDeps("*.jar", plugin = "copyright"))
|
||||||
testRuntime(ideaUltimatePluginDeps("*.jar", plugin = "java-decompiler"))
|
testRuntime(ideaUltimatePluginDeps("*.jar", plugin = "java-decompiler"))
|
||||||
testRuntime(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
testRuntime(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||||
|
|
||||||
ideaCommunityPlugin(projectRuntimeJar(":prepare:idea-plugin"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val preparedResources = File(buildDir, "prepResources")
|
val preparedResources = File(buildDir, "prepResources")
|
||||||
@@ -133,14 +127,14 @@ val preparePluginXml by task<Copy> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val communityPluginProject = ":prepare:idea-plugin"
|
||||||
|
|
||||||
val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
dependsOn(preparePluginXml)
|
dependsOn(preparePluginXml)
|
||||||
project(":prepare:idea-plugin").afterEvaluate {
|
dependsOn("$communityPluginProject:shadowJar")
|
||||||
ideaCommunityPlugin.files.forEach {
|
val communityPluginJar = project(communityPluginProject).configurations["runtimeJar"].artifacts.files.singleFile
|
||||||
from(zipTree(it), { exclude("META-INF/plugin.xml") })
|
from(zipTree(communityPluginJar), { exclude("META-INF/plugin.xml") })
|
||||||
}
|
|
||||||
}
|
|
||||||
from(preparedResources, { include("META-INF/plugin.xml") })
|
from(preparedResources, { include("META-INF/plugin.xml") })
|
||||||
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
|
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
|
||||||
archiveName = "kotlin-plugin.jar"
|
archiveName = "kotlin-plugin.jar"
|
||||||
@@ -150,7 +144,8 @@ val ideaPluginDir: File by rootProject.extra
|
|||||||
val ideaUltimatePluginDir: File by rootProject.extra
|
val ideaUltimatePluginDir: File by rootProject.extra
|
||||||
|
|
||||||
task<Copy>("ideaUltimatePlugin") {
|
task<Copy>("ideaUltimatePlugin") {
|
||||||
dependsOnTaskIfExistsRec("idea-plugin", rootProject)
|
dependsOn("$communityPluginProject:ideaPlugin")
|
||||||
|
dependsOnTaskIfExistsRec("ideaPlugin", rootProject)
|
||||||
into(ideaUltimatePluginDir)
|
into(ideaUltimatePluginDir)
|
||||||
from(ideaPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
from(ideaPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||||
from(jar, { into("lib") })
|
from(jar, { into("lib") })
|
||||||
|
|||||||
Reference in New Issue
Block a user