Commit Graph

7 Commits

Author SHA1 Message Date
Grant Henke 09f700ab3e KAFKA-1714: Fix gradle wrapper bootstrapping (#6031)
Given we need to follow the Apache rule of not checking
any binaries into the source code, Kafka has always had
a bit of a tricky Gradle bootstrap.
Using ./gradlew as users expect doesn’t work and a
local and compatible version of Gradle was required to
generate the wrapper first.

This patch changes the behavior of the wrapper task to
instead generate a gradlew script that can bootstrap the
jar itself. Additionally it adds a license, removes the bat
script, and handles retries.

The documentation in the readme was also updated.

Going forward patches that upgrade gradle should run
`gradle wrapper` before checking in the change.

With this change users using ./gradlew can be sure they
are always building with the correct version of Gradle.

Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Ismael Juma <ismael@juma.me.uk
2019-11-21 08:06:06 -08:00
Kamil Szymanski 135860225e MINOR: Remove incomplete gradle wrapper infrastructure
Since jar files (including gradle-wrapper.jar) have to
be excluded from source releases, current gradle wrapper
infrastructure is incomplete rendering it unusable and
confusing (I expected gradlew script to work without
having to run default gradle task to download
gradle-wrapper.jar).

Author: Kamil Szymanski <kamil.szymanski.dev@gmail.com>

Reviewers: Gwen Shapira <cshapi@gmail.com>, Grant Henke <granthenke@gmail.com>, Ismael Juma <ismael@juma.me.uk>

Closes #1722 from kamilszymanski/gradlew-cleanup
2016-12-20 10:49:19 +00:00
Ismael Juma 7a877895a1 KAFKA-4082; Upgrade to Gradle 3.0
Also upgrade scoverage (required for compatibility) and remove usage of
`useAnt` which doesn't exist in Gradle 3.0

It turns out that one cannot even run `gradle` to download the project Gradle version if `useAnt` is used in the build. This is unfortunate (the SBT launcher has much saner behaviour).

Release notes: https://docs.gradle.org/3.0/release-notes

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Grant Henke <granthenke@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>, Sriharsha Chintalapani <harsha@hortonworks.com>

Closes #1774 from ijuma/kafka-4082-support-gradle-3.0
2016-08-23 23:56:36 +01:00
Ismael Juma cd427c9b90 MINOR: Upgrade to Gradle 2.13
There are a few improvements in 2.12 and 2.13. I am particularly interested in the performance improvements:
* 2.12: "This release brings support for compile only dependencies, improved build script compilation speed and even better IDE support."
* 2.13: "We've achieved performance improvements during Gradle's configuration and execution phase, where we have measured up to 25% improvements to build time in our performance tests. No changes to your build script are necessary to start taking advantage of these improvements."

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Gwen Shapira

Closes #1271 from ijuma/gradle-2.13
2016-04-26 15:14:33 -07:00
Ismael Juma d6e900a185 MINOR: Update to Gradle 2.9 and update generated `gradlew` file
More performance improvements:

"In many cases, Gradle 2.9 is much faster than Gradle 2.8 when performing incremental builds.

Very large builds (many thousands of source files) could see incremental build speeds up to 80% faster than 2.7 and up to 40% faster than 2.8.

Gradle now uses a more efficient mechanism to scan the filesystem, making up-to-date checks significantly faster. This improvement is only available when running Gradle with Java 7 or newer.

Other improvements have been made to speed-up include and exclude pattern evaluation; these improvements apply to all supported Java versions.

Gradle now uses much less memory than previous releases when performing incremental builds. By de-duplicating Strings used as file paths in internal caches, and by reducing the overhead of listing classes under test for Java projects, some builds use 30-70% less memory that Gradle 2.8."

https://docs.gradle.org/current/release-notes

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Grant Henke, Guozhang Wang

Closes #549 from ijuma/gradle-2.9
2015-11-18 12:44:02 -08:00
Jun Rao 27bc37289c trivial change to README to make the gradle wrapper download clearer 2014-09-23 14:39:10 -07:00
Jun Rao 52614ad65e kafka-1171; Gradle build for Kafka; patched by David Arthur, Joe Stein, Chris Freeman and Jun Rao; reviewed by Guozhang Wang, Joel Koshy and Neha Narkhede 2014-02-07 13:48:04 -08:00