I’m trying to upgrade to the latest version of gradle 7.0 (or at least 6.8.3) and I’m looking for ways for developers to try out the latest version of gradle and if they find any problem they can easily revert it to the older version.
Couple options I can see so far:
use ./gradlew wrapper --gradle-version 7.0 then run Gradle build, to revert it just run ./gradlew wrapper --gradle-version 6.3. This might create some modified git version control (one of gradlew, gradle-wrapper.properties, etc…) and developers might accidentally check it in
You can just not use the gradle wrapper, but use some installed or provisioned Gradle installation directly.
For this you can for example use some tool like SDKMAN, or you should also be able to use one of the wrapper provisioned versions at ~/.gradle/wrapper/dists/ directly.
@Vampire thanks for your suggestion on SDKMAN, and can you elaborate more on how can I use the wrapper provisioned versions at ~/.gradle/wrapper/dists directly?
sorry, I were confused and not sure how to do it
as I can’t use ./gradlew myTask because it would still use the old version of gradle distribution
I did run ./gradlew wrapper --distribution-type=ALL --gradle-version=6.8.3 , so I’m pretty sure it has the version I want to experiment with.
Are you saying there’s command line like ./gradlew --use-version 6.8.3 myTask and it would use the 6.8.3 of gradle eventhough my gradle-wrapper.properties currently using 6.3