Build: remove ideaPlugin helper

Plugin distribution building logic is now handled solely by idea-plugin project
This commit is contained in:
Vyacheslav Gerasimov
2019-04-11 15:56:45 +03:00
parent 7710942ec5
commit 478208b070
2 changed files with 11 additions and 23 deletions
-21
View File
@@ -140,27 +140,6 @@ fun Project.publish(body: Upload.() -> Unit = {}): Upload {
}
}
fun Project.ideaPlugin(subdir: String = "lib", body: AbstractCopyTask.() -> Unit): Copy {
val thisProject = this
val pluginTask = task<Copy>("ideaPlugin") {
body()
into(File(rootProject.extra["ideaPluginDir"].toString(), subdir).path)
rename("-${java.util.regex.Pattern.quote(thisProject.version.toString())}", "")
}
task("idea-plugin") {
dependsOn(pluginTask)
}
return pluginTask
}
fun Project.ideaPlugin(subdir: String = "lib"): Copy = ideaPlugin(subdir) {
runtimeJarTaskIfExists()?.let {
from(it)
}
}
fun Project.dist(
targetDir: File? = null,
targetName: String? = null,
+11 -2
View File
@@ -1,3 +1,5 @@
import java.util.regex.Pattern.quote
description = "Kotlin IDEA plugin"
plugins {
@@ -140,12 +142,19 @@ val jar = runtimeJar {
archiveName = "kotlin-plugin.jar"
}
ideaPlugin {
duplicatesStrategy = DuplicatesStrategy.FAIL // Investigation is required if we have multiple jars with same name
val ideaPluginDir: File by rootProject.extra
tasks.register<Copy>("ideaPlugin") {
dependsOn(":dist")
into(File(ideaPluginDir, "lib"))
duplicatesStrategy = DuplicatesStrategy.FAIL // Investigation is required if we have multiple jars with same name
from(jar)
from(libraries)
from(jpsPlugin) {
into("jps")
}
rename(quote("-$version"), "")
}