2016-01-12 06:16:58 +08:00
|
|
|
/*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
ext {
|
|
|
|
versions = [:]
|
|
|
|
libs = [:]
|
2020-04-20 10:24:21 +08:00
|
|
|
|
2018-05-22 14:17:42 +08:00
|
|
|
// Available if -PscalaVersion is used. This is useful when we want to support a Scala version that has
|
|
|
|
// a higher minimum Java requirement than Kafka. This was previously the case for Scala 2.12 and Java 7.
|
2020-01-07 02:51:01 +08:00
|
|
|
availableScalaVersions = [ '2.12', '2.13' ]
|
2016-01-12 06:16:58 +08:00
|
|
|
}
|
|
|
|
|
2017-05-11 15:08:11 +08:00
|
|
|
// Add Scala version
|
2020-03-19 00:33:14 +08:00
|
|
|
def defaultScala212Version = '2.12.11'
|
2019-09-19 03:51:47 +08:00
|
|
|
def defaultScala213Version = '2.13.1'
|
2017-05-11 15:08:11 +08:00
|
|
|
if (hasProperty('scalaVersion')) {
|
2020-01-07 02:51:01 +08:00
|
|
|
if (scalaVersion == '2.12') {
|
2017-05-11 15:08:11 +08:00
|
|
|
versions["scala"] = defaultScala212Version
|
2019-06-23 00:26:14 +08:00
|
|
|
} else if (scalaVersion == '2.13') {
|
|
|
|
versions["scala"] = defaultScala213Version
|
|
|
|
} else {
|
2017-05-11 15:08:11 +08:00
|
|
|
versions["scala"] = scalaVersion
|
|
|
|
}
|
|
|
|
} else {
|
2019-06-23 00:26:14 +08:00
|
|
|
versions["scala"] = defaultScala212Version
|
2017-05-11 15:08:11 +08:00
|
|
|
}
|
|
|
|
|
2019-06-23 00:26:14 +08:00
|
|
|
/* Resolve base Scala version according to these patterns:
|
2020-01-07 02:51:01 +08:00
|
|
|
1. generally available Scala versions (such as: 2.12.y and 2.13.z) corresponding base versions will be: 2.12 and 2.13 (respectively)
|
2019-06-23 00:26:14 +08:00
|
|
|
2. pre-release Scala versions (i.e. milestone/rc, such as: 2.13.0-M5, 2.13.0-RC1, 2.14.0-M1, etc.) will have identical base versions;
|
|
|
|
rationale: pre-release Scala versions are not binary compatible with each other and that's the reason why libraries include the full
|
|
|
|
Scala release string in their name for pre-releases (see dependencies below with an artifact name suffix '_$versions.baseScala')
|
|
|
|
*/
|
|
|
|
if ( !versions.scala.contains('-') ) {
|
|
|
|
versions["baseScala"] = versions.scala.substring(0, versions.scala.lastIndexOf("."))
|
|
|
|
} else {
|
|
|
|
versions["baseScala"] = versions.scala
|
|
|
|
}
|
2017-05-11 15:08:11 +08:00
|
|
|
|
2016-01-12 06:16:58 +08:00
|
|
|
versions += [
|
2018-03-23 13:01:51 +08:00
|
|
|
activation: "1.1.1",
|
2018-06-07 15:28:07 +08:00
|
|
|
apacheda: "1.0.2",
|
2017-08-09 08:11:39 +08:00
|
|
|
apacheds: "2.0.0-M24",
|
2016-11-18 06:43:00 +08:00
|
|
|
argparse4j: "0.7.0",
|
2020-01-09 08:25:20 +08:00
|
|
|
bcpkix: "1.64",
|
2019-05-02 10:20:12 +08:00
|
|
|
checkstyle: "8.20",
|
2019-07-11 00:45:10 +08:00
|
|
|
commonsCli: "1.4",
|
2020-04-20 10:24:21 +08:00
|
|
|
gradle: "6.3",
|
|
|
|
gradleVersionsPlugin: "0.28.0",
|
2020-01-09 08:25:20 +08:00
|
|
|
grgit: "4.0.1",
|
2020-01-28 21:19:56 +08:00
|
|
|
httpclient: "4.5.11",
|
2020-01-09 08:25:20 +08:00
|
|
|
easymock: "4.1",
|
|
|
|
jackson: "2.10.2",
|
2019-05-02 10:20:12 +08:00
|
|
|
jacoco: "0.8.3",
|
2020-02-28 05:06:43 +08:00
|
|
|
// 9.4.25 renamed closeOutput to completeOutput (https://github.com/eclipse/jetty.project/commit/c5acf965067478784b54e2d241ec58fdb0b2c9fe)
|
|
|
|
// which is a method used by recent Jersey versions when this comment was written (2.30.1 was the latest). Please
|
|
|
|
// verify that this is fixed in some way before bumping the Jetty version.
|
|
|
|
jetty: "9.4.24.v20191120",
|
2019-05-04 01:35:07 +08:00
|
|
|
jersey: "2.28",
|
2020-01-28 21:19:56 +08:00
|
|
|
jmh: "1.23",
|
2020-01-09 08:25:20 +08:00
|
|
|
hamcrest: "2.2",
|
2016-08-23 06:52:50 +08:00
|
|
|
log4j: "1.2.17",
|
2019-06-23 00:26:14 +08:00
|
|
|
scalaLogging: "3.9.2",
|
2018-03-23 13:01:51 +08:00
|
|
|
jaxb: "2.3.0",
|
2018-09-30 13:29:57 +08:00
|
|
|
jaxrs: "2.1.1",
|
2018-04-24 04:33:35 +08:00
|
|
|
jfreechart: "1.0.0",
|
2017-08-09 08:11:39 +08:00
|
|
|
jopt: "5.0.4",
|
2020-01-09 08:25:20 +08:00
|
|
|
junit: "4.13",
|
2018-04-07 08:00:52 +08:00
|
|
|
kafka_0100: "0.10.0.1",
|
|
|
|
kafka_0101: "0.10.1.1",
|
MINOR: Enable ignored upgrade system tests - trunk (#5605)
Removed ignore annotations from the upgrade tests. This PR includes the following changes for updating the upgrade tests:
* Uploaded new versions 0.10.2.2, 0.11.0.3, 1.0.2, 1.1.1, and 2.0.0 (in the associated scala versions) to kafka-packages
* Update versions in version.py, Dockerfile, base.sh
* Added new versions to StreamsUpgradeTest.test_upgrade_downgrade_brokers including version 2.0.0
* Added new versions StreamsUpgradeTest.test_simple_upgrade_downgrade test excluding version 2.0.0
* Version 2.0.0 is excluded from the streams upgrade/downgrade test as StreamsConfig needs an update for the new version, requiring a KIP. Once the community votes the KIP in, a minor follow-up PR can be pushed to add the 2.0.0 version to the upgrade test.
* Fixed minor bug in kafka-run-class.sh for classpath in upgrade/downgrade tests across versions.
* Follow on PRs for 0.10.2x, 0.11.0x, 1.0.x, 1.1.x, and 2.0.x will be pushed soon with the same updates required for the specific version.
Reviewers: Eno Thereska <eno.thereska@gmail.com>, John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2018-09-14 04:46:47 +08:00
|
|
|
kafka_0102: "0.10.2.2",
|
|
|
|
kafka_0110: "0.11.0.3",
|
|
|
|
kafka_10: "1.0.2",
|
|
|
|
kafka_11: "1.1.1",
|
2019-01-07 15:03:54 +08:00
|
|
|
kafka_20: "2.0.1",
|
2019-05-31 03:50:30 +08:00
|
|
|
kafka_21: "2.1.1",
|
2019-12-07 05:44:56 +08:00
|
|
|
kafka_22: "2.2.2",
|
|
|
|
kafka_23: "2.3.1",
|
2020-03-31 00:55:35 +08:00
|
|
|
kafka_24: "2.4.1",
|
2020-04-16 06:59:03 +08:00
|
|
|
kafka_25: "2.5.0",
|
2020-01-28 21:19:56 +08:00
|
|
|
lz4: "1.7.1",
|
2020-01-09 08:25:20 +08:00
|
|
|
mavenArtifact: "3.6.3",
|
2016-01-12 06:16:58 +08:00
|
|
|
metrics: "2.2.0",
|
2020-01-09 08:25:20 +08:00
|
|
|
mockito: "3.2.4",
|
|
|
|
owaspDepCheckPlugin: "5.2.4",
|
2020-01-28 21:19:56 +08:00
|
|
|
powermock: "2.0.5",
|
2020-01-09 08:25:20 +08:00
|
|
|
reflections: "0.9.12",
|
2020-03-20 06:50:23 +08:00
|
|
|
rocksDB: "5.18.4",
|
MINOR: Fix Scala 2.13 compiler warnings (#8390)
Once Scala 2.13.2 is officially released, I will submit a follow up PR
that enables `-Xfatal-warnings` with the necessary warning
exclusions. Compiler warning exclusions were only introduced in 2.13.2
and hence why we have to wait for that. I used a snapshot build to
test it in the meantime.
Changes:
* Remove Deprecated annotation from internal request classes
* Class.newInstance is deprecated in favor of
Class.getConstructor().newInstance
* Replace deprecated JavaConversions with CollectionConverters
* Remove unused kafka.cluster.Cluster
* Don't use Map and Set methods deprecated in 2.13:
- collection.Map +, ++, -, --, mapValues, filterKeys, retain
- collection.Set +, ++, -, --
* Add scala-collection-compat dependency to streams-scala and
update version to 2.1.4.
* Replace usages of deprecated Either.get and Either.right
* Replace usage of deprecated Integer(String) constructor
* `import scala.language.implicitConversions` is not needed in Scala 2.13
* Replace usage of deprecated `toIterator`, `Traversable`, `seq`,
`reverseMap`, `hasDefiniteSize`
* Replace usage of deprecated alterConfigs with incrementalAlterConfigs
where possible
* Fix implicit widening conversions from Long/Int to Double/Float
* Avoid implicit conversions to String
* Eliminate usage of deprecated procedure syntax
* Remove `println`in `LogValidatorTest` instead of fixing the compiler
warning since tests should not `println`.
* Eliminate implicit conversion from Array to Seq
* Remove unnecessary usage of 3 argument assertEquals
* Replace `toStream` with `iterator`
* Do not use deprecated SaslConfigs.DEFAULT_SASL_ENABLED_MECHANISMS
* Replace StringBuilder.newBuilder with new StringBuilder
* Rename AclBuffers to AclSeqs and remove usage of `filterKeys`
* More consistent usage of Set/Map in Controller classes: this also fixes
deprecated warnings with Scala 2.13
* Add spotBugs exclusion for inliner artifact in KafkaApis with Scala 2.12.
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2020-04-01 21:20:48 +08:00
|
|
|
scalaCollectionCompat: "2.1.4",
|
2019-05-02 10:20:12 +08:00
|
|
|
scalafmt: "1.5.1",
|
2019-06-06 05:10:00 +08:00
|
|
|
scalaJava8Compat : "0.9.0",
|
MINOR: Make the build compile with Scala 2.13 (#6989)
Scala 2.13 support was added to build via #5454. This PR adjusts the code so that
it compiles with 2.11, 2.12 and 2.13.
Changes:
* Add `scala-collection-compat` dependency.
* Import `scala.collection.Seq` in a number of places for consistent behavior between
Scala 2.11, 2.12 and 2.13.
* Remove wildcard imports that were causing the Java classes to have priority over the
Scala ones, related Scala issue: https://github.com/scala/scala/pull/6589.
* Replace parallel collection usage with `Future`. The former is no longer included by
default in the standard library.
* Replace val _: Unit workaround with one that is more concise and works with Scala 2.13
* Replace `filterKeys` with `filter` when we expect a `Map`. `filterKeys` returns a view
that doesn't implement the `Map` trait in Scala 2.13.
* Replace `mapValues` with `map` or add a `toMap` as an additional transformation
when we expect a `Map`. `mapValues` returns a view that doesn't implement the
`Map` trait in Scala 2.13.
* Replace `breakOut` with `iterator` and `to`, `breakOut` was removed in Scala
2.13.
* Replace to() with toMap, toIndexedSeq and toSet
* Replace `mutable.Buffer.--` with `filterNot`.
* ControlException is an abstract class in Scala 2.13.
* Variable arguments can only receive arrays or immutable.Seq in Scala 2.13.
* Use `Factory` instead of `CanBuildFrom` in DecodeJson. `CanBuildFrom` behaves
a bit differently in Scala 2.13 and it's been deprecated. `Factory` has the behavior
we need and it's available via the compat library.
* Fix failing tests due to behavior change in Scala 2.13,
"Map.values.map is not strict in Scala 2.13" (https://github.com/scala/bug/issues/11589).
* Use Java collections instead of Scala ones in StreamResetter (a Java class).
* Adjust CheckpointFile.write to take an `Iterable` instead of `Seq` to avoid
unnecessary collection copies.
* Fix DelayedElectLeader to use a Map instead of Set and avoid `to` call that
doesn't work in Scala 2.13.
* Use unordered map for mapping in SimpleAclAuthorizer, mapping of ordered
maps require an `Ordering` in Scala 2.13 for safety reasons.
* Adapt `ConsumerGroupCommand` to compile with Scala 2.13.
* CoreUtils.min takes an `Iterable` instead of `TraversableOnce`, the latter does
not exist in Scala 2.13.
* Replace `Unit` with `()` in a couple places. Scala 2.13 is stricter when it expects
a value instead of a type.
* Fix bug in CustomQuotaCallbackTest where we did not necessarily set `partitionRatio`
correctly, `forall` can terminate early.
* Add a couple of spotbugs exclusions that are needed by code generated by Scala 2.13
* Remove unused variables, simplify some code and remove procedure syntax in a few
places.
* Remove unused `CoreUtils.JSONEscapeString`.
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, José Armando García Sancio <jsancio@users.noreply.github.com>
2019-07-02 21:29:39 +08:00
|
|
|
scalatest: "3.0.8",
|
2020-01-09 08:25:20 +08:00
|
|
|
scoverage: "1.4.1",
|
|
|
|
scoveragePlugin: "4.0.1",
|
|
|
|
shadowPlugin: "5.2.0",
|
|
|
|
slf4j: "1.7.30",
|
2019-05-04 01:35:07 +08:00
|
|
|
snappy: "1.1.7.3",
|
2019-05-02 10:20:12 +08:00
|
|
|
spotbugs: "3.1.12",
|
2020-01-09 08:25:20 +08:00
|
|
|
spotbugsPlugin: "3.0.0",
|
2020-01-28 21:19:56 +08:00
|
|
|
spotlessPlugin: "3.27.1",
|
2020-02-06 08:41:28 +08:00
|
|
|
testRetryPlugin: "1.1.0",
|
2020-04-20 10:24:21 +08:00
|
|
|
zinc: "1.3.5",
|
2020-02-17 23:51:26 +08:00
|
|
|
zookeeper: "3.5.7",
|
2020-01-28 21:19:56 +08:00
|
|
|
zstd: "1.4.4-7"
|
2016-01-12 06:16:58 +08:00
|
|
|
]
|
|
|
|
libs += [
|
2018-03-23 13:01:51 +08:00
|
|
|
activation: "javax.activation:activation:$versions.activation",
|
2016-03-31 10:30:34 +08:00
|
|
|
apacheda: "org.apache.directory.api:api-all:$versions.apacheda",
|
|
|
|
apachedsCoreApi: "org.apache.directory.server:apacheds-core-api:$versions.apacheds",
|
|
|
|
apachedsInterceptorKerberos: "org.apache.directory.server:apacheds-interceptor-kerberos:$versions.apacheds",
|
|
|
|
apachedsProtocolShared: "org.apache.directory.server:apacheds-protocol-shared:$versions.apacheds",
|
|
|
|
apachedsProtocolKerberos: "org.apache.directory.server:apacheds-protocol-kerberos:$versions.apacheds",
|
|
|
|
apachedsProtocolLdap: "org.apache.directory.server:apacheds-protocol-ldap:$versions.apacheds",
|
|
|
|
apachedsLdifPartition: "org.apache.directory.server:apacheds-ldif-partition:$versions.apacheds",
|
|
|
|
apachedsMavibotPartition: "org.apache.directory.server:apacheds-mavibot-partition:$versions.apacheds",
|
|
|
|
apachedsJdbmPartition: "org.apache.directory.server:apacheds-jdbm-partition:$versions.apacheds",
|
2018-04-24 04:33:35 +08:00
|
|
|
argparse4j: "net.sourceforge.argparse4j:argparse4j:$versions.argparse4j",
|
2016-01-12 06:16:58 +08:00
|
|
|
bcpkix: "org.bouncycastle:bcpkix-jdk15on:$versions.bcpkix",
|
2019-07-11 00:45:10 +08:00
|
|
|
commonsCli: "commons-cli:commons-cli:$versions.commonsCli",
|
2016-01-12 06:16:58 +08:00
|
|
|
easymock: "org.easymock:easymock:$versions.easymock",
|
2019-09-29 23:53:41 +08:00
|
|
|
jacksonDatabind: "com.fasterxml.jackson.core:jackson-databind:$versions.jackson",
|
2019-04-16 07:53:28 +08:00
|
|
|
jacksonDataformatCsv: "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:$versions.jackson",
|
|
|
|
jacksonModuleScala: "com.fasterxml.jackson.module:jackson-module-scala_$versions.baseScala:$versions.jackson",
|
2018-11-28 04:49:53 +08:00
|
|
|
jacksonJDK8Datatypes: "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$versions.jackson",
|
2016-01-12 06:16:58 +08:00
|
|
|
jacksonJaxrsJsonProvider: "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$versions.jackson",
|
2018-03-23 13:01:51 +08:00
|
|
|
jaxbApi: "javax.xml.bind:jaxb-api:$versions.jaxb",
|
2018-06-13 13:15:18 +08:00
|
|
|
jaxrsApi: "javax.ws.rs:javax.ws.rs-api:$versions.jaxrs",
|
2016-01-12 06:16:58 +08:00
|
|
|
jettyServer: "org.eclipse.jetty:jetty-server:$versions.jetty",
|
2018-01-31 07:09:40 +08:00
|
|
|
jettyClient: "org.eclipse.jetty:jetty-client:$versions.jetty",
|
2016-01-12 06:16:58 +08:00
|
|
|
jettyServlet: "org.eclipse.jetty:jetty-servlet:$versions.jetty",
|
2016-03-20 09:39:52 +08:00
|
|
|
jettyServlets: "org.eclipse.jetty:jetty-servlets:$versions.jetty",
|
2016-01-12 06:16:58 +08:00
|
|
|
jerseyContainerServlet: "org.glassfish.jersey.containers:jersey-container-servlet:$versions.jersey",
|
2018-05-22 14:17:42 +08:00
|
|
|
jerseyHk2: "org.glassfish.jersey.inject:jersey-hk2:$versions.jersey",
|
2017-08-09 08:11:39 +08:00
|
|
|
jmhCore: "org.openjdk.jmh:jmh-core:$versions.jmh",
|
|
|
|
jmhCoreBenchmarks: "org.openjdk.jmh:jmh-core-benchmarks:$versions.jmh",
|
2018-04-07 08:00:52 +08:00
|
|
|
jmhGeneratorAnnProcess: "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh",
|
|
|
|
joptSimple: "net.sf.jopt-simple:jopt-simple:$versions.jopt",
|
2016-01-12 06:16:58 +08:00
|
|
|
junit: "junit:junit:$versions.junit",
|
2019-01-10 01:03:16 +08:00
|
|
|
hamcrest: "org.hamcrest:hamcrest:$versions.hamcrest",
|
2018-04-07 08:00:52 +08:00
|
|
|
kafkaStreams_0100: "org.apache.kafka:kafka-streams:$versions.kafka_0100",
|
|
|
|
kafkaStreams_0101: "org.apache.kafka:kafka-streams:$versions.kafka_0101",
|
|
|
|
kafkaStreams_0102: "org.apache.kafka:kafka-streams:$versions.kafka_0102",
|
|
|
|
kafkaStreams_0110: "org.apache.kafka:kafka-streams:$versions.kafka_0110",
|
|
|
|
kafkaStreams_10: "org.apache.kafka:kafka-streams:$versions.kafka_10",
|
2018-04-18 15:38:27 +08:00
|
|
|
kafkaStreams_11: "org.apache.kafka:kafka-streams:$versions.kafka_11",
|
MINOR: Enable ignored upgrade system tests - trunk (#5605)
Removed ignore annotations from the upgrade tests. This PR includes the following changes for updating the upgrade tests:
* Uploaded new versions 0.10.2.2, 0.11.0.3, 1.0.2, 1.1.1, and 2.0.0 (in the associated scala versions) to kafka-packages
* Update versions in version.py, Dockerfile, base.sh
* Added new versions to StreamsUpgradeTest.test_upgrade_downgrade_brokers including version 2.0.0
* Added new versions StreamsUpgradeTest.test_simple_upgrade_downgrade test excluding version 2.0.0
* Version 2.0.0 is excluded from the streams upgrade/downgrade test as StreamsConfig needs an update for the new version, requiring a KIP. Once the community votes the KIP in, a minor follow-up PR can be pushed to add the 2.0.0 version to the upgrade test.
* Fixed minor bug in kafka-run-class.sh for classpath in upgrade/downgrade tests across versions.
* Follow on PRs for 0.10.2x, 0.11.0x, 1.0.x, 1.1.x, and 2.0.x will be pushed soon with the same updates required for the specific version.
Reviewers: Eno Thereska <eno.thereska@gmail.com>, John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2018-09-14 04:46:47 +08:00
|
|
|
kafkaStreams_20: "org.apache.kafka:kafka-streams:$versions.kafka_20",
|
2019-01-07 15:03:54 +08:00
|
|
|
kafkaStreams_21: "org.apache.kafka:kafka-streams:$versions.kafka_21",
|
2019-06-04 12:09:58 +08:00
|
|
|
kafkaStreams_22: "org.apache.kafka:kafka-streams:$versions.kafka_22",
|
2019-08-22 01:26:57 +08:00
|
|
|
kafkaStreams_23: "org.apache.kafka:kafka-streams:$versions.kafka_23",
|
2019-12-21 06:21:12 +08:00
|
|
|
kafkaStreams_24: "org.apache.kafka:kafka-streams:$versions.kafka_24",
|
2020-04-16 06:59:03 +08:00
|
|
|
kafkaStreams_25: "org.apache.kafka:kafka-streams:$versions.kafka_25",
|
2016-08-23 06:52:50 +08:00
|
|
|
log4j: "log4j:log4j:$versions.log4j",
|
2017-08-09 08:11:39 +08:00
|
|
|
lz4: "org.lz4:lz4-java:$versions.lz4",
|
2016-01-12 06:16:58 +08:00
|
|
|
metrics: "com.yammer.metrics:metrics-core:$versions.metrics",
|
2018-10-10 06:55:09 +08:00
|
|
|
mockitoCore: "org.mockito:mockito-core:$versions.mockito",
|
2017-09-18 17:49:12 +08:00
|
|
|
powermockJunit4: "org.powermock:powermock-module-junit4:$versions.powermock",
|
2016-01-12 06:16:58 +08:00
|
|
|
powermockEasymock: "org.powermock:powermock-api-easymock:$versions.powermock",
|
|
|
|
reflections: "org.reflections:reflections:$versions.reflections",
|
|
|
|
rocksDBJni: "org.rocksdb:rocksdbjni:$versions.rocksDB",
|
MINOR: Make the build compile with Scala 2.13 (#6989)
Scala 2.13 support was added to build via #5454. This PR adjusts the code so that
it compiles with 2.11, 2.12 and 2.13.
Changes:
* Add `scala-collection-compat` dependency.
* Import `scala.collection.Seq` in a number of places for consistent behavior between
Scala 2.11, 2.12 and 2.13.
* Remove wildcard imports that were causing the Java classes to have priority over the
Scala ones, related Scala issue: https://github.com/scala/scala/pull/6589.
* Replace parallel collection usage with `Future`. The former is no longer included by
default in the standard library.
* Replace val _: Unit workaround with one that is more concise and works with Scala 2.13
* Replace `filterKeys` with `filter` when we expect a `Map`. `filterKeys` returns a view
that doesn't implement the `Map` trait in Scala 2.13.
* Replace `mapValues` with `map` or add a `toMap` as an additional transformation
when we expect a `Map`. `mapValues` returns a view that doesn't implement the
`Map` trait in Scala 2.13.
* Replace `breakOut` with `iterator` and `to`, `breakOut` was removed in Scala
2.13.
* Replace to() with toMap, toIndexedSeq and toSet
* Replace `mutable.Buffer.--` with `filterNot`.
* ControlException is an abstract class in Scala 2.13.
* Variable arguments can only receive arrays or immutable.Seq in Scala 2.13.
* Use `Factory` instead of `CanBuildFrom` in DecodeJson. `CanBuildFrom` behaves
a bit differently in Scala 2.13 and it's been deprecated. `Factory` has the behavior
we need and it's available via the compat library.
* Fix failing tests due to behavior change in Scala 2.13,
"Map.values.map is not strict in Scala 2.13" (https://github.com/scala/bug/issues/11589).
* Use Java collections instead of Scala ones in StreamResetter (a Java class).
* Adjust CheckpointFile.write to take an `Iterable` instead of `Seq` to avoid
unnecessary collection copies.
* Fix DelayedElectLeader to use a Map instead of Set and avoid `to` call that
doesn't work in Scala 2.13.
* Use unordered map for mapping in SimpleAclAuthorizer, mapping of ordered
maps require an `Ordering` in Scala 2.13 for safety reasons.
* Adapt `ConsumerGroupCommand` to compile with Scala 2.13.
* CoreUtils.min takes an `Iterable` instead of `TraversableOnce`, the latter does
not exist in Scala 2.13.
* Replace `Unit` with `()` in a couple places. Scala 2.13 is stricter when it expects
a value instead of a type.
* Fix bug in CustomQuotaCallbackTest where we did not necessarily set `partitionRatio`
correctly, `forall` can terminate early.
* Add a couple of spotbugs exclusions that are needed by code generated by Scala 2.13
* Remove unused variables, simplify some code and remove procedure syntax in a few
places.
* Remove unused `CoreUtils.JSONEscapeString`.
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, José Armando García Sancio <jsancio@users.noreply.github.com>
2019-07-02 21:29:39 +08:00
|
|
|
scalaCollectionCompat: "org.scala-lang.modules:scala-collection-compat_$versions.baseScala:$versions.scalaCollectionCompat",
|
|
|
|
scalaJava8Compat: "org.scala-lang.modules:scala-java8-compat_$versions.baseScala:$versions.scalaJava8Compat",
|
2017-12-23 02:41:22 +08:00
|
|
|
scalaLibrary: "org.scala-lang:scala-library:$versions.scala",
|
2018-04-07 08:00:52 +08:00
|
|
|
scalaLogging: "com.typesafe.scala-logging:scala-logging_$versions.baseScala:$versions.scalaLogging",
|
2017-12-23 02:41:22 +08:00
|
|
|
scalaReflect: "org.scala-lang:scala-reflect:$versions.scala",
|
2017-08-09 08:11:39 +08:00
|
|
|
scalatest: "org.scalatest:scalatest_$versions.baseScala:$versions.scalatest",
|
2016-01-12 06:16:58 +08:00
|
|
|
slf4jApi: "org.slf4j:slf4j-api:$versions.slf4j",
|
|
|
|
slf4jlog4j: "org.slf4j:slf4j-log4j12:$versions.slf4j",
|
|
|
|
snappy: "org.xerial.snappy:snappy-java:$versions.snappy",
|
2017-01-10 16:42:41 +08:00
|
|
|
zookeeper: "org.apache.zookeeper:zookeeper:$versions.zookeeper",
|
2017-05-19 01:39:15 +08:00
|
|
|
jfreechart: "jfreechart:jfreechart:$versions.jfreechart",
|
2018-10-10 08:13:33 +08:00
|
|
|
mavenArtifact: "org.apache.maven:maven-artifact:$versions.mavenArtifact",
|
|
|
|
zstd: "com.github.luben:zstd-jni:$versions.zstd",
|
2019-02-13 04:03:08 +08:00
|
|
|
httpclient: "org.apache.httpcomponents:httpclient:$versions.httpclient"
|
2016-01-12 06:16:58 +08:00
|
|
|
]
|