Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
distribution: 'adopt'
java-version: 17
- uses: gradle/gradle-build-action@v2
- run: brew install libpq
- name: Build with Gradle
run: ./gradlew assemble
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ publishing {
credentials(PasswordCredentials::class)
}
}
publications.all {
publications.configureEach {
this as MavenPublication
artifact(emptyJar) {
classifier = "javadoc"
Expand Down
16 changes: 8 additions & 8 deletions postgres-native-sqldelight-dialect/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ dependencies {
kotlin {
jvmToolchain(11)

target.compilations.all {
target.compilations.configureEach {
kotlinOptions.allWarningsAsErrors = true
}
explicitApi()
sourceSets {
all {
configureEach {
languageSettings.progressiveMode = true
}
}
Expand All @@ -62,7 +62,7 @@ tasks.shadowJar {
include("META-INF/services/*")
}

tasks.jar.configure {
tasks.jar {
// Prevents shadowJar (with classifier = '') and this task from writing to the same path.
enabled = false
}
Expand All @@ -72,10 +72,10 @@ configurations {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.jar.get()) }
it.outgoing.artifact(tasks.shadowJar)
}
apiElements.configure {
apiElements {
conf(this)
}
runtimeElements.configure { conf(this) }
runtimeElements { conf(this) }
}

artifacts {
Expand All @@ -84,14 +84,14 @@ artifacts {
}

// Disable Gradle module.json as it lists wrong dependencies
tasks.withType<GenerateModuleMetadata> {
tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}

// Remove dependencies from POM: uber jar has no dependencies
publishing {
publications {
withType<MavenPublication> {
withType<MavenPublication>().configureEach {
if (name == "pluginMaven") {
pom.withXml {
val pomNode = asNode()
Expand All @@ -106,7 +106,7 @@ publishing {
classifier = "sources"
}
}
create("shadow", MavenPublication::class.java) {
register<MavenPublication>("shadow") {
project.shadow.component(this)
}
}
Expand Down
6 changes: 3 additions & 3 deletions postgres-native-sqldelight-driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ plugins {
kotlin {
explicitApi()
sourceSets {
all {
configureEach {
languageSettings.progressiveMode = true
}
}

fun KotlinNativeTarget.config() {
compilations.getByName("main") {
compilations.named("main") {
cinterops {
val libpq by creating {
register("libpq") {
defFile(project.file("src/nativeInterop/cinterop/libpq.def"))
}
}
Expand Down