102 lines
3.0 KiB
Groovy
102 lines
3.0 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
group = 'dev.evercatch'
|
|
version = '1.0.0'
|
|
description = 'Official Java SDK for Evercatch webhook infrastructure platform'
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
ext {
|
|
okhttpVersion = '4.12.0'
|
|
gsonVersion = '2.10.1'
|
|
junitVersion = '5.10.1'
|
|
mockitoVersion = '5.8.0'
|
|
springBootVersion = '3.2.1'
|
|
}
|
|
|
|
dependencies {
|
|
// HTTP Client
|
|
api "com.squareup.okhttp3:okhttp:${okhttpVersion}"
|
|
|
|
// JSON Processing
|
|
api "com.google.code.gson:gson:${gsonVersion}"
|
|
|
|
// Spring Boot AutoConfiguration (optional — consumers pull it in themselves)
|
|
compileOnly "org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}"
|
|
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
|
|
|
|
// Testing
|
|
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
|
|
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
|
|
testImplementation "com.squareup.okhttp3:mockwebserver:${okhttpVersion}"
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
|
|
pom {
|
|
name = 'Evercatch Java SDK'
|
|
description = project.description
|
|
url = 'https://evercatch.dev'
|
|
|
|
licenses {
|
|
license {
|
|
name = 'MIT License'
|
|
url = 'https://opensource.org/licenses/MIT'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
name = 'Evercatch Team'
|
|
email = 'support@evercatch.dev'
|
|
organization = 'Evercatch'
|
|
organizationUrl = 'https://evercatch.dev'
|
|
}
|
|
}
|
|
|
|
scm {
|
|
connection = 'scm:git:git://git.psmattas.com/evercatch/evercatch-java.git'
|
|
developerConnection = 'scm:git:ssh://git.psmattas.com/evercatch/evercatch-java.git'
|
|
url = 'https://git.psmattas.com/evercatch/evercatch-java'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
// Maven Central via Sonatype Central Publisher Portal
|
|
// Publishing is handled by the central-publishing-maven-plugin in pom.xml.
|
|
// Use `mvn deploy -P release` to publish.
|
|
}
|
|
}
|
|
|
|
signing {
|
|
def signingKey = findProperty('signingKey') ?: System.getenv('GPG_SIGNING_KEY')
|
|
def signingPassword = findProperty('signingPassword') ?: System.getenv('GPG_SIGNING_PASSWORD')
|
|
if (signingKey) {
|
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
|
}
|
|
sign publishing.publications.mavenJava
|
|
}
|