Skip to content

Commit 8fd20b2

Browse files
committed
Automate version updates
Currently the updating process of the hivemq projects involves checking out every project independently and updating their version in the gradle.properties file. To mitigate this repetitive manual work, we introduce the plugins project with a first Gradle plugin, which updates this version automatically to the version set in the hivemq project & commits and pushes the updated versions to the remote-tracking branch. As the open-source projects should still work as before, the plugins are only applied optionally, so that contributors do not need the plugins project. Furthermore, custom files, in which the current version should also be updated can be defined via `project.ext.set("versionUpdaterFiles", files("myFile"))`. Added Gradle tasks: updateVersion, publishNewVersion Resolves 1259
1 parent 9a30110 commit 8fd20b2

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To use the SDK, add the following dependency to your Maven project:
2323
<dependency>
2424
<groupId>com.hivemq</groupId>
2525
<artifactId>hivemq-kafka-extension-customization-sdk</artifactId>
26-
<version>4.6.1</version>
26+
<version>4.6.2</version>
2727
</dependency>
2828
----
2929

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
buildscript {
2+
dependencies {
3+
if (gradle.includedBuilds.find { it.name == "plugins"} != null) {
4+
classpath("com.hivemq:plugins")
5+
}
6+
}
7+
}
8+
19
plugins {
210
id("java-library")
311
id("maven-publish")
@@ -9,6 +17,11 @@ plugins {
917
id("com.github.sgtsilvio.gradle.javadoc-links")
1018
}
1119

20+
if (gradle.includedBuilds.find { it.name == "plugins"} != null) {
21+
apply(plugin = "com.hivemq.version-updater")
22+
project.ext.set("versionUpdaterFiles", files("README.adoc"))
23+
}
24+
1225

1326
/* ******************** metadata ******************** */
1427

settings.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ pluginManagement {
1313
if (file("../hivemq-extension-sdk").exists()) {
1414
includeBuild("../hivemq-extension-sdk")
1515
}
16+
if (file("../plugins").exists()) {
17+
includeBuild("../plugins")
18+
}
1619

1720
includeBuild("../hivemq-platform")

0 commit comments

Comments
 (0)