Browse Source

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
pull/1745/merge
Ismael Juma 8 years ago
parent
commit
7a877895a1
  1. 6
      build.gradle
  2. 5
      gradlew
  3. 6
      gradlew.bat

6
build.gradle

@ -26,7 +26,7 @@ buildscript { @@ -26,7 +26,7 @@ buildscript {
// For Apache Rat plugin to ignore non-Git files
classpath "org.ajoberstar:grgit:1.5.0"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'org.scoverage:gradle-scoverage:2.0.1'
classpath 'org.scoverage:gradle-scoverage:2.1.0'
}
}
@ -68,7 +68,7 @@ allprojects { @@ -68,7 +68,7 @@ allprojects {
}
ext {
gradleVersion = "2.14.1"
gradleVersion = "3.0"
buildVersionFileName = "kafka-version.properties"
userMaxForks = project.hasProperty('maxParallelForks') ? maxParallelForks.toInteger() : null
@ -236,8 +236,6 @@ subprojects { @@ -236,8 +236,6 @@ subprojects {
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.useAnt = false
scalaCompileOptions.additionalParameters = [
"-deprecation",
"-unchecked",

5
gradlew vendored

@ -161,4 +161,9 @@ function splitJvmOpts() { @@ -161,4 +161,9 @@ function splitJvmOpts() {
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

6
gradlew.bat vendored

@ -49,7 +49,6 @@ goto fail @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@ -60,11 +59,6 @@ set _SKIP=2 @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line

Loading…
Cancel
Save