Skip to content

Update publishing configuration for Maven Central #746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
types: [ prereleased, released ]

env:
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPEUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PASSPHRASE }}

jobs:
build:
Expand Down
11 changes: 1 addition & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
alias(libs.plugins.kotlinter) apply false
alias(libs.plugins.kotlinx.binarycompatibilityvalidator)
alias(libs.plugins.dokka)
alias(libs.plugins.publish) apply false
id("base")
id("testOptionsConvention")
}
Expand Down Expand Up @@ -194,16 +195,6 @@ subprojects {

configure<PublishingExtension> {

repositories {
maven {
url = uri("https://central.sonatype.com/repository/maven-snapshots")
credentials {
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("sonatypePassword")
}
}
}

publications.all {
this as MavenPublication
artifact(javadocJar)
Expand Down
15 changes: 10 additions & 5 deletions firebase-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("native.cocoapods")
kotlin("multiplatform")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -160,9 +161,13 @@ if (project.property("firebase-analytics.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-analytics",
version = project.property("firebase-analytics.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-analytics",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-analytics.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.1.0",
"@gitlive/firebase-app": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.6.10",
"kotlinx-coroutines-core": "1.6.1-native-mt"
Expand Down
15 changes: 10 additions & 5 deletions firebase-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("native.cocoapods")
kotlin("multiplatform")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -165,9 +166,13 @@ if (project.property("firebase-app.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-app",
version = project.property("firebase-app.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-app",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-app.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "2.1.0",
"@gitlive/firebase-common": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
15 changes: 10 additions & 5 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -186,9 +187,13 @@ fun KotlinNativeTargetWithSimulatorTests.enableKeychainForTests() {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-auth",
version = project.property("firebase-auth.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-auth",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-auth.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.1.0",
"@gitlive/firebase-app": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
15 changes: 10 additions & 5 deletions firebase-common-internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -167,10 +168,14 @@ if (project.property("firebase-common.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-common-internal",
version = project.property("firebase-common-internal.version") as String
)
}

4 changes: 2 additions & 2 deletions firebase-common-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-common-internal",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-common-internal.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk",
"dependencies": {
"@gitlive/firebase-common": "2.1.0",
"@gitlive/firebase-common": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4",
Expand Down
16 changes: 10 additions & 6 deletions firebase-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -165,10 +166,13 @@ if (project.property("firebase-common.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
}
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-common",
version = project.property("firebase-common.version") as String
)
}
2 changes: 1 addition & 1 deletion firebase-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-common",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-common.js",
"scripts": {
Expand Down
15 changes: 10 additions & 5 deletions firebase-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -160,9 +161,13 @@ if (project.property("firebase-config.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-config",
version = project.property("firebase-config.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-config",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-config.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.1.0",
"@gitlive/firebase-app": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
15 changes: 10 additions & 5 deletions firebase-crashlytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -147,9 +148,13 @@ if (project.property("firebase-crashlytics.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-crashlytics",
version = project.property("firebase-crashlytics.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-crashlytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-crashlytics",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-crashlytics.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.1.0",
"@gitlive/firebase-app": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.6.10",
"kotlinx-coroutines-core": "1.6.1-native-mt"
Expand Down
15 changes: 10 additions & 5 deletions firebase-database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -173,9 +174,13 @@ if (project.property("firebase-database.skipJsTests") == "true") {
}
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
signAllPublications()

coordinates(
groupId = "dev.gitlive",
artifactId = "firebase-database",
version = project.property("firebase-database.version") as String
)
}
4 changes: 2 additions & 2 deletions firebase-database/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-database",
"version": "2.1.0",
"version": "2.2.0",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-database.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "2.1.0",
"@gitlive/firebase-app": "2.2.0",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
Loading
Loading