quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.36k stars 2.56k forks source link

Running Quarkus CLI rewrites gradle.properties #41182

Open rodcheater opened 3 weeks ago

rodcheater commented 3 weeks ago

Describe the bug

Running the Quarkus CLI to add an extension reorders the properties in gradle.properties. It also adds a timestamp. This is quite hostile to version control.

Expected behavior

The file is not changed if no changes are required. If changes are required existing properties are not reordered and comments are not removed. No timestamp is added.

Actual behavior

The properties are reordered and a timestamp is added.

How to Reproduce?

Steps to reproduce

  1. Create a Quarkus app with Gradle support: quarkus create app --gradle && cd code-with-quarkus
  2. View gradle.properties.
  3. Add an extension, e.g.: quarkus extension add io.quarkus:quarkus-kotlin
  4. View gradle.properties again and note the changes.

Output of uname -a or ver

Darwin Rods-MacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 arm64

Output of java -version

openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment Homebrew (build 21.0.2) OpenJDK 64-Bit Server VM Homebrew (build 21.0.2, mixed mode, sharing)

Quarkus version or git rev

3.9.2

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.6

Additional information

No response

quarkus-bot[bot] commented 3 weeks ago

/cc @ebullient (cli), @geoand (kotlin), @glefloch, @maxandersen (cli), @quarkusio/devtools