1+ import org.jreleaser.model.Active
2+
13plugins {
24 kotlin(" jvm" ) version " 1.9.22"
35 `java- library`
4- id(" com.github.ben-manes.versions" ) version " 0.49.0"
5- signing
66 `maven- publish`
7+ application
8+ id(" org.jreleaser" ) version " 1.10.0"
79}
810
911repositories {
@@ -27,12 +29,16 @@ java {
2729 withJavadocJar()
2830}
2931
32+ val projectVersion = " 3.7.1"
33+ version = projectVersion
34+ group = " com.luissoares"
35+
3036publishing {
3137 publications {
3238 create<MavenPublication >(" maven" ) {
3339 groupId = " com.luissoares"
3440 artifactId = " selenium-testing-library"
35- version = " 3.7.1 "
41+ version = projectVersion
3642 from(components[" kotlin" ])
3743 artifact(tasks[" sourcesJar" ])
3844 artifact(tasks[" javadocJar" ])
@@ -66,19 +72,32 @@ publishing {
6672 }
6773 repositories {
6874 maven {
69- name = " OSSRH"
70- url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
71- credentials {
72- username = System .getenv(" OSSRH_USERNAME" )
73- password = System .getenv(" OSSRH_PASSWORD" )
74- }
75+ url = uri(layout.buildDirectory.dir(" repos/snapshots" ))
7576 }
7677 }
7778}
7879
79- signing {
80- sign(publishing.publications[" maven" ])
80+ jreleaser {
81+ gitRootSearch = true
82+ signing {
83+ active.set(Active .ALWAYS )
84+ armored.set(true )
85+ }
86+ deploy {
87+ maven {
88+ nexus2 {
89+ create(" mavenCentral" ) {
90+ active.set(Active .ALWAYS )
91+ url.set(" https://s01.oss.sonatype.org/service/local" )
92+ closeRepository.set(true )
93+ releaseRepository.set(true )
94+ stagingRepository(" build/repos/snapshots" )
95+ }
96+ }
97+ }
98+ }
8199}
100+
82101tasks.withType<JavaCompile > {
83102 options.encoding = " UTF-8"
84103 sourceCompatibility = " 11"
0 commit comments