Skip to content

Conversation

@jasontedor
Copy link
Member

We have agreed to introduce the Gradle wrapper to simplify workflows for developers, and managing infrastructure (e.g., CI, release builds, etc.) as well as consideration for the fact that other projects in our stack use Gradle and do not necessarily want to be tied to our Gradle version.

Relates #13744

We have agreed to introduce the Gradle wrapper to simplify workflows for
developers, and managing infrastructure (e.g., CI, release builds, etc.)
as well as consideration for the fact that other projects in our stack
use Gradle and do not necessarily want to be tied to our Gradle version.
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want the binary in the repo but I really don't want to wrangle with gradle upgrades and I like that we can rely on a particular version of gradle with this. This is an improvement overall so let's do it.

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've left two suggestions and one question.

build.gradle Outdated
int bytesRead
while ((bytesRead = i.read(buffer)) >= 0) {
if (bytesRead > 0) {
sha256.update(buffer, 0, bytesRead)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe simpler to just write

String checksum = MessageDigest.getInstance("SHA-256").digest(uri.toURL().getBytes()).encodeHex().toString()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is simpler, but I would prefer not to download an arbitrary number of bytes into memory in one go. This is why I chunk it.

build.gradle Outdated
tasks.withType(Wrapper).each(wrapperClosure)

subprojects {
tasks.withType(Wrapper).each(wrapperClosure)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can fold this call with the previous one into

allprojects {
    tasks.withType(Wrapper).each(wrapperClosure)
}



task wrapper(type: Wrapper)

gradle.projectsEvaluated {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this required?

@jasontedor jasontedor merged commit 480aeb7 into elastic:master Jan 4, 2018
jasontedor added a commit that referenced this pull request Jan 4, 2018
We have agreed to introduce the Gradle wrapper to simplify workflows for
developers, and managing infrastructure (e.g., CI, release builds, etc.)
as well as consideration for the fact that other projects in our stack
use Gradle and do not necessarily want to be tied to our Gradle version.

Relates #28065
jasontedor added a commit that referenced this pull request Jan 4, 2018
We have agreed to introduce the Gradle wrapper to simplify workflows for
developers, and managing infrastructure (e.g., CI, release builds, etc.)
as well as consideration for the fact that other projects in our stack
use Gradle and do not necessarily want to be tied to our Gradle version.

Relates #28065
jasontedor added a commit that referenced this pull request Jan 4, 2018
We have agreed to introduce the Gradle wrapper to simplify workflows for
developers, and managing infrastructure (e.g., CI, release builds, etc.)
as well as consideration for the fact that other projects in our stack
use Gradle and do not necessarily want to be tied to our Gradle version.

Relates #28065
jasontedor added a commit that referenced this pull request Jan 4, 2018
We have agreed to introduce the Gradle wrapper to simplify workflows for
developers, and managing infrastructure (e.g., CI, release builds, etc.)
as well as consideration for the fact that other projects in our stack
use Gradle and do not necessarily want to be tied to our Gradle version.

Relates #28065
@jasontedor jasontedor deleted the gradlew branch January 4, 2018 21:41
jaymode added a commit to elastic/shield-custom-realm-example that referenced this pull request Feb 21, 2018
jaymode added a commit to elastic/shield-custom-realm-example that referenced this pull request Feb 21, 2018
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v5.6.6 v6.0.2 v6.1.2 v6.2.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants