1

Add Maven Central deployment
Some checks failed
Build & Release / release-library (push) Has been cancelled

This commit is contained in:
2024-11-04 13:17:40 +01:00
parent a2593877bd
commit 434390b0a4
2 changed files with 108 additions and 1 deletions

View File

@@ -1,9 +1,18 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'com.devsoap'
version = '1.0-SNAPSHOT'
version = findProperty('BUILD_VERSION') ?: 'latest'
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
@@ -26,4 +35,59 @@ test {
testLogging {
events "passed", "skipped", "failed"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'assertj-json'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'AssertJ JSON'
description = 'JSON assertions for AssertJ'
url = 'https://code.devsoap.com/john/assertj-json'
licenses {
license {
name = 'Creative Commons Attribution-NoDerivatives 4.0 International'
url = 'https://creativecommons.org/licenses/by-nd/4.0'
}
}
developers {
developer {
id = 'john'
name = 'John Ahlroos'
email = 'john@ahlroos.me'
organization = "Devsoap"
organizationUrl = "https://devsoap.com"
timezone = "Europe/Madrid"
}
}
scm {
connection = 'scm:git:ssh://git@code.devsoap.com:john/assertj-json.git'
developerConnection = 'scm:git:ssh://git@code.devsoap.com:john/assertj-json.git'
url = 'https://code.devsoap.com/john/assertj-json'
}
}
}
}
}
signing {
required { gradle.taskGraph.hasTask("publish") }
def signingKey = findProperty("DEVSOAP_GPG_KEY") as String
def signingPassword = findProperty("DEVSOAP_GPG_PASSWORD") as String
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
javadoc {
options.addBooleanOption('html5', true)
}