Trying to run `gradle init` again also now fails. ...
# community-support
l
Trying to run
gradle init
again also now fails. What do I have to delete from the root dir to do the init from scratch?
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Regarding the problem, you are hitting this bug: https://github.com/gradle/gradle/issues/28251
If you just delete the line from the settings script it should work as good as it gets. Btw. I highly recommend using Kotlin DSL. By now it is the default DSL, you immediately get type-safe build scripts, actually helpful error messages if you mess up the syntax, and amazingly better IDE support if you use a good IDE like IntelliJ IDEA or Android Studio.
1
l
@Vampire, thank you! According to the bug, it has been fixed and merged. How do I get the fix? Is there a version of Gradle that now has the fix?
v
According to milestone 8.8 will have it, you can try with a nightly build if you want
Or you just use one of the work-arounds, that is answering "no" to the last question, or deleting the one bad line from the setting script after the task finished.
l
Thank you. But just to be clear: In order to “answer ‘no’ to the last question” I have to have “init” working.
If you just delete the line from the settings script it should work as good as it gets.
Which line? the “includeBuild(‘build-logic’)” line? Or should I just delete all the Gradle directories/files: /gradle, /build.gradle, /gradlew, /gradlew.bat, /mvnw, mvnw.cmd, /settings.gradle, and try
gradle init
again?
v
In order to “answer ‘no’ to the last question” I have to have “init” working.
I don't get what you say, the question is part of
init
.
Which line? the “includeBuild(‘build-logic’)” line?
Yes, that's the bug, that the line is added even though it is not created for a single-module Maven build that is "transformed"
/mvnw, mvnw.cmd
Those are Maven, not Gradle. The others you could of course delete to run
init
again, but as I said, just delete that line and you should be fine.
l
I did finally get it working! Thank you!
👌 1