Skip to content

Commit

Permalink
Use java-library and use api/implementation correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ijuma committed Feb 25, 2021
1 parent 59f3756 commit 78b40f2
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ subprojects {
// eg: ./gradlew allDepInsight --configuration runtime --dependency com.fasterxml.jackson.core:jackson-databind
task allDepInsight(type: DependencyInsightReportTask) doLast {}

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'checkstyle'
Expand Down Expand Up @@ -745,9 +745,12 @@ project(':core') {
archivesBaseName = "kafka_${versions.baseScala}"

dependencies {
implementation project(':clients')
api project(':clients')
implementation project(':metadata')
implementation project(':raft')

api libs.scalaLibrary

implementation libs.argparse4j
implementation libs.jacksonDatabind
implementation libs.jacksonModuleScala
Expand All @@ -757,7 +760,6 @@ project(':core') {
implementation libs.metrics
implementation libs.scalaCollectionCompat
implementation libs.scalaJava8Compat
implementation libs.scalaLibrary
// only needed transitively, but set it explicitly to ensure it has the same version as scala-library
implementation libs.scalaReflect
implementation libs.scalaLogging
Expand Down Expand Up @@ -1071,6 +1073,7 @@ project(':examples') {
archivesBaseName = "kafka-examples"

dependencies {
implementation project(':clients')
implementation project(':core')
}

Expand Down Expand Up @@ -1301,6 +1304,7 @@ project(':tools') {
implementation libs.jacksonDatabind
implementation libs.jacksonJDK8Datatypes
implementation libs.slf4jApi
implementation libs.log4j

implementation libs.jacksonJaxrsJsonProvider
implementation libs.jerseyContainerServlet
Expand Down Expand Up @@ -1388,7 +1392,7 @@ project(':streams') {
ext.buildStreamsVersionFileName = "kafka-streams-version.properties"

dependencies {
implementation project(':clients')
api project(':clients')

// this dependency should be removed after we unify data API
implementation(project(':connect:json')) {
Expand All @@ -1398,6 +1402,8 @@ project(':streams') {

implementation libs.slf4jApi
implementation libs.rocksDBJni
implementation libs.jacksonAnnotations
implementation libs.jacksonDatabind

// testCompileOnly prevents streams from exporting a dependency on test-utils, which would cause a dependency cycle
testCompileOnly project(':streams:test-utils')
Expand Down Expand Up @@ -1526,7 +1532,7 @@ project(':streams:streams-scala') {
apply plugin: 'scala'
archivesBaseName = "kafka-streams-scala_${versions.baseScala}"
dependencies {
implementation project(':streams')
api project(':streams')

implementation libs.scalaLibrary
implementation libs.scalaCollectionCompat
Expand Down Expand Up @@ -1576,6 +1582,8 @@ project(':streams:test-utils') {
implementation project(':streams')
implementation project(':clients')

implementation libs.slf4jApi

testImplementation project(':clients').sourceSets.test.output
testImplementation libs.junitJupiter
testImplementation libs.easymock
Expand Down Expand Up @@ -1837,11 +1845,16 @@ project(':jmh-benchmarks') {
implementation project(':core')
implementation project(':clients').sourceSets.test.output
implementation project(':core').sourceSets.test.output

implementation libs.jmhCore
annotationProcessor libs.jmhGeneratorAnnProcess
implementation libs.jmhCoreBenchmarks
implementation libs.jacksonDatabind
implementation libs.metrics
implementation libs.mockitoCore
implementation libs.slf4jlog4j
implementation libs.scalaLibrary
implementation libs.scalaJava8Compat
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -1899,7 +1912,7 @@ project(':connect:api') {
archivesBaseName = "connect-api"

dependencies {
implementation project(':clients')
api project(':clients')
implementation libs.slf4jApi
implementation libs.jaxrsApi

Expand Down Expand Up @@ -1976,8 +1989,10 @@ project(':connect:json') {

dependencies {
implementation project(':connect:api')
implementation libs.jacksonDatabind
implementation libs.jacksonJDK8Datatypes

api libs.jacksonDatabind
api libs.jacksonJDK8Datatypes

implementation libs.slf4jApi

testImplementation libs.easymock
Expand Down Expand Up @@ -2013,14 +2028,15 @@ project(':connect:runtime') {
archivesBaseName = "connect-runtime"

dependencies {

implementation project(':connect:api')
implementation project(':clients')
implementation project(':tools')
implementation project(':connect:json')
implementation project(':connect:transforms')

implementation libs.slf4jApi
implementation libs.log4j
implementation libs.jacksonAnnotations
implementation libs.jacksonJaxrsJsonProvider
implementation libs.jerseyContainerServlet
implementation libs.jerseyHk2
Expand All @@ -2032,8 +2048,12 @@ project(':connect:runtime') {
implementation libs.jettyClient
implementation libs.reflections
implementation libs.mavenArtifact

testImplementation project(':clients').sourceSets.test.output
testImplementation project(':core')
testImplementation project(':metadata')
testImplementation project(':core').sourceSets.test.output

testImplementation libs.easymock
testImplementation libs.junitJupiterApi
testImplementation libs.junitVintageEngine
Expand All @@ -2042,10 +2062,6 @@ project(':connect:runtime') {
testImplementation libs.mockitoCore
testImplementation libs.httpclient

testImplementation project(':clients').sourceSets.test.output
testImplementation project(':core')
testImplementation project(':core').sourceSets.test.output

testRuntimeOnly libs.slf4jlog4j
}

Expand Down Expand Up @@ -2156,6 +2172,7 @@ project(':connect:basic-auth-extension') {
dependencies {
implementation project(':connect:api')
implementation libs.slf4jApi
implementation libs.jaxrsApi

testImplementation libs.bcpkix
testImplementation libs.easymock
Expand Down Expand Up @@ -2196,7 +2213,9 @@ project(':connect:mirror') {
implementation project(':connect:runtime')
implementation project(':connect:mirror-client')
implementation project(':clients')

implementation libs.argparse4j
implementation libs.jacksonAnnotations
implementation libs.slf4jApi

testImplementation libs.junitJupiter
Expand Down

0 comments on commit 78b40f2

Please sign in to comment.