Skip to content

Commit

Permalink
apply styles to *.kts files (#12112)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens committed Apr 15, 2024
1 parent 8fc0b7a commit 704fb95
Show file tree
Hide file tree
Showing 44 changed files with 2,147 additions and 2,117 deletions.
52 changes: 26 additions & 26 deletions airbyte-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
plugins {
id("io.airbyte.gradle.jvm.lib")
id("io.airbyte.gradle.publish")
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlin.kapt")
id("io.airbyte.gradle.jvm.lib")
id("io.airbyte.gradle.publish")
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlin.kapt")
}

dependencies {
kapt(platform(libs.micronaut.platform))
kapt(libs.bundles.micronaut.annotation.processor)
kapt(platform(libs.micronaut.platform))
kapt(libs.bundles.micronaut.annotation.processor)

api(libs.segment.java.analytics)
api(libs.micronaut.http)
api(libs.micronaut.cache.caffeine)
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(libs.segment.java.analytics)
api(libs.micronaut.http)
api(libs.micronaut.cache.caffeine)
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"))


testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
testImplementation(libs.bundles.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.junit.pioneer)
testImplementation(libs.mockk)
testImplementation(libs.kotlin.test.runner.junit5)
testRuntimeOnly(libs.junit.jupiter.engine)
testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
testImplementation(libs.bundles.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.junit.pioneer)
testImplementation(libs.mockk)
testImplementation(libs.kotlin.test.runner.junit5)
testRuntimeOnly(libs.junit.jupiter.engine)
}

// This is a workaround related to kaptBuild errors.
// TODO: this should be removed when we move to kotlin 1.9.20
// TODO: we should write tests
afterEvaluate {
tasks.named("kaptGenerateStubsTestKotlin") {
enabled = false
}
tasks.named("kaptGenerateStubsTestKotlin") {
enabled = false
}
}
144 changes: 74 additions & 70 deletions airbyte-api-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,102 +1,106 @@
import java.util.Properties

plugins {
id("io.airbyte.gradle.jvm.app")
id("io.airbyte.gradle.jvm.lib")
id("io.airbyte.gradle.publish")
id("io.airbyte.gradle.docker")
kotlin("jvm")
kotlin("kapt")
id("io.airbyte.gradle.jvm.app")
id("io.airbyte.gradle.jvm.lib")
id("io.airbyte.gradle.publish")
id("io.airbyte.gradle.docker")
kotlin("jvm")
kotlin("kapt")
}

dependencies {
kapt(platform(libs.micronaut.platform))
kapt(libs.bundles.micronaut.annotation.processor)
kapt(libs.micronaut.jaxrs.processor)
kapt(platform(libs.micronaut.platform))
kapt(libs.bundles.micronaut.annotation.processor)
kapt(libs.micronaut.jaxrs.processor)

kaptTest(platform(libs.micronaut.platform))
kaptTest(libs.bundles.micronaut.test.annotation.processor)
kaptTest(libs.micronaut.jaxrs.processor)
kaptTest(platform(libs.micronaut.platform))
kaptTest(libs.bundles.micronaut.test.annotation.processor)
kaptTest(libs.micronaut.jaxrs.processor)

annotationProcessor(platform(libs.micronaut.platform))
annotationProcessor(libs.bundles.micronaut.annotation.processor)
annotationProcessor(libs.micronaut.jaxrs.processor)
annotationProcessor(platform(libs.micronaut.platform))
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-config:config-models"))
implementation(platform(libs.micronaut.platform))
implementation(libs.cron.utils)
implementation(libs.log4j.slf4j2.impl)
implementation(libs.bundles.jackson)
implementation(libs.bundles.micronaut)
implementation(libs.bundles.micronaut.cache)
implementation(libs.bundles.micronaut.data.jdbc)
implementation(libs.bundles.micronaut.metrics)
implementation(libs.micronaut.jaxrs.server)
implementation(libs.micronaut.problem.json)
implementation(libs.micronaut.security)
implementation(libs.sentry.java)
implementation(libs.swagger.annotations)
implementation(libs.jakarta.ws.rs.api)
implementation(libs.airbyte.protocol)
implementation(project(":airbyte-analytics"))
implementation(project(":airbyte-api"))
implementation(project(":airbyte-commons"))
implementation(project(":airbyte-config:config-models"))
implementation(platform(libs.micronaut.platform))
implementation(libs.cron.utils)
implementation(libs.log4j.slf4j2.impl)
implementation(libs.bundles.jackson)
implementation(libs.bundles.micronaut)
implementation(libs.bundles.micronaut.cache)
implementation(libs.bundles.micronaut.data.jdbc)
implementation(libs.bundles.micronaut.metrics)
implementation(libs.micronaut.jaxrs.server)
implementation(libs.micronaut.problem.json)
implementation(libs.micronaut.security)
implementation(libs.sentry.java)
implementation(libs.swagger.annotations)
implementation(libs.jakarta.ws.rs.api)
implementation(libs.airbyte.protocol)

runtimeOnly(libs.javax.databind)
runtimeOnly(libs.snakeyaml)
runtimeOnly(libs.javax.databind)
runtimeOnly(libs.snakeyaml)

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

testImplementation(project(":airbyte-test-utils"))
testImplementation(libs.bundles.micronaut.test)
testImplementation(libs.postgresql)
testImplementation(libs.platform.testcontainers.postgresql)
testImplementation(libs.mockwebserver)
testImplementation(libs.mockito.inline)
testImplementation(libs.mockk)
testImplementation(project(":airbyte-test-utils"))
testImplementation(libs.bundles.micronaut.test)
testImplementation(libs.postgresql)
testImplementation(libs.platform.testcontainers.postgresql)
testImplementation(libs.mockwebserver)
testImplementation(libs.mockito.inline)
testImplementation(libs.mockk)
}

kapt {
correctErrorTypes = true
correctErrorTypes = true
}

val env = Properties().apply {
load(rootProject.file(".env.dev").inputStream())
load(rootProject.file(".env.dev").inputStream())
}

airbyte {
application {
mainClass = "io.airbyte.api.server.ApplicationKt"
defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0")
application {
mainClass = "io.airbyte.api.server.ApplicationKt"
defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0")

@Suppress("UNCHECKED_CAST")
localEnvVars.putAll(env.toMutableMap() as Map<String, String>)
localEnvVars.putAll(mapOf(
"AIRBYTE_ROLE" to (System.getenv("AIRBYTE_ROLE") ?: "undefined"),
"AIRBYTE_VERSION" to env["VERSION"].toString(),
"MICRONAUT_ENVIRONMENTS" to "control-plane",
"SERVICE_NAME" to project.name,
"TRACKING_STRATEGY" to env["TRACKING_STRATEGY"].toString(),
))
}
docker {
imageName = "airbyte-api-server"
}
@Suppress("UNCHECKED_CAST")
localEnvVars.putAll(env.toMutableMap() as Map<String, String>)
localEnvVars.putAll(
mapOf(
"AIRBYTE_ROLE" to (System.getenv("AIRBYTE_ROLE") ?: "undefined"),
"AIRBYTE_VERSION" to env["VERSION"].toString(),
"MICRONAUT_ENVIRONMENTS" to "control-plane",
"SERVICE_NAME" to project.name,
"TRACKING_STRATEGY" to env["TRACKING_STRATEGY"].toString(),
)
)
}
docker {
imageName = "airbyte-api-server"
}
}

tasks.named<Test>("test") {
environment(mapOf(
"AIRBYTE_VERSION" to env["VERSION"],
"MICRONAUT_ENVIRONMENTS" to "test",
"SERVICE_NAME" to project.name,
))
environment(
mapOf(
"AIRBYTE_VERSION" to env["VERSION"],
"MICRONAUT_ENVIRONMENTS" to "test",
"SERVICE_NAME" to project.name,
)
)
}

// Even though Kotlin is excluded on Spotbugs, this projects)
// still runs into spotbug issues. Working theory is that)
// generated code is being picked up. Disable as a short-term fix.)
tasks.named("spotbugsMain") {
enabled = false
enabled = false
}
118 changes: 60 additions & 58 deletions airbyte-bootloader/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,81 +1,83 @@
import java.util.Properties

plugins {
id("io.airbyte.gradle.jvm.app")
id("io.airbyte.gradle.docker")
id("io.airbyte.gradle.publish")
id("io.airbyte.gradle.jvm.app")
id("io.airbyte.gradle.docker")
id("io.airbyte.gradle.publish")
}

configurations.all {
resolutionStrategy {
force(libs.flyway.core, libs.jooq)
}
resolutionStrategy {
force(libs.flyway.core, libs.jooq)
}
}

dependencies {
compileOnly(libs.lombok)
annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
annotationProcessor(platform(libs.micronaut.platform))
annotationProcessor(libs.bundles.micronaut.annotation.processor)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
annotationProcessor(platform(libs.micronaut.platform))
annotationProcessor(libs.bundles.micronaut.annotation.processor)

implementation(platform(libs.micronaut.platform))
implementation(libs.bundles.micronaut)
implementation(libs.bundles.flyway)
implementation(libs.jooq)
implementation(libs.guava)
implementation(platform(libs.micronaut.platform))
implementation(libs.bundles.micronaut)
implementation(libs.bundles.flyway)
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(libs.airbyte.protocol)
implementation(project(":airbyte-persistence:job-persistence"))
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(libs.airbyte.protocol)
implementation(project(":airbyte-persistence:job-persistence"))

runtimeOnly(libs.snakeyaml)
runtimeOnly(libs.snakeyaml)

testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.annotation.processor)
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)
testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok) // Lombok must be added BEFORE Micronaut
testAnnotationProcessor(platform(libs.micronaut.platform))
testAnnotationProcessor(libs.bundles.micronaut.annotation.processor)
testAnnotationProcessor(libs.bundles.micronaut.test.annotation.processor)

