1
0
mirror of synced 2026-01-21 15:06:13 -05:00
Files
airbyte/airbyte-workers/build.gradle
Jonathan Pearlin e571b2bfd5 Upgrade to Micronaut 3.8.0 and related dependencies (#21077)
* Upgrade to Micronaut 3.8.0 and related dependencies

* Define hostname/subdomain to be compatible with updated AWS SDK

* Use bucket name for hostname

* Pin dependencies to avoid behavior change

* Add comment
2023-01-11 10:40:29 -05:00

156 lines
5.6 KiB
Groovy

import groovy.yaml.YamlSlurper
import groovy.json.JsonBuilder
plugins {
id 'application'
id 'airbyte-integration-test-java'
}
configurations {
jdbc
}
dependencies {
annotationProcessor platform(libs.micronaut.bom)
annotationProcessor libs.bundles.micronaut.annotation.processor
implementation platform(libs.micronaut.bom)
implementation libs.bundles.micronaut
// Ensure that the versions defined in deps.toml are used
// instead of versions from transitive dependencies
implementation (libs.flyway.core) {
force = true
}
implementation (libs.jooq) {
force = true
}
implementation(libs.s3) {
// Force to avoid updated version brought in transitively from Micronaut 3.8+
// that is incompatible with our current Helm setup
force = true
}
implementation(libs.aws.java.sdk.s3) {
// Force to avoid updated version brought in transitively from Micronaut 3.8+
// that is incompatible with our current Helm setup
force = true
}
implementation 'com.google.auth:google-auth-library-oauth2-http:1.4.0'
implementation 'com.auth0:java-jwt:3.19.2'
implementation 'io.fabric8:kubernetes-client:5.12.2'
implementation libs.guava
implementation (libs.temporal.sdk) {
exclude module: 'guava'
}
implementation 'org.apache.ant:ant:1.10.10'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation 'org.apache.commons:commons-text:1.10.0'
implementation 'org.quartz-scheduler:quartz:2.3.2'
implementation libs.micrometer.statsd
implementation libs.bundles.datadog
implementation 'io.sentry:sentry:6.3.1'
implementation 'net.bytebuddy:byte-buddy:1.12.14'
implementation 'org.springframework:spring-core:5.3.22'
implementation project(':airbyte-analytics')
implementation project(':airbyte-api')
implementation project(':airbyte-commons-docker')
implementation project(':airbyte-commons-protocol')
implementation project(':airbyte-commons-temporal')
implementation project(':airbyte-commons-worker')
implementation project(':airbyte-config:config-models')
implementation project(':airbyte-config:config-persistence')
implementation project(':airbyte-config:init')
implementation project(':airbyte-db:jooq')
implementation project(':airbyte-db:db-lib')
implementation project(':airbyte-metrics:metrics-lib')
implementation project(':airbyte-json-validation')
implementation project(':airbyte-protocol:protocol-models')
implementation project(':airbyte-notification')
implementation (project(':airbyte-persistence:job-persistence')) {
// Temporary hack to avoid dependency conflicts
exclude group: 'io.micronaut'
exclude group: 'io.micronaut.flyway'
exclude group: 'io.micronaut.jaxrs'
exclude group: 'io.micronaut.security'
exclude group: 'io.micronaut.sql'
}
implementation project(':airbyte-worker-models')
testAnnotationProcessor platform(libs.micronaut.bom)
testAnnotationProcessor libs.bundles.micronaut.test.annotation.processor
integrationTestJavaAnnotationProcessor platform(libs.micronaut.bom)
integrationTestJavaAnnotationProcessor libs.bundles.micronaut.test.annotation.processor
testImplementation libs.bundles.micronaut.test
testImplementation libs.temporal.testing
testImplementation 'com.jayway.jsonpath:json-path:2.7.0'
testImplementation 'org.mockito:mockito-inline:4.7.0'
testImplementation libs.postgresql
testImplementation libs.platform.testcontainers
testImplementation libs.platform.testcontainers.postgresql
testImplementation project(':airbyte-commons-docker')
testImplementation project(':airbyte-test-utils')
integrationTestJavaImplementation project(':airbyte-workers')
integrationTestJavaImplementation libs.bundles.micronaut.test
}
mainClassName = 'io.airbyte.workers.Application'
application {
applicationName = project.name
mainClass = mainClassName
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}
Properties env = new Properties()
rootProject.file('.env.dev').withInputStream { env.load(it) }
run {
// default for running on local machine.
env.each { entry ->
environment entry.getKey(), entry.getValue()
}
environment 'AIRBYTE_ROLE', System.getenv('AIRBYTE_ROLE')
environment 'AIRBYTE_VERSION', env.VERSION
environment 'MICRONAUT_ENVIRONMENTS', 'control-plane'
}
task cloudStorageIntegrationTest(type: Test) {
useJUnitPlatform {
includeTags cloudStorageTestTagName
}
testLogging {
events "passed", "skipped", "failed"
}
}
task generateWellKnownTypes() {
doLast {
def wellKnownTypesYaml = project(':airbyte-protocol').file('protocol-models/src/main/resources/airbyte_protocol/well_known_types.yaml').text
def parsedYaml = new YamlSlurper().parseText(wellKnownTypesYaml)
def wellKnownTypesJson = new JsonBuilder(parsedYaml).toPrettyString()
def targetFile = project.file("build/docker/WellKnownTypes.json")
targetFile.getParentFile().mkdirs()
targetFile.text = wellKnownTypesJson
}
}
tasks.named("buildDockerImage") {
dependsOn copyGeneratedTar
}
// Ideally, we would have buildDockerImage depend on generateWellKnownTypes
// but some of our actions use copyGeneratedTar as the "set up the docker build context" task
// so we'll just add it here.
tasks.named("copyGeneratedTar") {
dependsOn generateWellKnownTypes
}
Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)