|
| 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.client" |
| 11 | + |
| 12 | +java { |
| 13 | + sourceCompatibility = JavaVersion.VERSION_21 |
| 14 | + targetCompatibility = JavaVersion.VERSION_21 |
| 15 | +} |
| 16 | + |
| 17 | +repositories { |
| 18 | + mavenCentral() |
| 19 | +} |
| 20 | + |
| 21 | +dependencies { |
| 22 | + // TODO: remove the deps not being used |
| 23 | + compileOnly(libs.lombok) |
| 24 | + annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut |
| 25 | + |
| 26 | + implementation("info.picocli:picocli:4.7.4") |
| 27 | + implementation("io.micronaut.picocli:micronaut-picocli") |
| 28 | + implementation("io.temporal:temporal-sdk:1.25.0") |
| 29 | + annotationProcessor("info.picocli:picocli-codegen:4.7.4") |
| 30 | + implementation(project(":oss:airbyte-config:config-models")) |
| 31 | + implementation(project(":oss:airbyte-connector-rollout-worker")) |
| 32 | + implementation(project(":oss:airbyte-api:server-api")) |
| 33 | + implementation(project(":oss:airbyte-api:workload-api")) |
| 34 | + implementation(libs.airbyte.protocol) |
| 35 | + |
| 36 | + annotationProcessor("io.micronaut:micronaut-http-validation") |
| 37 | + annotationProcessor("io.micronaut.serde:micronaut-serde-processor") |
| 38 | + implementation("io.micronaut.serde:micronaut-serde-jackson") |
| 39 | + compileOnly("io.micronaut:micronaut-http-client") |
| 40 | + testImplementation("io.micronaut:micronaut-http-client") |
| 41 | + runtimeOnly("org.yaml:snakeyaml:1.33") |
| 42 | + |
| 43 | +} |
| 44 | + |
| 45 | +application { |
| 46 | + // Default to running ConnectorRolloutCLI |
| 47 | + mainClass.set("io.airbyte.connector.rollout.client.ConnectorRolloutCLI") |
| 48 | +} |
| 49 | + |
| 50 | +val runConnectorRolloutCLI by tasks.registering(JavaExec::class) { |
| 51 | + group = "application" |
| 52 | + description = "Run the ConnectorRolloutCLI with specified arguments" |
| 53 | + classpath = sourceSets["main"].runtimeClasspath |
| 54 | + mainClass.set("io.airbyte.connector.rollout.client.ConnectorRolloutCLI") |
| 55 | + args = listOf("") // Set default CLI command and options here if needed |
| 56 | +} |
| 57 | + |
| 58 | +tasks.jar { |
| 59 | + manifest { |
| 60 | + attributes( |
| 61 | + "Main-Class" to "io.airbyte.connector.rollout.client.ConnectorRolloutCLI" |
| 62 | + ) |
| 63 | + } |
| 64 | + |
| 65 | + archiveBaseName.set("run-connector-rollout-cli") |
| 66 | + archiveVersion.set("") // Remove the version from the JAR file name |
| 67 | +} |
| 68 | + |
| 69 | +tasks.withType<JavaCompile> { |
| 70 | + options.encoding = "UTF-8" |
| 71 | + options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation")) |
| 72 | +} |
| 73 | + |
| 74 | +micronaut { |
| 75 | + runtime("netty") |
| 76 | + testRuntime("junit5") |
| 77 | + processing { |
| 78 | + incremental(true) |
| 79 | + annotations("io.airbyte.connector.rollout.client.*") |
| 80 | + } |
| 81 | +} |
| 82 | + |
| 83 | + |
| 84 | +tasks.withType<Jar> { |
| 85 | + duplicatesStrategy = DuplicatesStrategy.INCLUDE |
| 86 | +} |
| 87 | + |
| 88 | +airbyte { |
| 89 | + application { |
| 90 | + mainClass.set("io.airbyte.connector.rollout.client.ConnectorRolloutCLI") |
| 91 | + defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0") |
| 92 | + localEnvVars.putAll( |
| 93 | + mapOf( |
| 94 | + "AIRBYTE_ROLE" to "undefined", |
| 95 | + "AIRBYTE_VERSION" to "dev", |
| 96 | + "DATA_PLANE_ID" to "local", |
| 97 | + "MICRONAUT_ENVIRONMENTS" to "test" |
| 98 | + ) |
| 99 | + ) |
| 100 | + } |
| 101 | + docker { |
| 102 | + imageName.set("connector-rollout-client") |
| 103 | + } |
| 104 | +} |
0 commit comments