testImplementation(libs.bundles.micronaut.test)
testImplementation(libs.bundles.junit)
testImplementation(libs.junit.jupiter.system.stubs)
testImplementation(libs.platform.testcontainers.postgresql)
testImplementation(libs.bundles.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.junit.pioneer)
testImplementation(libs.bundles.micronaut.test)
testImplementation(libs.bundles.junit)
testImplementation(libs.junit.jupiter.system.stubs)
testImplementation(libs.platform.testcontainers.postgresql)
testImplementation(libs.bundles.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.junit.pioneer)

testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.junit.jupiter.engine)
}

val env = Properties().apply {
load(rootProject.file(".env.dev").inputStream())
load(rootProject.file(".env.dev").inputStream())
}

airbyte {
application {
mainClass = "io.airbyte.bootloader.Application"
defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0")
@Suppress("UNCHECKED_CAST")
localEnvVars.putAll(env.toMutableMap() as Map<String, String>)
localEnvVars.putAll(mapOf(
"AIRBYTE_ROLE" to (System.getenv("AIRBYTE_ROLE") ?: "undefined"),
"AIRBYTE_VERSION" to env["VERSION"].toString(),
"DATABASE_URL" to "jdbc:postgresql://localhost:5432/airbyte",
))
}
application {
mainClass = "io.airbyte.bootloader.Application"
defaultJvmArgs = listOf("-XX:+ExitOnOutOfMemoryError", "-XX:MaxRAMPercentage=75.0")
@Suppress("UNCHECKED_CAST")
localEnvVars.putAll(env.toMutableMap() as Map<String, String>)
localEnvVars.putAll(
mapOf(
"AIRBYTE_ROLE" to (System.getenv("AIRBYTE_ROLE") ?: "undefined"),
"AIRBYTE_VERSION" to env["VERSION"].toString(),
"DATABASE_URL" to "jdbc:postgresql://localhost:5432/airbyte",
)
)
}

docker {
imageName = "bootloader"
}
docker {
imageName = "bootloader"
}
}
Loading

0 comments on commit 704fb95

Please sign in to comment.