java CDK: clean up dependencies, refactor modules (#34745)
This commit is contained in:
@@ -22,7 +22,7 @@ class AirbyteJavaConnectorExtension {
|
||||
addCdkDependencies()
|
||||
}
|
||||
|
||||
static final List<String> IMPLEMENTATION = [
|
||||
static final List<String> PRE_V019_IMPLEMENTATION = [
|
||||
'airbyte-commons',
|
||||
'airbyte-json-validation',
|
||||
'airbyte-commons-cli',
|
||||
@@ -31,14 +31,14 @@ class AirbyteJavaConnectorExtension {
|
||||
'init-oss',
|
||||
]
|
||||
|
||||
static final List<String> TEST_IMPLEMENTATION = [
|
||||
static final List<String> PRE_V019_TEST_IMPLEMENTATION = [
|
||||
'airbyte-commons',
|
||||
'airbyte-json-validation',
|
||||
'airbyte-api',
|
||||
'config-models-oss',
|
||||
]
|
||||
|
||||
static final List<String> INTEGRATION_TEST_IMPLEMENTATION = [
|
||||
static final List<String> PRE_V019_INTEGRATION_TEST_IMPLEMENTATION = [
|
||||
'config-models-oss',
|
||||
'init-oss',
|
||||
'acceptance-test-harness',
|
||||
@@ -57,13 +57,52 @@ class AirbyteJavaConnectorExtension {
|
||||
project.dependencies {
|
||||
def dep = { useLocalCdk ? project.project(projectName(it)) : jarName(it) }
|
||||
def testFixturesDep = { useLocalCdk ? testFixtures(project.project(projectName(it))) : "${jarName(it)}:test-fixtures" }
|
||||
if (useLocalCdk || !cdkVersionRequired.matches("^0\\.[0-9]\\..*|^0\\.1[0-8]\\..*")) {
|
||||
// v0.19+ module structure
|
||||
implementation dep("dependencies")
|
||||
testImplementation dep("dependencies")
|
||||
testFixturesImplementation dep("dependencies")
|
||||
integrationTestJavaImplementation dep("dependencies")
|
||||
integrationTestJavaImplementation testFixturesDep("dependencies")
|
||||
} else {
|
||||
// pre-v0.19 module structure
|
||||
implementation(platform("com.fasterxml.jackson:jackson-bom:2.13.0"))
|
||||
implementation(platform("org.glassfish.jersey:jersey-bom:2.31"))
|
||||
|
||||
IMPLEMENTATION.each {
|
||||
implementation dep(it)
|
||||
testFixturesImplementation dep(it)
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:2.15.2"
|
||||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2"
|
||||
|
||||
implementation "com.google.guava:guava:31.1-jre"
|
||||
implementation "commons-io:commons-io:2.7"
|
||||
implementation "org.apache.commons:commons-compress:1.20"
|
||||
implementation "org.apache.commons:commons-lang3:3.11"
|
||||
implementation "org.slf4j:slf4j-api:2.0.9"
|
||||
|
||||
// SLF4J as a facade over Log4j2 required dependencies
|
||||
implementation "org.apache.logging.log4j:log4j-api:2.21.1"
|
||||
implementation "org.apache.logging.log4j:log4j-core:2.21.1"
|
||||
implementation "org.apache.logging.log4j:log4j-slf4j2-impl:2.21.1"
|
||||
implementation "org.apache.logging.log4j:log4j-web:2.21.1"
|
||||
implementation "com.therealvan:appender-log4j2:3.6.0"
|
||||
|
||||
// Bridges from other logging implementations to SLF4J
|
||||
implementation "org.slf4j:jcl-over-slf4j:2.0.9"
|
||||
implementation "org.slf4j:jul-to-slf4j:2.0.9"
|
||||
implementation "org.slf4j:log4j-over-slf4j:2.0.9"
|
||||
|
||||
// Airbyte dependencies.
|
||||
implementation "io.airbyte.airbyte-protocol:protocol-models:0.3.6"
|
||||
|
||||
// CDK dependencies.
|
||||
PRE_V019_IMPLEMENTATION.each {
|
||||
implementation jarName(it)
|
||||
testFixturesImplementation jarName(it)
|
||||
}
|
||||
PRE_V019_TEST_IMPLEMENTATION.each {testImplementation jarName(it) }
|
||||
PRE_V019_INTEGRATION_TEST_IMPLEMENTATION.each {integrationTestJavaImplementation jarName(it) }
|
||||
}
|
||||
TEST_IMPLEMENTATION.each {testImplementation dep(it) }
|
||||
INTEGRATION_TEST_IMPLEMENTATION.each {integrationTestJavaImplementation dep(it) }
|
||||
(["core"] + features).each {
|
||||
implementation dep(it)
|
||||
testFixturesImplementation dep(it)
|
||||
@@ -85,6 +124,7 @@ class AirbyteJavaConnectorPlugin implements Plugin<Project> {
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
|
||||
project.plugins.apply('application')
|
||||
project.plugins.apply('java-test-fixtures')
|
||||
project.plugins.apply(AirbyteIntegrationTestJavaPlugin)
|
||||
project.plugins.apply(AirbytePerformanceTestJavaPlugin)
|
||||
|
||||
Reference in New Issue
Block a user