Skip to content

Commit 879b609

Browse files
committed
prepare publishing
1 parent 14224f1 commit 879b609

File tree

16 files changed

+652
-147
lines changed

16 files changed

+652
-147
lines changed

build.gradle.kts

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ dependencies {
7878

7979
subprojects {
8080

81-
group = "dev.gitlive"
81+
group = "dev.datlag.firebase"
8282

8383
apply(plugin = "com.adarshr.test-logger")
8484
apply(plugin = "org.jmailen.kotlinter")
@@ -156,74 +156,6 @@ subprojects {
156156
"androidInstrumentedTestImplementation"(libs.androidx.test.runner)
157157
}
158158
}
159-
160-
if (skipPublishing) return@subprojects
161-
162-
apply(plugin = "maven-publish")
163-
apply(plugin = "signing")
164-
165-
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
166-
archiveClassifier.set("javadoc")
167-
}
168-
169-
configure<PublishingExtension> {
170-
171-
repositories {
172-
maven {
173-
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
174-
175-
credentials {
176-
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
177-
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("sonatypePassword")
178-
}
179-
}
180-
}
181-
182-
publications.all {
183-
this as MavenPublication
184-
artifact(javadocJar)
185-
186-
pom {
187-
name.set("firebase-kotlin-sdk")
188-
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
189-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
190-
inceptionYear.set("2019")
191-
192-
scm {
193-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
194-
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
195-
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
196-
tag.set("HEAD")
197-
}
198-
199-
issueManagement {
200-
system.set("GitHub Issues")
201-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
202-
}
203-
204-
developers {
205-
developer {
206-
name.set("Nicholas Bransby-Williams")
207-
email.set("[email protected]")
208-
}
209-
}
210-
211-
licenses {
212-
license {
213-
name.set("The Apache Software License, Version 2.0")
214-
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
215-
distribution.set("repo")
216-
comments.set("A business-friendly OSS license")
217-
}
218-
}
219-
}
220-
}
221-
222-
}
223-
224-
tasks.withType(AbstractPublishToMaven::class.java).configureEach {
225-
dependsOn(tasks.withType(Sign::class.java))
226-
}
227159
}
228160

229161
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {

firebase-analytics/build.gradle.kts

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ plugins {
1515
alias(libs.plugins.native.cocoapods)
1616
alias(libs.plugins.multiplatform)
1717
alias(libs.plugins.dokka)
18+
alias(libs.plugins.publish)
19+
`maven-publish`
20+
signing
1821
id("testOptionsConvention")
1922
}
2023

@@ -175,9 +178,47 @@ if (project.property("firebase-analytics.skipJsTests") == "true") {
175178
}
176179
}
177180

178-
signing {
179-
val signingKey: String? by project
180-
val signingPassword: String? by project
181-
useInMemoryPgpKeys(signingKey, signingPassword)
182-
sign(publishing.publications)
181+
mavenPublishing {
182+
publishToMavenCentral(automaticRelease = true)
183+
signAllPublications()
184+
185+
pom {
186+
name.set("firebase-kotlin-sdk")
187+
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
188+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
189+
inceptionYear.set("2019")
190+
191+
scm {
192+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
193+
connection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
194+
developerConnection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
195+
tag.set("HEAD")
196+
}
197+
198+
issueManagement {
199+
system.set("GitHub Issues")
200+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk/issues")
201+
}
202+
203+
developers {
204+
developer {
205+
name.set("Nicholas Bransby-Williams")
206+
email.set("[email protected]")
207+
}
208+
developer {
209+
id.set("DatL4g")
210+
name.set("Jeff Retz")
211+
url.set("https://github.com/DatL4g")
212+
}
213+
}
214+
215+
licenses {
216+
license {
217+
name.set("The Apache Software License, Version 2.0")
218+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
219+
distribution.set("repo")
220+
comments.set("A business-friendly OSS license")
221+
}
222+
}
223+
}
183224
}

firebase-app/build.gradle.kts

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ plugins {
1515
alias(libs.plugins.native.cocoapods)
1616
alias(libs.plugins.multiplatform)
1717
alias(libs.plugins.dokka)
18+
alias(libs.plugins.publish)
19+
`maven-publish`
20+
signing
1821
id("testOptionsConvention")
1922
}
2023

@@ -180,9 +183,47 @@ if (project.property("firebase-app.skipJsTests") == "true") {
180183
}
181184
}
182185

