Build: remove ideaPlugin helper
Plugin distribution building logic is now handled solely by idea-plugin project
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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"), "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user