|
| 1 | +plugins { |
| 2 | + id("io.micronaut.application") version "4.4.2" |
| 3 | + id("io.airbyte.gradle.jvm.app") |
| 4 | + id("io.airbyte.gradle.jvm.lib") |
| 5 | + id("io.airbyte.gradle.publish") |
| 6 | + id("io.airbyte.gradle.docker") |
| 7 | + application |
| 8 | +} |
| 9 | + |
| 10 | +group = "io.airbyte.connector.rollout.worker" |
| 11 | + |
| 12 | +java { |
| 13 | + sourceCompatibility = JavaVersion.VERSION_21 |
| 14 | + targetCompatibility = JavaVersion.VERSION_21 |
| 15 | +} |
| 16 | + |
| 17 | +repositories { |
| 18 | + mavenCentral() |
| 19 | +} |
| 20 | + |
| 21 | +dependencies { |
| 22 | + implementation(project(mapOf("path" to ":oss:airbyte-commons-temporal"))) |
| 23 | + // TODO: remove the deps not being used |
| 24 | + compileOnly(libs.lombok) |
| 25 | + annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut |
| 26 | + |
| 27 | + implementation("io.temporal:temporal-sdk:1.25.0") |
| 28 | + implementation(project(":oss:airbyte-config:config-models")) |
| 29 | + implementation(project(":oss:airbyte-api:server-api")) |
| 30 | + implementation(project(":oss:airbyte-commons-temporal")) |
| 31 | + implementation(project(":oss:airbyte-commons-temporal-core")) |
| 32 | + implementation(libs.airbyte.protocol) |
| 33 | + |
| 34 | + annotationProcessor("io.micronaut:micronaut-http-validation") |
| 35 | + annotationProcessor("io.micronaut.serde:micronaut-serde-processor") |
| 36 | + implementation("io.micronaut.serde:micronaut-serde-jackson") |
| 37 | + compileOnly("io.micronaut:micronaut-http-client") |
| 38 | + testImplementation("io.micronaut:micronaut-http-client") |
| 39 | + runtimeOnly("org.yaml:snakeyaml:1.33") |
| 40 | + |
| 41 | +} |
| 42 | + |
| 43 | +application { |
| 44 | + // Default to running ConnectorRolloutWorker |
| 45 | + mainClass.set("io.airbyte.connector.rollout.worker.ConnectorRolloutWorkerApplication") |
| 46 | +} |
| 47 | + |
| 48 | +tasks.jar { |
| 49 | + manifest { |
| 50 | + attributes( |
| 51 | + "Main-Class" to "io.airbyte.connector.rollout.worker.ConnectorRolloutWorkerApplication" |
| 52 | + ) |
| 53 | + } |
| 54 | + |
| 55 | + archiveBaseName.set("run-connector-rollout-worker") |
| 56 | + archiveVersion.set("") // Remove the version from the JAR file name |
| 57 | +} |
| 58 | + |
| 59 | +tasks.withType<JavaCompile> { |
| 60 | + options.encoding = "UTF-8" |
| 61 | + options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation")) |
| 62 | +} |
| 63 | + |
| 64 | +micronaut { |
| 65 | + runtime("netty") |
| 66 | + testRuntime("junit5") |
| 67 | + processing { |
| 68 | + incremental(true) |
| 69 | + annotations("io.airbyte.connector.rollout.worker.*") |
| 70 | + } |
| 71 | +} |
| 72 | + |
| 73 | + |
| 74 | +tasks.withType<Jar> { |
| 75 | + duplicatesStrategy = DuplicatesStrategy.INCLUDE |
| 76 | +} |
| 77 | + |
| 78 | +airbyte { |
| 79 | + application { |
| 80 | + mainClass.set("io.airbyte.connector.rollout.worker.ConnectorRolloutWorkerApplication") |
| 81 | + defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0") |
| 82 | + localEnvVars.putAll( |
| 83 | + mapOf( |
| 84 | + "AIRBYTE_ROLE" to "undefined", |
| 85 | + "AIRBYTE_VERSION" to "dev", |
| 86 | + "DATA_PLANE_ID" to "local", |
| 87 | + "MICRONAUT_ENVIRONMENTS" to "test" |
| 88 | + ) |
| 89 | + ) |
| 90 | + } |
| 91 | + docker { |
| 92 | + imageName.set("connector-rollout-worker") |
| 93 | + } |
| 94 | +} |
| 95 | + |
0 commit comments