diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 813bcbca04fc39..2efe111f0a409a 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -186,6 +186,7 @@ updates:
- dependency-name: biz.paluch.logging:logstash-gelf
- dependency-name: org.bitbucket.b_c:jose4j
- dependency-name: io.fabric8:maven-model-helper
+ - dependency-name: org.codejive:java-properties
ignore:
# this one cannot be upgraded due to the usage of proxies in new versions
# the proxy implements interfaces in a random order which causes issues
diff --git a/extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/gradle.properties b/extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/gradle.properties
index 644310c2b3a94d..c77b7693b00527 100644
--- a/extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/gradle.properties
+++ b/extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/gradle.properties
@@ -1,5 +1,5 @@
-#Gradle properties
-#Tue Mar 17 10:20:48 UTC 2020
+# Gradle properties
+
quarkusPluginVersion=${project.version}
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=${project.version}
diff --git a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/base/gradle.tpl.qute.properties b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/base/gradle.tpl.qute.properties
index d3160667382c54..80d94672c22624 100644
--- a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/base/gradle.tpl.qute.properties
+++ b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/base/gradle.tpl.qute.properties
@@ -1,6 +1,7 @@
-#Gradle properties
+# Gradle properties
+
quarkusPluginId={quarkus.gradle-plugin.id}
quarkusPluginVersion={quarkus.gradle-plugin.version}
quarkusPlatformGroupId={quarkus.platform.group-id}
quarkusPlatformArtifactId={quarkus.platform.artifact-id}
-quarkusPlatformVersion={quarkus.platform.version}
\ No newline at end of file
+quarkusPlatformVersion={quarkus.platform.version}
diff --git a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle/base/gradle.tpl.qute.properties b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle/base/gradle.tpl.qute.properties
index d3160667382c54..80d94672c22624 100644
--- a/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle/base/gradle.tpl.qute.properties
+++ b/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle/base/gradle.tpl.qute.properties
@@ -1,6 +1,7 @@
-#Gradle properties
+# Gradle properties
+
quarkusPluginId={quarkus.gradle-plugin.id}
quarkusPluginVersion={quarkus.gradle-plugin.version}
quarkusPlatformGroupId={quarkus.platform.group-id}
quarkusPlatformArtifactId={quarkus.platform.artifact-id}
-quarkusPlatformVersion={quarkus.platform.version}
\ No newline at end of file
+quarkusPlatformVersion={quarkus.platform.version}
diff --git a/independent-projects/tools/devtools-common/pom.xml b/independent-projects/tools/devtools-common/pom.xml
index 2e5832fddb6aff..e7b70a29daea20 100644
--- a/independent-projects/tools/devtools-common/pom.xml
+++ b/independent-projects/tools/devtools-common/pom.xml
@@ -106,6 +106,10 @@
jakarta.enterprise
jakarta.enterprise.cdi-api
+
+ org.codejive
+ java-properties
+
org.junit.jupiter
junit-jupiter
diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFile.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFile.java
index dd5ea2931ce1ee..1eb851393c53ef 100644
--- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFile.java
+++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFile.java
@@ -7,12 +7,13 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.util.Properties;
import java.util.Scanner;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.codejive.properties.Properties;
+
import io.quarkus.maven.dependency.ArtifactCoords;
import io.quarkus.maven.dependency.ArtifactKey;
import io.quarkus.registry.catalog.ExtensionCatalog;
@@ -47,11 +48,8 @@ public void writeToDisk() throws IOException {
if (rootProjectPath != null) {
Files.write(rootProjectPath.resolve(getSettingsGradlePath()), getModel().getRootSettingsContent().getBytes());
if (hasRootProjectFile(GRADLE_PROPERTIES_PATH)) {
- try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
- getModel().getRootPropertiesContent().store(out, "Gradle properties");
- Files.write(rootProjectPath.resolve(GRADLE_PROPERTIES_PATH),
- out.toByteArray());
- }
+ getModel().getRootPropertiesContent().store(rootProjectPath.resolve(GRADLE_PROPERTIES_PATH),
+ "Gradle properties");
}
} else {
writeToProjectFile(getSettingsGradlePath(), getModel().getSettingsContent().getBytes());
diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFilesCreator.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFilesCreator.java
index 5d6ad5618536f5..fe67d10e8dd706 100644
--- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFilesCreator.java
+++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFilesCreator.java
@@ -8,9 +8,10 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
-import java.util.Properties;
import java.util.concurrent.atomic.AtomicReference;
+import org.codejive.properties.Properties;
+
import io.quarkus.devtools.project.QuarkusProject;
import io.quarkus.devtools.project.buildfile.AbstractGradleBuildFile.Model;
import io.quarkus.maven.dependency.ArtifactCoords;
diff --git a/independent-projects/tools/pom.xml b/independent-projects/tools/pom.xml
index fdb667652e5100..28abaed4649c61 100644
--- a/independent-projects/tools/pom.xml
+++ b/independent-projects/tools/pom.xml
@@ -60,6 +60,7 @@
3.2.0
2.0.2
4.2.1
+ 0.0.7
registry-client
@@ -175,6 +176,11 @@
jboss-logging
${jboss-logging.version}
+
+ org.codejive
+ java-properties
+ ${java-properties.version}
+
org.junit.jupiter
junit-jupiter
diff --git a/integration-tests/gradle/src/main/resources/compile-only-lombok/gradle.properties b/integration-tests/gradle/src/main/resources/compile-only-lombok/gradle.properties
index cac35f5608ec1c..542d9cf933db7a 100644
--- a/integration-tests/gradle/src/main/resources/compile-only-lombok/gradle.properties
+++ b/integration-tests/gradle/src/main/resources/compile-only-lombok/gradle.properties
@@ -1,6 +1,6 @@
-#Gradle properties
-#Tue Aug 04 17:04:55 CEST 2020
+# Gradle properties
+
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformGroupId=io.quarkus
org.gradle.logging.level=INFO
-lombokVersion=1.18.12
\ No newline at end of file
+lombokVersion=1.18.12
diff --git a/integration-tests/gradle/src/main/resources/multi-module-included-build/gradle.properties b/integration-tests/gradle/src/main/resources/multi-module-included-build/gradle.properties
index a0bb7cd4da3b42..0b9b349582ac38 100644
--- a/integration-tests/gradle/src/main/resources/multi-module-included-build/gradle.properties
+++ b/integration-tests/gradle/src/main/resources/multi-module-included-build/gradle.properties
@@ -1,4 +1,4 @@
-#Gradle properties
-#Tue Aug 25 06:41:36 GMT 2020
+# Gradle properties
+
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformGroupId=io.quarkus
diff --git a/integration-tests/gradle/src/main/resources/multi-module-kotlin-project/gradle.properties b/integration-tests/gradle/src/main/resources/multi-module-kotlin-project/gradle.properties
index b8ff81712a4976..d54b9c8a6b92bd 100644
--- a/integration-tests/gradle/src/main/resources/multi-module-kotlin-project/gradle.properties
+++ b/integration-tests/gradle/src/main/resources/multi-module-kotlin-project/gradle.properties
@@ -1,5 +1,5 @@
-#Gradle properties
-#Wed May 06 08:31:08 UTC 2020
+# Gradle properties
+
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformGroupId=io.quarkus
diff --git a/integration-tests/gradle/src/main/resources/multi-module-with-empty-module/gradle.properties b/integration-tests/gradle/src/main/resources/multi-module-with-empty-module/gradle.properties
index e6b64c6a569571..0b9b349582ac38 100644
--- a/integration-tests/gradle/src/main/resources/multi-module-with-empty-module/gradle.properties
+++ b/integration-tests/gradle/src/main/resources/multi-module-with-empty-module/gradle.properties
@@ -1,3 +1,4 @@
-#Gradle properties
+# Gradle properties
+
quarkusPlatformArtifactId=quarkus-bom
-quarkusPlatformGroupId=io.quarkus
\ No newline at end of file
+quarkusPlatformGroupId=io.quarkus