Skip to content

Commit

Permalink
refactor: refactor all platform code into a single gradle project (re…
Browse files Browse the repository at this point in the history
…moves composite builds) (#13097)
  • Loading branch information
cgardens committed Jul 16, 2024
1 parent de3867c commit 1ee6e3b
Show file tree
Hide file tree
Showing 61 changed files with 552 additions and 461 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/fe-validate-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
org.gradle.vfs.watch=false
EOF
- name: Run :airbyte-webapp:validateLinks
run: ./gradlew --no-daemon :airbyte-webapp:validateLinks --scan -DciMode=true
- name: Run :oss:airbyte-webapp:validateLinks
run: ./gradlew --no-daemon :oss:airbyte-webapp:validateLinks --scan -DciMode=true

- name: Publish Failures to dev-frontend channel
uses: abinoda/slack-action@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
# todo (cgardens): temporarily skipping airbyte-commons-worker because one of the tests uses too much memory. we are
# adjusting the test to use a more reasonable amount of memory. https://github.com/airbytehq/oncall/issues/4415
# command: ./gradlew build javadoc --scan
command: ./gradlew build -x :airbyte-commons-worker:test javadoc --scan
command: ./gradlew build -x :oss:airbyte-commons-worker:test javadoc --scan
attempt_limit: 3
attempt_delay: 5000 # in ms

Expand Down
6 changes: 3 additions & 3 deletions airbyte-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dependencies {
api(libs.bundles.micronaut.annotation)
api(libs.bundles.micronaut.kotlin)
api(libs.kotlin.logging)
api(project(":airbyte-commons"))
api(project(":airbyte-config:config-models"))
api(project(":airbyte-api"))
api(project(":oss:airbyte-commons"))
api(project(":oss:airbyte-config:config-models"))
api(project(":oss:airbyte-api"))

testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
Expand Down
12 changes: 6 additions & 6 deletions airbyte-api-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ dependencies {
annotationProcessor(libs.bundles.micronaut.annotation.processor)
annotationProcessor(libs.micronaut.jaxrs.processor)

implementation(project(":airbyte-analytics"))
implementation(project(":airbyte-api"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-micronaut"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":oss:airbyte-analytics"))
implementation(project(":oss:airbyte-api"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-micronaut"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(platform(libs.micronaut.platform))
implementation(libs.cron.utils)
implementation(libs.log4j.slf4j2.impl)
Expand All @@ -48,7 +48,7 @@ dependencies {
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
testAnnotationProcessor(libs.micronaut.jaxrs.processor)

testImplementation(project(":airbyte-test-utils"))
testImplementation(project(":oss:airbyte-test-utils"))
testImplementation(libs.bundles.micronaut.test)
testImplementation(libs.postgresql)
testImplementation(libs.platform.testcontainers.postgresql)
Expand Down
8 changes: 4 additions & 4 deletions airbyte-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
api(libs.kotlin.logging)
api(libs.jackson.kotlin)
api(libs.moshi.kotlin)
api(project(":airbyte-config:config-models"))
api(project(":oss:airbyte-config:config-models"))

implementation(platform(libs.micronaut.platform))
implementation(libs.bundles.micronaut)
Expand All @@ -46,7 +46,7 @@ dependencies {
implementation(libs.slf4j.api)
implementation(libs.swagger.annotations)

implementation(project(":airbyte-commons"))
implementation(project(":oss:airbyte-commons"))

compileOnly(libs.v3.swagger.annotations)

Expand All @@ -65,7 +65,7 @@ val airbyteApiProblemsSpecFile = "$projectDir/src/main/openapi/api-problems.yaml
val airbyteApiSpecTemplateDirApi = "$projectDir/src/main/resources/templates/jaxrs-spec-api"
val publicApiSpecTemplateDirApi = "$projectDir/src/main/resources/templates/jaxrs-spec-api/public_api"
val workloadSpecFile = "$projectDir/src/main/openapi/workload-openapi.yaml"
val connectorBuilderServerSpecFile = project(":airbyte-connector-builder-server").file("src/main/openapi/openapi.yaml").getPath()
val connectorBuilderServerSpecFile = project(":oss:airbyte-connector-builder-server").file("src/main/openapi/openapi.yaml").getPath()

val genApiServer = tasks.register<GenerateTask>("generateApiServer") {
val serverOutputDir = "${getLayout().buildDirectory.get()}/generated/api/server"
Expand Down Expand Up @@ -438,7 +438,7 @@ val genWorkloadApiClient = tasks.register<GenerateTask>("genWorkloadApiClient")
updateDomainClientsToIncludeHttpResponseBodyOnClientException(generatedDomainClientsPath)
}

dependsOn(":airbyte-workload-api-server:compileKotlin", "genApiClient")
dependsOn(":oss:airbyte-workload-api-server:compileKotlin", "genApiClient")
}

val genConnectorBuilderServerApiClient = tasks.register<GenerateTask>("genConnectorBuilderServerApiClient") {
Expand Down
26 changes: 13 additions & 13 deletions airbyte-bootloader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ dependencies {
implementation(libs.jooq)
implementation(libs.guava)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-micronaut"))
implementation(project(":airbyte-config:init"))
implementation(project(":airbyte-config:specs"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":airbyte-config:config-persistence"))
implementation(project(":airbyte-config:config-secrets"))
implementation(project(":airbyte-data"))
implementation(project(":airbyte-db:db-lib"))
implementation(project(":airbyte-metrics:metrics-lib"))
implementation(project(":airbyte-json-validation"))
implementation(project(":airbyte-featureflag"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-micronaut"))
implementation(project(":oss:airbyte-config:init"))
implementation(project(":oss:airbyte-config:specs"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(project(":oss:airbyte-config:config-persistence"))
implementation(project(":oss:airbyte-config:config-secrets"))
implementation(project(":oss:airbyte-data"))
implementation(project(":oss:airbyte-db:db-lib"))
implementation(project(":oss:airbyte-metrics:metrics-lib"))
implementation(project(":oss:airbyte-json-validation"))
implementation(project(":oss:airbyte-featureflag"))
implementation(libs.airbyte.protocol)
implementation(project(":airbyte-persistence:job-persistence"))
implementation(project(":oss:airbyte-persistence:job-persistence"))

runtimeOnly(libs.snakeyaml)

Expand Down
6 changes: 3 additions & 3 deletions airbyte-commons-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ dependencies {
implementation(libs.failsafe.okhttp)
implementation(libs.kotlin.logging)
implementation(libs.okhttp)
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-micronaut"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-micronaut"))
implementation(project(":oss:airbyte-config:config-models"))

testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
Expand Down
12 changes: 6 additions & 6 deletions airbyte-commons-converters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ dependencies {

implementation(libs.apache.commons.text)

implementation(project(":airbyte-api"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":airbyte-config:config-persistence"))
implementation(project(":airbyte-json-validation"))
implementation(project(":airbyte-persistence:job-persistence"))
implementation(project(":oss:airbyte-api"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(project(":oss:airbyte-config:config-persistence"))
implementation(project(":oss:airbyte-json-validation"))
implementation(project(":oss:airbyte-persistence:job-persistence"))
implementation(libs.airbyte.protocol)
implementation(libs.guava)
implementation(libs.slf4j.api)
Expand Down
6 changes: 3 additions & 3 deletions airbyte-commons-license/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dependencies {
implementation(libs.bundles.micronaut)
implementation(libs.guava)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-micronaut"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-micronaut"))
implementation(project(":oss:airbyte-config:config-models"))

testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
Expand Down
2 changes: 1 addition & 1 deletion airbyte-commons-micronaut-security/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {
implementation(libs.micronaut.security)
implementation(libs.micronaut.security.jwt)

implementation(project(":airbyte-commons"))
implementation(project(":oss:airbyte-commons"))

testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok)
Expand Down
4 changes: 2 additions & 2 deletions airbyte-commons-micronaut/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ dependencies {
implementation(libs.bundles.micronaut.annotation)
implementation(libs.micronaut.security)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-config:config-models"))

testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
Expand Down
4 changes: 2 additions & 2 deletions airbyte-commons-protocol/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ dependencies {
annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
annotationProcessor(libs.bundles.micronaut.annotation.processor)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-json-validation"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-json-validation"))

implementation(libs.bundles.micronaut.annotation)
implementation(libs.airbyte.protocol)
Expand Down
50 changes: 25 additions & 25 deletions airbyte-commons-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,35 @@ dependencies {
implementation(libs.swagger.annotations)
implementation(libs.bundles.log4j)
implementation(libs.commons.io)
implementation(project(":airbyte-analytics"))
implementation(project(":airbyte-api"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-auth"))
implementation(project(":airbyte-commons-converters"))
implementation(project(":airbyte-commons-license"))
implementation(project(":airbyte-commons-protocol"))
implementation(project(":airbyte-commons-temporal"))
implementation(project(":airbyte-commons-temporal-core"))
implementation(project(":airbyte-commons-with-dependencies"))
implementation(project(":airbyte-config:init"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":airbyte-config:config-persistence"))
implementation(project(":airbyte-config:config-secrets"))
implementation(project(":airbyte-config:specs"))
implementation(project(":airbyte-data"))
implementation(project(":airbyte-featureflag"))
implementation(project(":airbyte-metrics:metrics-lib"))
implementation(project(":airbyte-db:db-lib"))
implementation(project(":airbyte-json-validation"))
implementation(project(":airbyte-oauth"))
implementation(project(":oss:airbyte-analytics"))
implementation(project(":oss:airbyte-api"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-auth"))
implementation(project(":oss:airbyte-commons-converters"))
implementation(project(":oss:airbyte-commons-license"))
implementation(project(":oss:airbyte-commons-protocol"))
implementation(project(":oss:airbyte-commons-temporal"))
implementation(project(":oss:airbyte-commons-temporal-core"))
implementation(project(":oss:airbyte-commons-with-dependencies"))
implementation(project(":oss:airbyte-config:init"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(project(":oss:airbyte-config:config-persistence"))
implementation(project(":oss:airbyte-config:config-secrets"))
implementation(project(":oss:airbyte-config:specs"))
implementation(project(":oss:airbyte-data"))
implementation(project(":oss:airbyte-featureflag"))
implementation(project(":oss:airbyte-metrics:metrics-lib"))
implementation(project(":oss:airbyte-db:db-lib"))
implementation(project(":oss:airbyte-json-validation"))
implementation(project(":oss:airbyte-oauth"))
implementation(libs.airbyte.protocol)
implementation(project(":airbyte-persistence:job-persistence"))
implementation(project(":airbyte-worker-models"))
implementation(project(":airbyte-notification"))
implementation(project(":oss:airbyte-persistence:job-persistence"))
implementation(project(":oss:airbyte-worker-models"))
implementation(project(":oss:airbyte-notification"))

testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)

testImplementation(project(":airbyte-test-utils"))
testImplementation(project(":oss:airbyte-test-utils"))
testImplementation(libs.postgresql)
testImplementation(libs.platform.testcontainers.postgresql)
testImplementation(libs.mockwebserver)
Expand Down
4 changes: 2 additions & 2 deletions airbyte-commons-temporal-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dependencies {
implementation(libs.failsafe)

// We do not want dependency on(databases from this library.)
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-metrics:metrics-lib"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-metrics:metrics-lib"))

testImplementation(libs.assertj.core)
testImplementation(libs.bundles.junit)
Expand Down
22 changes: 11 additions & 11 deletions airbyte-commons-temporal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ dependencies {
implementation(libs.bundles.apache)
implementation(libs.failsafe)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-temporal-core"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":airbyte-config:config-persistence"))
implementation(project(":airbyte-featureflag"))
implementation(project(":airbyte-metrics:metrics-lib"))
implementation(project(":airbyte-notification"))
implementation(project(":airbyte-persistence:job-persistence"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-temporal-core"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(project(":oss:airbyte-config:config-persistence"))
implementation(project(":oss:airbyte-featureflag"))
implementation(project(":oss:airbyte-metrics:metrics-lib"))
implementation(project(":oss:airbyte-notification"))
implementation(project(":oss:airbyte-persistence:job-persistence"))
implementation(libs.airbyte.protocol)
implementation(project(":airbyte-worker-models"))
implementation(project(":airbyte-api"))
implementation(project(":airbyte-json-validation"))
implementation(project(":oss:airbyte-worker-models"))
implementation(project(":oss:airbyte-api"))
implementation(project(":oss:airbyte-json-validation"))

testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
Expand Down
6 changes: 3 additions & 3 deletions airbyte-commons-with-dependencies/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies {
annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
annotationProcessor(libs.bundles.micronaut.annotation.processor)

implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-temporal"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-temporal"))
implementation(project(":oss:airbyte-config:config-models"))

implementation(libs.guava)

Expand Down
34 changes: 17 additions & 17 deletions airbyte-commons-worker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ dependencies {
implementation(libs.s3)
implementation(libs.sts)

implementation(project(":airbyte-api"))
implementation(project(":airbyte-analytics"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-commons-auth"))
implementation(project(":airbyte-commons-converters"))
implementation(project(":airbyte-commons-protocol"))
implementation(project(":airbyte-commons-temporal"))
implementation(project(":airbyte-commons-temporal-core"))
implementation(project(":airbyte-commons-with-dependencies"))
implementation(project(":airbyte-config:config-models"))
implementation(project(":airbyte-config:config-persistence"))
implementation(project(":airbyte-config:config-secrets"))
implementation(project(":airbyte-featureflag"))
implementation(project(":airbyte-json-validation"))
implementation(project(":airbyte-metrics:metrics-lib"))
implementation(project(":airbyte-persistence:job-persistence"))
implementation(project(":oss:airbyte-api"))
implementation(project(":oss:airbyte-analytics"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-commons-auth"))
implementation(project(":oss:airbyte-commons-converters"))
implementation(project(":oss:airbyte-commons-protocol"))
implementation(project(":oss:airbyte-commons-temporal"))
implementation(project(":oss:airbyte-commons-temporal-core"))
implementation(project(":oss:airbyte-commons-with-dependencies"))
implementation(project(":oss:airbyte-config:config-models"))
implementation(project(":oss:airbyte-config:config-persistence"))
implementation(project(":oss:airbyte-config:config-secrets"))
implementation(project(":oss:airbyte-featureflag"))
implementation(project(":oss:airbyte-json-validation"))
implementation(project(":oss:airbyte-metrics:metrics-lib"))
implementation(project(":oss:airbyte-persistence:job-persistence"))
implementation(libs.airbyte.protocol)
implementation(project(":airbyte-worker-models"))
implementation(project(":oss:airbyte-worker-models"))
implementation(libs.jakarta.validation.api)

testCompileOnly(libs.lombok)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
* Custom Log4j2 {@link RewritePolicy} used to intercept all log messages and mask any JSON
* properties in the message that match the list of maskable properties.
* <p>
* The maskable properties file is generated by a Gradle task in the {@code :airbyte-config:specs}
* project. The file is named {@code specs_secrets_mask.yaml} and is located in the
* {@code src/main/resources/seed} directory of the {@code :airbyte-config:init} project.
* The maskable properties file is generated by a Gradle task in the
* {@code :oss:airbyte-config:specs} project. The file is named {@code specs_secrets_mask.yaml} and
* is located in the {@code src/main/resources/seed} directory of the
* {@code :oss:airbyte-config:init} project.
*/
@Plugin(name = "MaskedDataInterceptor",
category = "Core",
Expand Down
6 changes: 3 additions & 3 deletions airbyte-config/config-models/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dependencies {

api(libs.bundles.micronaut.annotation)

implementation(project(":airbyte-json-validation"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-featureflag"))
implementation(project(":oss:airbyte-json-validation"))
implementation(project(":oss:airbyte-commons"))
implementation(project(":oss:airbyte-featureflag"))

implementation(platform(libs.fasterxml))
implementation(libs.bundles.datadog)
Expand Down
Loading

0 comments on commit 1ee6e3b

Please sign in to comment.