Skip to content

Commit

Permalink
Configure publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rieske committed Nov 1, 2023
1 parent c12c635 commit 69ef001
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 8 deletions.
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true
group=io.github.rieske.postgres-cdc
version=0.0.1
3 changes: 3 additions & 0 deletions gradle/build-logic/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("groovy-gradle-plugin")
}
1 change: 1 addition & 0 deletions gradle/build-logic/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "build-logic"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
plugins {
id("java-library")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}

testing {
suites {
test {
useJUnitJupiter()
}
}
}

tasks.withType(Javadoc).configureEach {
// TODO: figure the public API and document it!
//options.addStringOption("Xwerror", "-quiet")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
plugins {
id("io.github.rieske.postgres-cdc.java-library")
id("maven-publish")
id("signing")
}

publishing {
publications {
maven(MavenPublication) {
from(components.java)
project.afterEvaluate {
pom {
name = "${group}:${project.name}"
description = "${project.description}"
url = "https://github.com/rieske/postgres-cdc"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "rieske"
name = "Vaidotas Valuckas"
email = "vaidotas.valuckas@gmail.com"
}
}
scm {
connection = "scm:git:git@github.com/rieske/postgres-cdc.git"
developerConnection = "scm:git:ssh@github.com:rieske/postgres-cdc.git"
url = "https://github.com/rieske/postgres-cdc"
}
}
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2")
credentials(PasswordCredentials)
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications.maven)
}

7 changes: 1 addition & 6 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
plugins {
id("java-library")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
id("io.github.rieske.postgres-cdc.published-library")
}

dependencies {
Expand All @@ -18,7 +14,6 @@ dependencies {
testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation("org.testcontainers:postgresql:1.19.1")
implementation("org.assertj:assertj-core:3.24.2")
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pluginManagement {
includeBuild("gradle/build-logic")
}
dependencyResolutionManagement {
repositories {
mavenCentral()
Expand Down

0 comments on commit 69ef001

Please sign in to comment.