|
| 1 | +plugins { |
| 2 | + id("idea") |
| 3 | + id("eclipse") |
| 4 | + id("java") |
| 5 | + id("maven-publish") |
| 6 | + id("signing") |
| 7 | + id("org.jreleaser") version "1.15.0" |
| 8 | +} |
| 9 | + |
| 10 | +repositories { |
| 11 | + mavenCentral() |
| 12 | +} |
| 13 | + |
| 14 | +group = "io.github.pod4dev" |
| 15 | +version = "5.3.2" |
| 16 | + |
| 17 | +dependencies { |
| 18 | + implementation("org.hibernate.validator:hibernate-validator:8.0.0.Final") |
| 19 | + implementation("com.google.code.findbugs:jsr305:3.0.2") |
| 20 | + implementation("com.squareup.okhttp3:okhttp:4.12.0") |
| 21 | + implementation("com.squareup.okhttp3:logging-interceptor:4.12.0") |
| 22 | + implementation("com.google.code.gson:gson:2.10") |
| 23 | + implementation("io.gsonfire:gson-fire:1.9.0") |
| 24 | + implementation("javax.ws.rs:jsr311-api:1.1") |
| 25 | + implementation("javax.ws.rs:javax.ws.rs-api:2.1.1") |
| 26 | + implementation("org.apache.commons:commons-lang3:3.15.0") |
| 27 | + implementation("org.openapitools:jackson-databind-nullable:0.2.6") |
| 28 | + implementation("io.swagger:swagger-annotations:1.6.15") |
| 29 | + implementation("javax.validation:validation-api:2.0.1.Final") |
| 30 | + implementation("javax.annotation:javax.annotation-api:1.3.2") |
| 31 | + testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.3") |
| 32 | + testImplementation("org.mockito:mockito-core:5.11.0") |
| 33 | + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2") |
| 34 | +} |
| 35 | + |
| 36 | +tasks.withType<Javadoc> { |
| 37 | + (options as StandardJavadocDocletOptions) |
| 38 | + .tags("http.response.details:a:Http Response Details") |
| 39 | + .addStringOption("Xdoclint:none", "-quiet") |
| 40 | +} |
| 41 | + |
| 42 | +java { |
| 43 | + withJavadocJar() |
| 44 | + withSourcesJar() |
| 45 | +} |
| 46 | + |
| 47 | +tasks.test { |
| 48 | + useJUnitPlatform() |
| 49 | +} |
| 50 | + |
| 51 | +publishing { |
| 52 | + publications { |
| 53 | + create<MavenPublication>("mavenJava") { |
| 54 | + groupId = project.group.toString() |
| 55 | + artifactId = project.name |
| 56 | + version = project.version.toString() |
| 57 | + |
| 58 | + from(components["java"]) |
| 59 | + pom { |
| 60 | + packaging = "jar" |
| 61 | + name.set("libpod-java") |
| 62 | + url.set("https://github.com/pod4dev/libpod-java") |
| 63 | + description.set("Libpod API for Java") |
| 64 | + |
| 65 | + scm { |
| 66 | + url.set("https://github.com/pod4dev/libpod-java") |
| 67 | + connection.set("scm:git:git://github.com/pod4dev/libpod-java.git") |
| 68 | + developerConnection.set("scm:git:git://github.com/pod4dev/libpod-java.git") |
| 69 | + } |
| 70 | + |
| 71 | + inceptionYear = "2025" |
| 72 | + |
| 73 | + developers { |
| 74 | + developer { |
| 75 | + name.set("Pod4Dev Team") |
| 76 | + } |
| 77 | + } |
| 78 | + |
| 79 | + licenses { |
| 80 | + license { |
| 81 | + name.set("MIT") |
| 82 | + url.set("https://opensource.org/license/mit") |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + } |
| 88 | + repositories { |
| 89 | + maven { |
| 90 | + setUrl(layout.buildDirectory.dir("staging-deploy")) |
| 91 | + } |
| 92 | + } |
| 93 | +} |
| 94 | + |
| 95 | +jreleaser { |
| 96 | + project { |
| 97 | + inceptionYear = "2025" |
| 98 | + author("Pod4Dev Team") |
| 99 | + description = "Libpod API for Java" |
| 100 | + license = "MIT" |
| 101 | + } |
| 102 | + gitRootSearch = true |
| 103 | + release { |
| 104 | + github { |
| 105 | + // https://github.com/jreleaser/jreleaser/discussions/367 |
| 106 | + token = "dummy" |
| 107 | + } |
| 108 | + } |
| 109 | + signing { |
| 110 | + setActive("ALWAYS") |
| 111 | + armored = true |
| 112 | + passphrase = properties["signing.gnupg.passphrase"].toString() |
| 113 | + setMode("COMMAND") |
| 114 | + command { |
| 115 | + executable = properties["signing.gnupg.executable"].toString() |
| 116 | + keyName = properties["signing.gnupg.keyName"].toString() |
| 117 | + } |
| 118 | + } |
| 119 | + deploy { |
| 120 | + maven { |
| 121 | + mavenCentral { |
| 122 | + create("sonatype") { |
| 123 | + setActive("ALWAYS") |
| 124 | + url = "https://central.sonatype.com/api/v1/publisher" |
| 125 | + stagingRepository("build/staging-deploy") |
| 126 | + username.set(properties["ossrhUsername"].toString()) |
| 127 | + password.set(properties["ossrhPassword"].toString()) |
| 128 | + } |
| 129 | + } |
| 130 | + } |
| 131 | + } |
| 132 | +} |
0 commit comments