Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion buildSrc/src/main/kotlin/flamingock.publishing.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import groovy.util.Node
import org.gradle.api.artifacts.ExternalModuleDependency

plugins {
`maven-publish`
id("org.jreleaser")
Expand All @@ -11,6 +14,15 @@ fun Project.isLibraryModule(): Boolean = name !in setOf(

val fromComponentPublishing = if (isBomModule()) "javaPlatform" else "java"
val mavenPublication = if (isBomModule()) "communityBom" else "maven"
val externalCompileOnlyApiDependencies = provider {
configurations.findByName("compileOnlyApi")
?.dependencies
?.filterIsInstance<ExternalModuleDependency>()
?.filter { dependency -> dependency.group != "io.flamingock" }
?.map { dependency -> "${dependency.group}:${dependency.name}" }
?.toSet()
?: emptySet()
}

publishing {
publications {
Expand All @@ -20,6 +32,31 @@ publishing {
version = project.version.toString()
from(components[fromComponentPublishing])
pom {
withXml {
val optionalDependencies = externalCompileOnlyApiDependencies.get()
val dependencies = (asNode().get("dependencies") as List<*>)
.filterIsInstance<Node>()
.flatMap { dependenciesNode ->
(dependenciesNode.get("dependency") as List<*>).filterIsInstance<Node>()
}

dependencies
.filter { dependency ->
val groupId = (dependency.get("groupId") as List<*>)
.filterIsInstance<Node>()
.firstOrNull()
?.text()
val artifactId = (dependency.get("artifactId") as List<*>)
.filterIsInstance<Node>()
.firstOrNull()
?.text()
"$groupId:$artifactId" in optionalDependencies
}
.filter { dependency ->
(dependency.get("optional") as List<*>).isEmpty()
}
.forEach { dependency -> dependency.appendNode("optional", "true") }
}
name.set(project.name)
description.set("Flamingock is a Java library that brings Change-as-Code to your applications. It enables you to define and apply versioned, auditable changes to databases, event schemas, and external systems, ensuring safety, synchronization, and governance at runtime")
url.set("https://www.flamingock.io")
Expand Down Expand Up @@ -102,4 +139,4 @@ tasks.register("createStagingDeployFolder") {

tasks.matching { it.name == "publish" }.configureEach {
finalizedBy("createStagingDeployFolder")
}
}
8 changes: 4 additions & 4 deletions cloud/flamingock-cloud/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
val coreApiVersion: String by extra
dependencies {
// Core
api(project(":cloud:flamingock-cloud-api"))
implementation(project(":core:flamingock-core"))
api("io.flamingock:flamingock-core-api:${coreApiVersion}")
api(project(":core:flamingock-core"))
// target systems
api(project(":core:target-systems:flamingock-nontransactional-targetsystem"))
api(project(":core:target-systems:flamingock-couchbase-targetsystem"))
Expand All @@ -22,8 +20,10 @@ dependencies {
api(project(":community:flamingock-mongodb-sync-auditstore"))
api(project(":community:flamingock-sql-auditstore"))

implementation("org.apache.httpcomponents:httpclient:4.5.14")

// Test
// Test
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
testAnnotationProcessor(project(":core:flamingock-processor"))
testImplementation(project(":utils:test-util"))
testImplementation(project(":core:target-systems:flamingock-nontransactional-targetsystem"))
Expand Down
1 change: 0 additions & 1 deletion community/flamingock-community-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {
api("io.flamingock:flamingock-community:${version}")
api("io.flamingock:flamingock-mongodb-reactive-auditstore:$version")
api("io.flamingock:flamingock-mongodb-sync-auditstore:$version")
api("io.flamingock:flamingock-mongodb-springdata-auditstore:${version}")
api("io.flamingock:flamingock-couchbase-auditstore:$version")
api("io.flamingock:flamingock-dynamodb-auditstore:$version")
api("io.flamingock:flamingock-sql-auditstore:$version")
Expand Down
4 changes: 0 additions & 4 deletions community/flamingock-community/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
val coreApiVersion: String by extra
dependencies {
// Core
api(project(":core:flamingock-core"))
api("io.flamingock:flamingock-core-api:${coreApiVersion}")
// target systems
api(project(":core:target-systems:flamingock-nontransactional-targetsystem"))
api(project(":core:target-systems:flamingock-couchbase-targetsystem"))
Expand Down
4 changes: 1 addition & 3 deletions community/flamingock-dynamodb-auditstore/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
dependencies {
implementation(project(":utils:dynamodb-util"))
implementation(project(":core:flamingock-core"))


api(project(":core:flamingock-core"))
api(project(":core:target-systems:flamingock-dynamodb-externalsystem-api"))

compileOnly("software.amazon.awssdk:dynamodb-enhanced:2.25.29")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import org.jetbrains.kotlin.gradle.utils.extendsFrom

dependencies {
implementation(project(":utils:mongodb-util"))
api(project(":utils:mongodb-util"))
implementation(project(":utils:mongodb-reactive-util"))
implementation(project(":utils:flamingock-reactive-util"))
implementation(project(":core:flamingock-core"))
api(project(":core:flamingock-core"))

api(project(":core:target-systems:flamingock-mongodb-reactive-externalsystem-api"))

compileOnly("org.mongodb:mongodb-driver-reactivestreams:4.0.0")
compileOnlyApi("org.mongodb:mongodb-driver-reactivestreams:4.0.0")

testImplementation(project(":utils:test-util"))
testImplementation(project(":utils:mongodb-reactive-test-kit"))
Expand Down
6 changes: 3 additions & 3 deletions community/flamingock-mongodb-sync-auditstore/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import org.jetbrains.kotlin.gradle.utils.extendsFrom

dependencies {
implementation(project(":utils:mongodb-util"))
api(project(":utils:mongodb-util"))
implementation(project(":utils:mongodb-sync-util"))
implementation(project(":core:flamingock-core"))
api(project(":core:flamingock-core"))

api(project(":core:target-systems:flamingock-mongodb-externalsystem-api"))
// api(project(":community:flamingock-community"))

compileOnly("org.mongodb:mongodb-driver-sync:4.0.0")
compileOnlyApi("org.mongodb:mongodb-driver-sync:4.0.0")


testImplementation(project(":utils:test-util"))
Expand Down
6 changes: 2 additions & 4 deletions community/flamingock-sql-auditstore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import java.time.Duration
val sqlVersion: String by extra

dependencies {
api(project(":core:flamingock-core"))

api(project(":core:target-systems:flamingock-sql-externalsystem-api"))

api(project(":core:target-systems:flamingock-sql-targetsystem"))
api(project(":core:flamingock-core"))
implementation(project(":core:target-systems:flamingock-sql-targetsystem"))
implementation("io.flamingock:flamingock-sql-util:${sqlVersion}")

testImplementation(project(":core:target-systems:flamingock-sql-externalsystem-api"))
Expand Down Expand Up @@ -65,4 +64,3 @@ tasks.test {
showStandardStreams = false
}
}

1 change: 0 additions & 1 deletion core/flamingock-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies {
api("io.flamingock:flamingock-community:${version}")
api("io.flamingock:flamingock-mongodb-reactive-auditstore:$version")
api("io.flamingock:flamingock-mongodb-sync-auditstore:$version")
api("io.flamingock:flamingock-mongodb-springdata-auditstore:${version}")
api("io.flamingock:flamingock-couchbase-auditstore:$version")
api("io.flamingock:flamingock-dynamodb-auditstore:$version")
api("io.flamingock:flamingock-sql-auditstore:$version")
Expand Down
6 changes: 3 additions & 3 deletions core/flamingock-core-commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ val coreApiVersion: String by extra
dependencies {
// api(project(":cloud:flamingock-cloud-api"))
api("io.flamingock:flamingock-core-api:${coreApiVersion}")
api("io.flamingock:flamingock-general-util:${generalUtilVersion}")//todo implementation
api("jakarta.annotation:jakarta.annotation-api:2.1.1")//todo can this be implementation?
api("io.flamingock:flamingock-general-util:${generalUtilVersion}")
implementation("jakarta.annotation:jakarta.annotation-api:2.1.1")

implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
Expand All @@ -17,4 +17,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
16 changes: 7 additions & 9 deletions core/flamingock-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
val jacksonVersion = "2.16.0"
val generalUtilVersion: String by extra

dependencies {
api(project(":core:flamingock-core-commons"))
api("io.flamingock:flamingock-general-util:${generalUtilVersion}")//todo implementation

api("javax.inject:javax.inject:1")
api("org.javassist:javassist:3.30.2-GA")
api("com.google.code.findbugs:jsr305:3.0.2")
api("org.objenesis:objenesis:3.2")
api("org.yaml:snakeyaml:2.2")
implementation("javax.inject:javax.inject:1")
implementation("org.javassist:javassist:3.30.2-GA")
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("org.objenesis:objenesis:3.2")
implementation("org.yaml:snakeyaml:2.2")

api("org.apache.httpcomponents:httpclient:4.5.14")
implementation("org.apache.httpcomponents:httpclient:4.5.14")

api("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")


testImplementation(project(":utils:test-util"))
Expand Down
4 changes: 2 additions & 2 deletions core/flamingock-graalvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
val generalUtilVersion: String by extra
dependencies {
api("io.flamingock:flamingock-general-util:${generalUtilVersion}")
implementation("io.flamingock:flamingock-general-util:${generalUtilVersion}")

// GraalVM SDK for native image support — compileOnly because it's only needed at
// native-image build time, never at JVM runtime.
compileOnly("org.graalvm.sdk:graal-sdk:22.3.0")
compileOnlyApi("org.graalvm.sdk:graal-sdk:22.3.0")
}

description = "GraalVM native image support and configuration for Flamingock applications"
Expand Down
6 changes: 2 additions & 4 deletions core/flamingock-processor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
val jacksonVersion = "2.16.0"
val generalUtilVersion: String by extra
dependencies {
api(project(":core:flamingock-core-commons"))
api("io.flamingock:flamingock-general-util:${generalUtilVersion}")//todo implementation
api("org.yaml:snakeyaml:2.2")//todo implementation
api("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")//todo implementation
implementation("org.yaml:snakeyaml:2.2")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
}

description = "Annotation processor for generating change metadata and pipeline configurations from @Change annotations and YAML templates"
Expand Down
6 changes: 3 additions & 3 deletions core/flamingock-test-support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
implementation(project(":core:flamingock-core"))
api(project(":core:flamingock-core"))


testImplementation(platform("org.junit:junit-bom:5.10.0"))
Expand All @@ -9,7 +9,7 @@ dependencies {
// Add test utilities from the repository so tests can use InMemoryTestKit and pipeline helpers
testImplementation(project(":utils:test-util"))
testImplementation(project(":core:target-systems:flamingock-nontransactional-targetsystem"))
api("org.mockito:mockito-inline:4.11.0")
implementation("org.mockito:mockito-inline:4.11.0")
}

description = "Test support module for Flamingock framework"
Expand All @@ -28,4 +28,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
val coreApiVersion: String by extra
dependencies {
implementation("io.flamingock:flamingock-core-api:${coreApiVersion}")
api("io.flamingock:flamingock-core-api:${coreApiVersion}")

//General
compileOnly("com.couchbase.client:java-client:3.6.0")
compileOnlyApi("com.couchbase.client:java-client:3.6.0")
}

description = "Couchbase external system api"
Expand All @@ -12,4 +12,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation(project(":legacy:mongock-importer-couchbase"))

//General
compileOnly("com.couchbase.client:java-client:3.6.0")
compileOnlyApi("com.couchbase.client:java-client:3.6.0")

//Test
testImplementation("org.testcontainers:testcontainers-couchbase:2.0.2")
Expand All @@ -28,4 +28,4 @@ java {

configurations.testImplementation {
extendsFrom(configurations.compileOnly.get())
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
val coreApiVersion: String by extra
dependencies {
implementation("io.flamingock:flamingock-core-api:${coreApiVersion}")
api("io.flamingock:flamingock-core-api:${coreApiVersion}")

//General
compileOnly("software.amazon.awssdk:dynamodb-enhanced:2.25.29")
compileOnlyApi("software.amazon.awssdk:dynamodb:2.25.29")
}

description = "DynamoDB external system api"
Expand All @@ -12,4 +12,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies {
implementation(project(":utils:dynamodb-util"))
implementation(project(":legacy:mongock-importer-dynamodb"))

compileOnly("software.amazon.awssdk:dynamodb-enhanced:2.25.29")
compileOnlyApi("software.amazon.awssdk:dynamodb-enhanced:2.25.29")

testImplementation("software.amazon.awssdk:dynamodb:2.25.29")
testImplementation("software.amazon.awssdk:dynamodb-enhanced:2.25.29")
Expand All @@ -24,4 +24,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
val coreApiVersion: String by extra
dependencies {

api(project(":core:flamingock-core-commons"))

// MongoDB driver for storage implementations
compileOnly("org.mongodb:mongodb-driver-sync:4.0.0")
compileOnlyApi("org.mongodb:mongodb-driver-sync:4.0.0")
}

description = "MongoDB external system api"
Expand All @@ -13,4 +11,4 @@ java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
val coreApiVersion: String by extra

dependencies {
implementation("io.flamingock:flamingock-core-api:${coreApiVersion}")
api("io.flamingock:flamingock-core-api:${coreApiVersion}")

compileOnly("org.mongodb:mongodb-driver-reactivestreams:4.0.0")
compileOnlyApi("org.mongodb:mongodb-driver-reactivestreams:4.0.0")
}

description = "MongoDB reactive external system api"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ dependencies {
implementation(project(":utils:mongodb-util"))
implementation(project(":utils:mongodb-reactive-util"))
implementation(project(":legacy:mongock-importer-mongodb-reactive"))
api(project(":utils:flamingock-reactive-util"))
implementation(project(":utils:flamingock-reactive-util"))
api(project(":core:target-systems:flamingock-mongodb-reactive-externalsystem-api"))

compileOnly("org.mongodb:mongodb-driver-reactivestreams:4.0.0")
compileOnlyApi("org.mongodb:mongodb-driver-reactivestreams:4.0.0")

testImplementation("org.testcontainers:testcontainers-mongodb:2.0.2")
testImplementation("org.testcontainers:testcontainers-junit-jupiter:2.0.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ val versions = mapOf(

dependencies {
api(project(":core:flamingock-core"))
api(project(":utils:flamingock-reactive-util"))
implementation(project(":utils:flamingock-reactive-util"))
api(project(":core:target-systems:flamingock-mongodb-reactive-externalsystem-api"))
implementation(project(":legacy:mongock-importer-mongodb-reactive"))

compileOnly("org.mongodb:mongodb-driver-reactivestreams:${versions["mongodb"]}")
compileOnly("org.springframework.data:spring-data-mongodb:${versions["spring-data"]}")
compileOnlyApi("org.mongodb:mongodb-driver-reactivestreams:${versions["mongodb"]}")
compileOnlyApi("org.springframework.data:spring-data-mongodb:${versions["spring-data"]}")
compileOnly("io.projectreactor:reactor-core:3.4.34")

testImplementation("org.testcontainers:testcontainers-mongodb:2.0.2")
Expand Down
Loading
Loading