@@ -17,6 +17,7 @@ plugins {
1717 `java- library`
1818 `maven- publish`
1919 signing
20+ alias(libs.plugins.publish)
2021 alias(libs.plugins.kotlin.jvm)
2122 alias(libs.plugins.kotlinx.serialization)
2223 alias(libs.plugins.jlleitschuh.ktlint)
@@ -27,8 +28,6 @@ group = "dev.gitlive"
2728version = project.property(" version" ) as String
2829
2930java {
30- withSourcesJar()
31- withJavadocJar()
3231 sourceCompatibility = JavaVersion .VERSION_17
3332}
3433
@@ -91,55 +90,43 @@ val cleanLibs by tasks.creating(Delete::class) {
9190 delete(" $${layout.buildDirectory.asFile.get().path} /libs" )
9291}
9392
94- publishing {
93+ mavenPublishing {
94+ publishToMavenCentral(automaticRelease = true )
95+ signAllPublications()
9596
96- repositories {
97- maven {
98- url = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2" )
99- credentials {
100- username = project.findProperty(" sonatypeUsername" ) as String? ? : System .getenv(" sonatypeUsername" )
101- password = project.findProperty(" sonatypePassword" ) as String? ? : System .getenv(" sonatypePassword" )
97+ coordinates(" dev.gitlive" , " firebase-java-sdk" , project.version.toString())
98+
99+ pom {
100+ name.set(" Firebase Java SDK" )
101+ description.set(" A pure Java port of the Firebase Android SDK for client-side Java environments." )
102+ url.set(" https://github.com/GitLiveApp/firebase-java-sdk" )
103+ inceptionYear.set(" 2023" )
104+
105+ scm {
106+ url.set(" https://github.com/GitLiveApp/firebase-java-sdk" )
107+ connection.set(" scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git" )
108+ developerConnection.set(" scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git" )
109+ tag.set(" HEAD" )
110+ }
111+
112+ issueManagement {
113+ system.set(" GitHub Issues" )
114+ url.set(" https://github.com/GitLiveApp/firebase-java-sdk/issues" )
115+ }
116+
117+ developers {
118+ developer {
119+ name.set(" Nicholas Bransby-Williams" )
120+ email.set(" nbransby@gmail.com" )
102121 }
103122 }
104- }
105123
106- publications {
107- create<MavenPublication >(" library" ) {
108- from(components[" java" ])
109-
110- pom {
111- name.set(" firebase-java-sdk" )
112- description.set(" The Firebase Java SDK is a pure java port of the Firebase Android SDK to run in clientside java environments such as the desktop." )
113- url.set(" https://github.com/GitLiveApp/firebase-java-sdk" )
114- inceptionYear.set(" 2023" )
115-
116- scm {
117- url.set(" https://github.com/GitLiveApp/firebase-java-sdk" )
118- connection.set(" scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git" )
119- developerConnection.set(" scm:git:https://github.com/GitLiveApp/firebase-java-sdk.git" )
120- tag.set(" HEAD" )
121- }
122-
123- issueManagement {
124- system.set(" GitHub Issues" )
125- url.set(" https://github.com/GitLiveApp/firebase-java-sdk/issues" )
126- }
127-
128- developers {
129- developer {
130- name.set(" Nicholas Bransby-Williams" )
131- email.set(" nbransby@gmail.com" )
132- }
133- }
134-
135- licenses {
136- license {
137- name.set(" The Apache Software License, Version 2.0" )
138- url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
139- distribution.set(" repo" )
140- comments.set(" A business-friendly OSS license" )
141- }
142- }
124+ licenses {
125+ license {
126+ name.set(" The Apache Software License, Version 2.0" )
127+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
128+ distribution.set(" repo" )
129+ comments.set(" A business-friendly OSS license" )
143130 }
144131 }
145132 }
0 commit comments