134 lines
4.0 KiB
Plaintext
134 lines
4.0 KiB
Plaintext
plugins {
|
|
`java-library`
|
|
`maven-publish`
|
|
signing
|
|
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
|
|
id("org.jetbrains.dokka") version "1.9.10"
|
|
}
|
|
|
|
group = "dev.hcfs"
|
|
version = "2.0.0"
|
|
description = "Java SDK for the Context-Aware Hierarchical Context File System"
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// HTTP client
|
|
api("com.squareup.okhttp3:okhttp:4.12.0")
|
|
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
|
|
|
// JSON serialization
|
|
api("com.fasterxml.jackson.core:jackson-databind:2.16.0")
|
|
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0")
|
|
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.16.0")
|
|
|
|
// Reactive streams
|
|
api("io.reactivex.rxjava3:rxjava:3.1.8")
|
|
implementation("com.squareup.retrofit2:adapter-rxjava3:2.10.0")
|
|
|
|
// WebSocket support
|
|
implementation("org.java-websocket:Java-WebSocket:1.5.4")
|
|
|
|
// Validation
|
|
implementation("javax.validation:validation-api:2.0.1.Final")
|
|
implementation("org.hibernate.validator:hibernate-validator:8.0.1.Final")
|
|
|
|
// Caching
|
|
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
|
|
|
|
// Retry logic
|
|
implementation("dev.failsafe:failsafe:3.3.2")
|
|
|
|
// Logging
|
|
implementation("org.slf4j:slf4j-api:2.0.9")
|
|
|
|
// Metrics
|
|
compileOnly("io.micrometer:micrometer-core:1.12.0")
|
|
|
|
// Testing
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
|
|
testImplementation("org.mockito:mockito-core:5.7.0")
|
|
testImplementation("org.mockito:mockito-junit-jupiter:5.7.0")
|
|
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
|
|
testImplementation("org.assertj:assertj-core:3.24.2")
|
|
testImplementation("ch.qos.logback:logback-classic:1.4.14")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events("passed", "skipped", "failed")
|
|
}
|
|
}
|
|
|
|
tasks.compileJava {
|
|
options.compilerArgs.addAll(listOf("-parameters", "-Xlint:unchecked", "-Xlint:deprecation"))
|
|
}
|
|
|
|
tasks.javadoc {
|
|
if (JavaVersion.current().isJava9Compatible) {
|
|
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
|
|
}
|
|
options.encoding = "UTF-8"
|
|
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
from(components["java"])
|
|
|
|
pom {
|
|
name.set("HCFS Java SDK")
|
|
description.set("Java SDK for the Context-Aware Hierarchical Context File System")
|
|
url.set("https://github.com/hcfs/hcfs")
|
|
|
|
licenses {
|
|
license {
|
|
name.set("MIT License")
|
|
url.set("https://opensource.org/licenses/MIT")
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id.set("hcfs-team")
|
|
name.set("HCFS Development Team")
|
|
email.set("dev@hcfs.dev")
|
|
}
|
|
}
|
|
|
|
scm {
|
|
connection.set("scm:git:git://github.com/hcfs/hcfs.git")
|
|
developerConnection.set("scm:git:ssh://github.com/hcfs/hcfs.git")
|
|
url.set("https://github.com/hcfs/hcfs")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
val signingKey: String? by project
|
|
val signingPassword: String? by project
|
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
|
sign(publishing.publications["maven"])
|
|
}
|
|
|
|
nexusPublishing {
|
|
repositories {
|
|
sonatype {
|
|
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
|
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
|
}
|
|
}
|
|
} |