Skip to content

remove unnecessary Gradle wrapper configuration#296

Closed
oreissig wants to merge 1 commit intoapache:masterfrom
oreissig:remove-unnecessary-wrapper-configuration
Closed

remove unnecessary Gradle wrapper configuration#296
oreissig wants to merge 1 commit intoapache:masterfrom
oreissig:remove-unnecessary-wrapper-configuration

Conversation

@oreissig
Copy link
Contributor

wrapper is an implicit Gradle task, you don't need to create one manually, just call e.g.
./gradlew wrapper --gradle-version=2.12

@blackdrag
Copy link
Contributor

not sure about this commit. You are right in that there is a builtin wrapper task and that our wrapper task should not be needed. But the soruce distribution comes without the gradlew files. So how does a user know what gradle version to use to ensure there are no problems with the built related to the built tool version? Right now we can tell people to use any gradle to execute the wrapper task and then work with the wrappers from there on

@oreissig
Copy link
Contributor Author

Thanks for the feedback. Actually I forgot about the source distribution. Why does it miss the gradle wrapper at all?

Now that you mentioned it, one of my previous pull requests removed the declaration of wrapper generation as default task in Gradle, thereby breaking the documentation describing the bootstrap of the source distribution. We should either

  1. include the Gradle wrapper in the source distribution, or
  2. change the README.adoc to call gradle wrapper instead of gradle (we may configure the Gradle version on the implicit wrapper task instead of defining our own).

@paulk-asert
Copy link
Contributor

-1 on this change. Apache source distro's can't have the wrapper jar (a binary). They make some minor exceptions but to date the gradle wrapper isn't one of the allowable exceptions. The downloadWrapper task was meant to be a default task but that must have been overlooked in earlier commits. I just fixed that, so now the doco should be correct. This still leaves the implicit wrapper task with an explicit version free should someone wish to not abide by our recommendations.

@oreissig
Copy link
Contributor Author

Thanks for the explanation.

I still think it is a good idea to not use a default task, so that Gradle prints a helpful splash screen when invoked without arguments instead of altering your working copy. I propose to document the use of Gradle's implicit wrapper task. Its version can still be overridden on the command line as described in the Gradle manual. I may also link to the Gradle documentation describing this use case in the README.adoc if desired.

@oreissig
Copy link
Contributor Author

rebased from master

- remove default task, this makes Gradle print a helpful splash screen when invoked without arguments
- a custom gradle version can still be generated with `gradle wrapper --gradle-version 2.0` (see https://docs.gradle.org/current/userguide/gradle_wrapper.html)
@paulk-asert
Copy link
Contributor

This looks better. Nice work. I'll just double check that everything works as expected before merging.

@paulk-asert
Copy link
Contributor

Looks like you've deleted the repo. Okay if I apply manually?

@oreissig
Copy link
Contributor Author

Please feel free 👍

@asfgit asfgit closed this in bb5d17e May 17, 2017
asfgit pushed a commit that referenced this pull request May 17, 2017
…fault task, this makes Gradle print a helpful splash screen when invoked without arguments - a custom gradle version can still be generated with `gradle wrapper --gradle-version 2.0` (see https://docs.gradle.org/current/userguide/gradle_wrapper.html) (closes #296)
asfgit pushed a commit that referenced this pull request May 17, 2017
…fault task, this makes Gradle print a helpful splash screen when invoked without arguments - a custom gradle version can still be generated with `gradle wrapper --gradle-version 2.0` (see https://docs.gradle.org/current/userguide/gradle_wrapper.html) (closes #296)
asfgit pushed a commit that referenced this pull request May 17, 2017
…fault task, this makes Gradle print a helpful splash screen when invoked without arguments - a custom gradle version can still be generated with `gradle wrapper --gradle-version 2.0` (see https://docs.gradle.org/current/userguide/gradle_wrapper.html) (closes #296)
@paulk-asert
Copy link
Contributor

merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants