java-cdk: re-export airbyte-api dependency (#36759)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user