@@ -17,6 +17,7 @@ plugins {
17
17
`java- library`
18
18
`maven- publish`
19
19
signing
20
+ alias(libs.plugins.publish)
20
21
alias(libs.plugins.kotlin.jvm)
21
22
alias(libs.plugins.kotlinx.serialization)
22
23
alias(libs.plugins.jlleitschuh.ktlint)
@@ -27,8 +28,6 @@ group = "dev.gitlive"
27
28
version = project.property(" version" ) as String
28
29
29
30
java {
30
- withSourcesJar()
31
- withJavadocJar()
32
31
sourceCompatibility = JavaVersion .VERSION_17
33
32
}
34
33
@@ -91,55 +90,43 @@ val cleanLibs by tasks.creating(Delete::class) {
91
90
delete(" $${layout.buildDirectory.asFile.get().path} /libs" )
92
91
}
93
92
94
- publishing {
93
+ mavenPublishing {
94
+ publishToMavenCentral(automaticRelease = true )
95
+ signAllPublications()
95
96
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
+
102
121
}
103
122
}
104
- }
105
123
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
-
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" )
143
130
}
144
131
}
145
132
}
@@ -190,13 +177,6 @@ ktlint {
190
177
version.set(libs.versions.ktlint.get())
191
178
}
192
179
193
- signing {
194
- val signingKey: String? by project
195
- val signingPassword: String? by project
196
- useInMemoryPgpKeys(signingKey, signingPassword)
197
- sign(publishing.publications)
198
- }
199
-
200
180
tasks.withType< com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask > {
201
181
202
182
fun isNonStable (version : String ): Boolean {
0 commit comments