Skip to content

Commit 5c5589e

Browse files
committed
Convert from Groovy to Kotlin
1 parent 4c94f5e commit 5c5589e

File tree

3 files changed

+105
-111
lines changed

3 files changed

+105
-111
lines changed

build.gradle

Lines changed: 0 additions & 110 deletions
This file was deleted.

build.gradle.kts

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
plugins {
2+
id("java-library")
3+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
4+
id("maven-publish")
5+
id("signing")
6+
}
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
api(libs.org.slf4j.slf4j.api)
14+
testImplementation(libs.org.junit.jupiter.junit.jupiter.api)
15+
testImplementation(libs.org.junit.jupiter.junit.jupiter.engine)
16+
testImplementation(libs.org.junit.jupiter.junit.jupiter)
17+
testImplementation(libs.org.slf4j.slf4j.simple)
18+
}
19+
20+
group = "org.purejava"
21+
version = "1.4.3-SNAPSHOT"
22+
description = "Java bindings for libappindicator-gtk3 in 100% pure Java"
23+
24+
java {
25+
sourceCompatibility = JavaVersion.VERSION_22
26+
withSourcesJar()
27+
withJavadocJar()
28+
}
29+
30+
val sonatypeUsername: String = System.getenv("SONATYPE_USERNAME") ?: ""
31+
val sonatypePassword: String = System.getenv("SONATYPE_PASSWORD") ?: ""
32+
33+
tasks.test {
34+
useJUnitPlatform()
35+
filter {
36+
includeTestsMatching("AppIndicatorTest")
37+
}
38+
}
39+
40+
publishing {
41+
publications {
42+
create<MavenPublication>("mavenJava") {
43+
from(components["java"])
44+
pom {
45+
name.set("libappindicator-gtk3-java-full")
46+
description.set("Java bindings for libappindicator-gtk3 in 100% pure Java")
47+
url.set("https://github.com/purejava/appindicator-gtk3-java")
48+
licenses {
49+
license {
50+
name.set("MIT License")
51+
url.set("https://opensource.org/licenses/MIT")
52+
}
53+
}
54+
developers {
55+
developer {
56+
id.set("purejava")
57+
name.set("Ralph Plawetzki")
58+
email.set("[email protected]")
59+
}
60+
}
61+
scm {
62+
connection.set("scm:git:git://github.com/purejava/appindicator-gtk3-java.git")
63+
developerConnection.set("scm:git:ssh://github.com/purejava/appindicator-gtk3-java.git")
64+
url.set("https://github.com/purejava/appindicator-gtk3-java/tree/develop")
65+
}
66+
issueManagement {
67+
system.set("GitHub Issues")
68+
url.set("https://github.com/purejava/appindicator-gtk3-java/issues")
69+
}
70+
}
71+
}
72+
}
73+
}
74+
75+
nexusPublishing {
76+
repositories {
77+
sonatype {
78+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
79+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
80+
username.set(sonatypeUsername)
81+
password.set(sonatypePassword)
82+
}
83+
}
84+
}
85+
86+
if (!version.toString().endsWith("-SNAPSHOT")) {
87+
signing {
88+
useGpgCmd()
89+
sign(configurations.runtimeElements.get())
90+
sign(publishing.publications["mavenJava"])
91+
}
92+
}
93+
94+
tasks.withType<Javadoc> {
95+
failOnError = false
96+
(options as StandardJavadocDocletOptions).encoding = "UTF-8"
97+
if (JavaVersion.current().isJava9Compatible) {
98+
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
99+
}
100+
}
101+
102+
tasks.withType<JavaCompile> {
103+
options.encoding = "UTF-8"
104+
}

settings.gradle renamed to settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* This project uses @Incubating APIs which are subject to change.
55
*/
66

7-
rootProject.name = 'libappindicator-gtk3-java-full'
7+
rootProject.name = "libappindicator-gtk3-java-full"

0 commit comments

Comments
 (0)