assertj-json/build.gradle

103 lines
3.0 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'com.devsoap'
version = findProperty('BUILD_VERSION') ?: 'latest'
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
api 'jakarta.json.bind:jakarta.json.bind-api:3.0.1'
api 'jakarta.json:jakarta.json-api:2.1.3'
implementation 'org.assertj:assertj-core:3.26.3'
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.eclipse:yasson:3.0.4'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
publishing {
repositories {
maven {
name = "sonatype"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = findProperty('SONATYPE_USER') as String
password = findProperty('SONATYPE_PASSWORD') as String
}
}
}
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)
}