Skip to content
Merged
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
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ name: Publish
on:
release:
types: [ prereleased, released ]
workflow_dispatch:

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
63 changes: 1 addition & 62 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 @@ -187,68 +188,6 @@ subprojects {

apply(plugin = "maven-publish")
apply(plugin = "signing")

val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

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)

pom {
name.set("firebase-kotlin-sdk")
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.")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
inceptionYear.set("2019")

scm {
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
tag.set("HEAD")
}

issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
}

developers {
developer {
name.set("Nicholas Bransby-Williams")
email.set("nbransby@gmail.com")
}
}

licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
comments.set("A business-friendly OSS license")
}
}
}
}

}

tasks.withType(AbstractPublishToMaven::class.java).configureEach {
dependsOn(tasks.withType(Sign::class.java))
}
}

tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
Expand Down
52 changes: 47 additions & 5 deletions firebase-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import org.gradle.kotlin.dsl.distribution
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
import kotlin.text.set

/*
* Copyright (c) 2023 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
Expand All @@ -14,6 +16,7 @@ plugins {
kotlin("native.cocoapods")
kotlin("multiplatform")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -160,9 +163,48 @@ 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
)

pom {
name.set("firebase-kotlin-sdk")
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.")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
inceptionYear.set("2019")

scm {
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
tag.set("HEAD")
}

issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
}

developers {
developer {
name.set("Nicholas Bransby-Williams")
email.set("nbransby@gmail.com")
}
}

licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
comments.set("A business-friendly OSS license")
}
}
}
}
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
52 changes: 47 additions & 5 deletions firebase-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import org.gradle.kotlin.dsl.distribution
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
import kotlin.text.set

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
Expand All @@ -14,6 +16,7 @@ plugins {
kotlin("native.cocoapods")
kotlin("multiplatform")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -165,9 +168,48 @@ 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
)

pom {
name.set("firebase-kotlin-sdk")
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.")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
inceptionYear.set("2019")

scm {
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
tag.set("HEAD")
}

issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
}

developers {
developer {
name.set("Nicholas Bransby-Williams")
email.set("nbransby@gmail.com")
}
}

licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
comments.set("A business-friendly OSS license")
}
}
}
}
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
52 changes: 47 additions & 5 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import org.gradle.kotlin.dsl.distribution
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest
import kotlin.text.set

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
Expand All @@ -16,6 +18,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("testOptionsConvention")
alias(libs.plugins.publish)
}

android {
Expand Down Expand Up @@ -186,9 +189,48 @@ 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
)

pom {
name.set("firebase-kotlin-sdk")
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.")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
inceptionYear.set("2019")

scm {
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
tag.set("HEAD")
}

issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
}

developers {
developer {
name.set("Nicholas Bransby-Williams")
email.set("nbransby@gmail.com")
}
}

licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
comments.set("A business-friendly OSS license")
}
}
}
}
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
Loading
Loading