@@ -7,28 +7,11 @@ plugins {
77 `java- library`
88 `maven- publish`
99 jacoco
10+ signing
1011}
1112
12- repositories {
13- jcenter()
14- mavenCentral()
15- maven { url = uri(" https://maven.pkg.jetbrains.space/public/p/compose/dev" ) }
16- }
17-
18- dependencies {
19- testImplementation(kotlin(" test-junit5" ))
20- testImplementation(" org.junit.jupiter:junit-jupiter-api:5.6.0" )
21- testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.6.0" )
22- implementation(compose.desktop.currentOs)
23- }
24-
25- tasks.test {
26- useJUnitPlatform()
27- }
28-
29- tasks.withType<KotlinCompile >() {
30- kotlinOptions.jvmTarget = " 11"
31- }
13+ group = " io.github.app-outlet"
14+ version = " 1.0.1"
3215
3316java {
3417 withJavadocJar()
@@ -38,12 +21,82 @@ java {
3821publishing {
3922 publications {
4023 create<MavenPublication >(" maven" ) {
41- groupId = " io.github.app-outlet"
4224 artifactId = " karavel"
43- version = " 1.0.1"
44-
4525 from(components[" java" ])
26+
27+ pom {
28+ name.set(" Karavel" )
29+ description.set(" Lightweight navigation library for Compose for Desktop" )
30+ url.set(" https://github.com/app-outlet/karavel" )
31+ licenses {
32+ license {
33+ name.set(" MIT License" )
34+ url.set(" https://github.com/app-outlet/karavel/blob/main/LICENSE" )
35+ }
36+ }
37+ developers {
38+ developer {
39+ id.set(" messiaslima" )
40+ name.set(" Messias Junior" )
41+ 42+ }
43+ }
44+ scm {
45+ connection.set(" scm:git:git://github.com/app-outlet/karavel.git" )
46+ developerConnection.set(" scm:git:ssh://github.com/app-outlet/karavel.git" )
47+ url.set(" https://github.com/app-outlet/karavel" )
48+ }
49+ }
50+ }
51+ }
52+ repositories {
53+ maven {
54+ val releasesRepoUrl = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
55+ val snapshotsRepoUrl = uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" )
56+
57+ name = " OSSRH"
58+ url = if (version.toString().endsWith(" SNAPSHOT" )) snapshotsRepoUrl else releasesRepoUrl
59+
60+ credentials {
61+ username = System .getenv(" OSSRH_USERNAME" )
62+ password = System .getenv(" OSSRH_PASSWORD" )
63+ }
4664 }
4765 }
4866}
4967
68+ signing {
69+ useInMemoryPgpKeys(
70+ System .getenv(" GPG_KEY_ID" ),
71+ System .getenv(" GPG_SECRET_KEY" ),
72+ System .getenv(" GPG_PASSWORD" )
73+ )
74+ sign(publishing.publications[" maven" ])
75+ }
76+
77+ tasks.javadoc {
78+ if (JavaVersion .current().isJava9Compatible) {
79+ (options as StandardJavadocDocletOptions ).addBooleanOption(" html5" , true )
80+ }
81+ }
82+
83+ tasks.test {
84+ useJUnitPlatform()
85+ }
86+
87+ tasks.withType<KotlinCompile > {
88+ kotlinOptions.jvmTarget = " 11"
89+ }
90+
91+ repositories {
92+ jcenter()
93+ mavenCentral()
94+ maven { url = uri(" https://maven.pkg.jetbrains.space/public/p/compose/dev" ) }
95+ }
96+
97+ dependencies {
98+ testImplementation(kotlin(" test-junit5" ))
99+ testImplementation(" org.junit.jupiter:junit-jupiter-api:5.6.0" )
100+ testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.6.0" )
101+ implementation(compose.desktop.currentOs)
102+ }
0 commit comments