1
0
mirror of synced 2025-12-19 18:14:56 -05:00

java-cdk: re-export airbyte-api dependency (#36759)

This commit is contained in:
Marius Posta
2024-04-03 10:43:05 -07:00
committed by GitHub
parent 4ed294b45c
commit 2495575795
23 changed files with 108 additions and 109 deletions

View File

@@ -46,7 +46,7 @@ class AirbyteJavaConnectorExtension {
]
void addCdkDependencies() {
def projectName = { ":airbyte-cdk:java:airbyte-cdk:${it}" }
def projectName = { ":airbyte-cdk:java:airbyte-cdk:airbyte-cdk-${it}" }
def jarName = { "io.airbyte.cdk:airbyte-cdk-${it}:${cdkVersionRequired}" }
project.processIntegrationTestJavaResources {
// The metadata.yaml file is required by DestinationAcceptanceTest.
@@ -55,10 +55,20 @@ class AirbyteJavaConnectorExtension {
duplicatesStrategy DuplicatesStrategy.EXCLUDE
}
}
if (!cdkVersionRequired.matches("^[0-9]+\\.[0-9]+\\.[0-9]+")) {
throw new IllegalArgumentException("cdkVersionRequired should be a well-formed 3-part version number")
}
final int minor = Integer.parseInt(cdkVersionRequired.split('\\.')[1])
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]\\..*")) {
def dep = useLocalCdk
? { project.project(projectName(it)) }
: { jarName(it) }
def testFixturesDep = (useLocalCdk || minor >= 29)
? { testFixtures(dep(it)) }
: { "${jarName(it)}:test-fixtures" } // handle pre-v0.29 publications
if (useLocalCdk || minor >= 19) {
// v0.19+ module structure
compileOnly "org.projectlombok:lombok:1.18.30"
annotationProcessor "org.projectlombok:lombok:1.18.30" // Lombok must be added BEFORE Micronaut