103 lines
4.0 KiB
Groovy
103 lines
4.0 KiB
Groovy
plugins {
|
|
id 'application'
|
|
}
|
|
|
|
configurations.all {
|
|
exclude group: 'io.micronaut.jaxrs'
|
|
exclude group: 'io.micronaut.sql'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':airbyte-analytics')
|
|
implementation project(':airbyte-api')
|
|
implementation project(':airbyte-commons-docker')
|
|
implementation project(':airbyte-commons-temporal')
|
|
implementation project(':airbyte-commons-worker')
|
|
implementation project(':airbyte-config:init')
|
|
implementation project(':airbyte-config:config-models')
|
|
implementation project(':airbyte-config:config-persistence')
|
|
implementation project(':airbyte-config:specs')
|
|
implementation project(':airbyte-db:db-lib')
|
|
implementation project(":airbyte-json-validation")
|
|
implementation project(':airbyte-notification')
|
|
implementation project(':airbyte-oauth')
|
|
implementation project(':airbyte-protocol:protocol-models')
|
|
implementation project(':airbyte-persistence:job-persistence')
|
|
|
|
implementation libs.flyway.core
|
|
implementation 'com.github.slugify:slugify:2.4'
|
|
implementation 'commons-cli:commons-cli:1.4'
|
|
implementation libs.temporal.sdk
|
|
implementation 'org.apache.cxf:cxf-core:3.4.2'
|
|
implementation 'org.eclipse.jetty:jetty-server:9.4.31.v20200723'
|
|
implementation 'org.eclipse.jetty:jetty-servlet:9.4.31.v20200723'
|
|
implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2'
|
|
implementation 'org.glassfish.jersey.containers:jersey-container-servlet'
|
|
implementation 'org.glassfish.jersey.inject:jersey-hk2'
|
|
implementation 'org.glassfish.jersey.media:jersey-media-json-jackson'
|
|
implementation 'org.glassfish.jersey.ext:jersey-bean-validation'
|
|
implementation 'org.quartz-scheduler:quartz:2.3.2'
|
|
|
|
|
|
testImplementation project(':airbyte-test-utils')
|
|
testImplementation libs.postgresql
|
|
testImplementation libs.platform.testcontainers.postgresql
|
|
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
|
|
}
|
|
|
|
// we want to be able to access the generated db files from config/init when we build the server docker image.
|
|
task copySeed(type: Copy, dependsOn: [project(':airbyte-config:init').processResources]) {
|
|
from "${project(':airbyte-config:init').buildDir}/resources/main/config"
|
|
into "${buildDir}/config_init/resources/main/config"
|
|
}
|
|
|
|
// need to make sure that the files are in the resource directory before copying.
|
|
// tests require the seed to exist.
|
|
test.dependsOn(project.tasks.copySeed)
|
|
assemble.dependsOn(project.tasks.copySeed)
|
|
|
|
mainClassName = 'io.airbyte.server.ServerApp'
|
|
|
|
application {
|
|
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.
|
|
environment "DATABASE_USER", env.DATABASE_USER
|
|
environment "DATABASE_PASSWORD", env.DATABASE_PASSWORD
|
|
|
|
environment "CONFIG_DATABASE_USER", env.CONFIG_DATABASE_USER
|
|
environment "CONFIG_DATABASE_PASSWORD", env.CONFIG_DATABASE_PASSWORD
|
|
|
|
// we map the docker pg db to port 5433 so it does not conflict with other pg instances.
|
|
environment "DATABASE_URL", "jdbc:postgresql://localhost:5433/${env.DATABASE_DB}"
|
|
environment "CONFIG_DATABASE_URL", "jdbc:postgresql://localhost:5433/${env.CONFIG_DATABASE_DB}"
|
|
|
|
environment "RUN_DATABASE_MIGRATION_ON_STARTUP", "true"
|
|
|
|
environment "WORKSPACE_ROOT", env.WORKSPACE_ROOT
|
|
environment "CONFIG_ROOT", "/tmp/airbyte_config"
|
|
environment "TRACKING_STRATEGY", env.TRACKING_STRATEGY
|
|
environment "AIRBYTE_VERSION", env.VERSION
|
|
environment "AIRBYTE_ROLE", System.getenv('AIRBYTE_ROLE')
|
|
environment "TEMPORAL_HOST", "localhost:7233"
|
|
}
|
|
|
|
// produce reproducible archives
|
|
// (see https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives)
|
|
tasks.withType(AbstractArchiveTask) {
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
}
|
|
|
|
tasks.named("buildDockerImage") {
|
|
dependsOn copyGeneratedTar
|
|
}
|
|
|
|
Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)
|