183-
signing {
184-
val signingKey: String? by project
185-
val signingPassword: String? by project
186-
useInMemoryPgpKeys(signingKey, signingPassword)
187-
sign(publishing.publications)
188-
}
186+
mavenPublishing {
187+
publishToMavenCentral(automaticRelease = true)
188+
signAllPublications()
189+
190+
pom {
191+
name.set("firebase-kotlin-sdk")
192+
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
193+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
194+
inceptionYear.set("2019")
195+
196+
scm {
197+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
198+
connection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
199+
developerConnection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
200+
tag.set("HEAD")
201+
}
202+
203+
issueManagement {
204+
system.set("GitHub Issues")
205+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk/issues")
206+
}
207+
208+
developers {
209+
developer {
210+
name.set("Nicholas Bransby-Williams")
211+
email.set("[email protected]")
212+
}
213+
developer {
214+
id.set("DatL4g")
215+
name.set("Jeff Retz")
216+
url.set("https://github.com/DatL4g")
217+
}
218+
}
219+
220+
licenses {
221+
license {
222+
name.set("The Apache Software License, Version 2.0")
223+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
224+
distribution.set("repo")
225+
comments.set("A business-friendly OSS license")
226+
}
227+
}
228+
}
229+
}

firebase-app/src/commonMain/kotlin/dev/gitlive/firebase/firebase.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public data class FirebaseOptions(
8888
/**
8989
* The tracking ID for Google Analytics, e.g. UA-12345678-1, used to configure Google Analytics.
9090
*/
91+
@Deprecated("Unused in underlying Firebase SDK")
9192
val gaTrackingId: String? = null,
9293

9394
/** The Google Cloud Storage bucket name, e.g. abc-xyz-123.storage.firebase.com. */

firebase-auth/build.gradle.kts

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ plugins {
1717
alias(libs.plugins.native.cocoapods)
1818
alias(libs.plugins.multiplatform)
1919
alias(libs.plugins.dokka)
20+
alias(libs.plugins.publish)
21+
`maven-publish`
22+
signing
2023
id("testOptionsConvention")
2124
}
2225

@@ -201,9 +204,47 @@ fun KotlinNativeTargetWithSimulatorTests.enableKeychainForTests() {
201204
}
202205
}
203206

204-
signing {
205-
val signingKey: String? by project
206-
val signingPassword: String? by project
207-
useInMemoryPgpKeys(signingKey, signingPassword)
208-
sign(publishing.publications)
209-
}
207+
mavenPublishing {
208+
publishToMavenCentral(automaticRelease = true)
209+
signAllPublications()
210+
211+
pom {
212+
name.set("firebase-kotlin-sdk")
213+
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
214+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
215+
inceptionYear.set("2019")
216+
217+
scm {
218+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
219+
connection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
220+
developerConnection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
221+
tag.set("HEAD")
222+
}
223+
224+
issueManagement {
225+
system.set("GitHub Issues")
226+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk/issues")
227+
}
228+
229+
developers {
230+
developer {
231+
name.set("Nicholas Bransby-Williams")
232+
email.set("[email protected]")
233+
}
234+
developer {
235+
id.set("DatL4g")
236+
name.set("Jeff Retz")
237+
url.set("https://github.com/DatL4g")
238+
}
239+
}
240+
241+
licenses {
242+
license {
243+
name.set("The Apache Software License, Version 2.0")
244+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
245+
distribution.set("repo")
246+
comments.set("A business-friendly OSS license")
247+
}
248+
}
249+
}
250+
}

firebase-common-internal/build.gradle.kts

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ plugins {
1313
alias(libs.plugins.android.library)
1414
alias(libs.plugins.multiplatform)
1515
alias(libs.plugins.kotlinx.serialization)
16+
alias(libs.plugins.publish)
17+
`maven-publish`
18+
signing
1619
id("testOptionsConvention")
1720
}
1821

@@ -156,10 +159,47 @@ if (project.property("firebase-common.skipJsTests") == "true") {
156159
}
157160
}
158161

159-
signing {
160-
val signingKey: String? by project
161-
val signingPassword: String? by project
162-
useInMemoryPgpKeys(signingKey, signingPassword)
163-
sign(publishing.publications)
164-
}
162+
mavenPublishing {
163+
publishToMavenCentral(automaticRelease = true)
164+
signAllPublications()
165+
166+
pom {
167+
name.set("firebase-kotlin-sdk")
168+
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
169+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
170+
inceptionYear.set("2019")
171+
172+
scm {
173+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk")
174+
connection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
175+
developerConnection.set("scm:git:https://github.com/DatL4g/firebase-kotlin-sdk.git")
176+
tag.set("HEAD")
177+
}
178+
179+
issueManagement {
180+
system.set("GitHub Issues")
181+
url.set("https://github.com/DatL4g/firebase-kotlin-sdk/issues")
182+
}
183+
184+
developers {
185+
developer {
186+
name.set("Nicholas Bransby-Williams")
187+
email.set("[email protected]")
188+
}
189+
developer {
190+
id.set("DatL4g")
191+
name.set("Jeff Retz")
192+
url.set("https://github.com/DatL4g")
193+
}
194+
}
165195

196+
licenses {
197+
license {
198+
name.set("The Apache Software License, Version 2.0")
199+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
200+
distribution.set("repo")
201+
comments.set("A business-friendly OSS license")
202+
}
203+
}
204+
}
205+
}

0 commit comments

Comments
 (0)