mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-128621 auto set version and since-build
This commit is contained in:
@@ -666,6 +666,15 @@ public def layoutCommunityPlugins(String home, boolean maySkipAndroidPlugin = fa
|
||||
}
|
||||
}
|
||||
|
||||
def setPluginVersionAndSince(String moduleName, String version) {
|
||||
def file = new File(projectBuilder.moduleOutput(findModule(moduleName)) + "/META-INF/plugin.xml")
|
||||
if (file.isFile()) {
|
||||
def text = file.text
|
||||
if (!text.contains("<version>")) {
|
||||
file.text = text.replace("</id>", "</id>\n <version>${version}</version>\n <idea-version since-build=\"${version}\" until-build=\"${version}\"/>\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def layoutPlugin(String moduleName) {
|
||||
layoutPlugin(moduleName, moduleName, {})
|
||||
@@ -697,6 +706,8 @@ def layoutPlugin(String pluginName, String moduleName, String jarName, Closure c
|
||||
return
|
||||
}
|
||||
|
||||
setPluginVersionAndSince(moduleName, requireProperty("buildNumber", requireProperty("build.number", snapshot)))
|
||||
|
||||
dir(pluginName) {
|
||||
dir("lib") {
|
||||
jar("${jarName}.jar") {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
<p>Supports sharing settings between installations of IntelliJ Platform based products used by the same developer (or team) on different computers.</p>
|
||||
<p>Synchronization is performed automatically after successful completion of "Update Project" or "Push" actions. Also you can do sync using VCS -> Sync Settings.</p>
|
||||
<p>See <a href="https://github.com/develar/settings-repository">project page</a> for more info.</p>]]></description>
|
||||
<version>999.999</version>
|
||||
<idea-version since-build="142.4255" until-build="143.0"/>
|
||||
<vendor>JetBrains</vendor>
|
||||
|
||||
<!-- otherwise plugin will be not loaded in tests -->
|
||||
|
||||
Reference in New Issue
Block a user