Skip to content

Commit f0217a5

Browse files
authored
Merge branch 'master' into signup_new_user
2 parents 4148b7d + 2f5387f commit f0217a5

File tree

6 files changed

+45
-63
lines changed

6 files changed

+45
-63
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
types: [ prereleased, released ]
99

1010
env:
11-
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
12-
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
13-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
14-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
11+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPEUSERNAME }}
12+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPEPASSWORD }}
13+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
14+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PASSPHRASE }}
1515

1616
jobs:
1717
build:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can add the library via Gradle:
2525

2626
```kotlin
2727
dependencies {
28-
implementation("dev.gitlive:firebase-java-sdk:0.4.8")
28+
implementation("dev.gitlive:firebase-java-sdk:0.5.0")
2929
}
3030
```
3131

@@ -35,7 +35,7 @@ Or Maven:
3535
<dependency>
3636
<groupId>dev.gitlive</groupId>
3737
<artifactId>firebase-java-sdk</artifactId>
38-
<version>0.4.8</version>
38+
<version>0.5.0</version>
3939
</dependency>
4040
```
4141

build.gradle.kts

Lines changed: 34 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
2728
version = project.property("version") as String
2829

2930
java {
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("[email protected]")
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("[email protected]")
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
}
@@ -190,13 +177,6 @@ ktlint {
190177
version.set(libs.versions.ktlint.get())
191178
}
192179

193-
signing {
194-
val signingKey: String? by project
195-
val signingPassword: String? by project
196-
useInMemoryPgpKeys(signingKey, signingPassword)
197-
sign(publishing.publications)
198-
}
199-
200180
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
201181

202182
fun isNonStable(version: String): Boolean {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.4.8
1+
version=0.5.0

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
androidx-lifecycle = "2.9.0-alpha01"
2+
androidx-lifecycle = "2.10.0-alpha01"
33
ben-manes-versions = "0.51.0"
44
google-firebase-bom = "32.7.0"
55
io-grpc = "1.68.0"
@@ -8,6 +8,7 @@ kotlin = "2.0.20"
88
kotlinx-coroutines = "1.9.0"
99
kotlinx-serialization = "1.7.2"
1010
ktlint = "0.47.1"
11+
publish = "0.34.0"
1112

1213
[libraries]
1314
androidx-collection = { module = "androidx.collection:collection", version = "1.4.3" }
@@ -40,3 +41,4 @@ ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "ben-
4041
jlleitschuh-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "jlleitschuh-ktlint" }
4142
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
4243
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
44+
publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)