Skip to content

Commit

Permalink
Refactor snapshot versioning and deployment process v2
Browse files Browse the repository at this point in the history
(cherry picked from commit 6ffafc5)
  • Loading branch information
lamba92 committed Dec 8, 2023
1 parent b580321 commit a19e0bb
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,19 @@ tasks {

patchPluginXml {
pluginId = pkgsPluginId
version = when {
versionString.endsWith("-SNAPSHOT") ->
"${versionString.removePrefix("-SNAPSHOT")}.$snapshotMinorVersion"

else -> versionString
}
version = versionString.replace("-SNAPSHOT", ".$snapshotMinorVersion")
}
val buildShadowPlugin by registering(Zip::class) {
group = "intellij"
from(shadowJar) {
rename {
"package-search-plugin-" + when {
versionString.endsWith("-SNAPSHOT") ->
versionString.replace("-SNAPSHOT", ".$snapshotMinorVersion")

else -> versionString
} + ".jar"
}
rename { "packageSearch.jar" }
}
from(tooling) {
rename { "gradle-tooling.jar" }
}
into("$pkgsPluginId/lib")
archiveFileName = "packagesearch-plugin.zip"
archiveFileName = "packageSearch-${project.version}.zip"
.replace("-SNAPSHOT", ".$snapshotMinorVersion")
destinationDirectory = layout.buildDirectory.dir("distributions")
}

Expand Down

0 comments on commit a19e0bb

Please sign in to comment.