refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

refreshVersionsMigrate corrupts build.gradle file

Open Arc-E-Tect opened this issue 3 years ago • 0 comments

🐛 Describe the bug

When running .\gradlew refreshVersionsMigrate --mode=XXX my build.gradle file is corrupted. Running a build afterwards fails because of changes made by the refreshVersionsMigrate task

⚠️ Current behavior

The section

tasks.withType(JavaCompile) {
    options. Encoding = 'UTF-8'
    options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}

Turned into

tasks.withType(JavaCompile) {
    options. Encoding = 'UTF-8'
    options.compilerArgs << "-Xlint:unchecked:_" << "-Xlint:deprecation:_"
}

✅ Expected behavior

I don't expect that section to be touched at all because it has nothing to do with dependencies and versions.

💣 Steps to reproduce

Add the block

tasks.withType(JavaCompile) {
    options. Encoding = 'UTF-8'
    options.compilerArgs << "-Xlint:unchecked:_" << "-Xlint:deprecation:_"
}

to your build.gradle file and run .\gradlew refreshVersionsMigrate --mode=VersionsPropertiesOnly

Arc-E-Tect avatar Jan 20 '23 20:01 Arc-E-Tect