-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When upgrading wrapper use scripts and JAR from target Gradle version #884
Comments
Could this be a good candidate to modularize and pull the latest wrapper generation module if connected to the internet? If not, then we can use the current version in the distribution. This would enable for every version going forward to benefit with the latest code generation code. The downside is it would be more work to implement at this stage. |
@eriwen How much work it is? Can we fit it into 3.3 to reduce the impact of 3.2.1 wrapper bug? |
@pioterj I suspect not so much work that we can't get it in for 3.3. We will prioritize it highly in our sprint planning Monday. |
Actually is that issue really a solution to avoid impact of 3.2.1 wrapper bug? What if a user just upgrade gradle version manually in wrapper.properties? |
I think we should deprecate editing the wrapper properties directly, and move towards the user always using the wrapper generation logic directly or indirectly, so that we can do whatever upgrades, validation and optimisations make sense for the delta from old version to new version. And so we can move the responsibility for determining which Gradle runtime version to use, and where to get it from, and which parts are required, out of a properties file and into build logic. |
Sounds good in the long term, @adammurdoch. What do we do for 3.3 though? Can we for instance give a meaningful error message for users running into GRADLE-3582 or GRADLE-3583 asking them to regenerate the wrapper files by detecting that they were generated by 3.2? |
Given our current priorities and timeline, I'm de-prioritizing this for now. |
In Gradle 4.7, this issue is still present. I have to call the update task twice every time a new Gradle version is released. |
I've not been able to spot a nice solution to this with the current packaging - they all seem to necessitate weird nested/multiple executions if you want Unless:
Curious what the current thinking is, or whether this is headed for a can't-fix under that current wrapper architecture. |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
Particularly while #12273 has not been addressed, I think this should remain open. Unless you know to run |
I was about to file an issue that the wrapper task needs to be run twice after updating its configuration, but it appears that might be the same as this issue. Let me know otherwise if I should file this as a separate issue: Steps to Reproduce
Expected BehaviorThe './gradle/wrapper/gradle-wrapper.properties', './gradle/wrapper/gradle-wrapper.jar', './gradlew', and './gradlew.bat' files are all updated (as applicable) for the new version. Current BehaviorOnly the './gradle/wrapper/gradle-wrapper.properties' is updated with a new If this is not trivial to fix, perhaps logging a warning that the task needs to be run a second time would be helpful in the interim (though maybe it's nontrivial to identify the initial invocation after a |
I cannot believe this ticket is STILL open after more than 7 years from it being reported? Guys this is one of the most fundamental part of Gradle. Furthermore, it's listed on the Upgrade page: People (including me) would expect this to work. I must always go after my colleges and verify if the Is there any ETA for this? |
Expected Behavior
When executing
gradle wrapper --gradle-version
, thegradlew
scripts andwrapper.jar
should be taken from the version of Gradle given as the parameter (i.e. the target version).Current Behavior
Currently the scripts and the
wrapper.jar
is updated, but to the version of Gradle used to execute thewrapper
task, not the target version.Context
Currently if the user wants to upgrade to the latest wrapper scripts and JAR, they need to run
./gradlew wrapper
after the wrapper version has been upgraded. This is not convenient. What's worse, most people don't know about this, and thus they use the wrapper scripts and JAR from a previous version of Gradle, which is mostly harmless, but it still violates the rule of least astonishment.The text was updated successfully, but these errors were encountered: