Skip to content

Commit d25eff2

Browse files
committed
Merge branch 'master' into cramsan/storage_jvm
2 parents 485cf30 + 7fa762b commit d25eff2

28 files changed

+578
-335
lines changed

.firebaserc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gradle"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/build-pr.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ jobs:
66
name: Build and Test
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: actions/setup-java@v3
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-java@v4
1111
with:
1212
distribution: 'zulu'
1313
java-version: 17
14-
- name: Build
15-
uses: eskatos/gradle-command-action@v1
14+
- name: Set up Node.js 20
15+
uses: actions/setup-node@v4
1616
with:
17-
arguments: build
17+
node-version: 20
18+
- name: Install Firebase CLI
19+
run: npm install -g firebase-tools
20+
- name: Build
21+
run: firebase emulators:exec --project my-firebase-project --import=src/test/resources/firebase_data './gradlew build'

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up JDK
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
2424
distribution: 'zulu'
2525
java-version: '17'
2626
- name: CopyAars
27-
uses: eskatos/gradle-command-action@v1
27+
uses: eskatos/gradle-command-action@v3
2828
with:
2929
arguments: copyAars
3030
- name: Grant execute permission for gradlew

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea/
22
.gradle/
3+
.kotlin/
34
build/
45
*.iml
56
/local.properties

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1 align="left">Firebase Java SDK <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/gitliveapp/firebase-java-sdk?style=flat-square"> <a href="https://git.live"><img src="https://img.shields.io/badge/collaborate-on%20gitlive-blueviolet?style=flat-square"></a></h1>
1+
<h1 align="left">Firebase Java SDK <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/gitliveapp/firebase-java-sdk?style=flat-square"> <a href="https://git.live"><img src="https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fteamhub-dev.web.app%2Fbadge%3Forg%3DGitLiveApp%26repo%3Dfirebase-java-sdk"></a></h1>
22
<img align="left" width="75px" src="https://avatars2.githubusercontent.com/u/42865805?s=200&v=4">
33
<b>Built and maintained with 🧡 by <a href="https://git.live">GitLive</a></b><br/>
44
<i>Development teams merge faster with GitLive</i><br/>
@@ -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.3")
28+
implementation("dev.gitlive:firebase-java-sdk:0.4.8")
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.3</version>
38+
<version>0.4.8</version>
3939
</dependency>
4040
```
4141

@@ -104,16 +104,18 @@ val app = Firebase.initialize(new Application(), options)
104104

105105
The following libraries are available for the various Firebase products.
106106

107-
| Service or Product | Port of Android version |
108-
|---------------------------------------------------------------------------------|:------------------------|
109-
| [Authentication](https://firebase.google.com/docs/auth) | N/A[^1] |
110-
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | `24.10.0` |
111-
| [Realtime Database](https://firebase.google.com/docs/database) | `20.3.0` |
112-
| [Cloud Functions](https://firebase.google.com/docs/functions) | `20.4.0` |
113-
| [Remote Config](https://firebase.google.com/docs/remote-config) | `21.6.0` |
114-
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | `17.2.0` |
107+
| Service or Product | Port of Android version |
108+
|---------------------------------------------------------------------------------------------------|:------------------------|
109+
| [Firebase Android BoM](https://maven.google.com/web/index.html?#com.google.firebase:firebase-bom) | `32.7.0` |
110+
| [Authentication](https://firebase.google.com/docs/auth) | N/A[^1] |
111+
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | `24.10.0` |
112+
| [Realtime Database](https://firebase.google.com/docs/database) | `20.3.0` |
113+
| [Cloud Functions](https://firebase.google.com/docs/functions) | `20.4.0` |
114+
| ~[Remote Config](https://firebase.google.com/docs/remote-config)~ | `21.6.0`[^2] |
115+
| ~[Installations](https://firebase.google.com/docs/projects/manage-installations)~ | `17.2.0`[^2] |
115116

116117
[^1]: Google has not open-sourced the Firebase Auth implementation for Android so a basic implementation using the Rest API is provided.
118+
[^2]: Although the libraries are inlcuded they are currently not funtional
117119

118120
Is the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-java-sdk/issues/new?labels=API+coverage&template=increase-api-coverage.md&title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-java-sdk/fork).
119121

build.gradle.kts

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import java.util.Locale
12

23
buildscript {
34
repositories {
@@ -16,10 +17,10 @@ plugins {
1617
`java-library`
1718
`maven-publish`
1819
signing
19-
id("org.jetbrains.kotlin.jvm") version "1.9.22"
20-
kotlin("plugin.serialization") version "1.9.22"
21-
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
22-
id("com.github.ben-manes.versions") version "0.42.0"
20+
alias(libs.plugins.kotlin.jvm)
21+
alias(libs.plugins.kotlinx.serialization)
22+
alias(libs.plugins.jlleitschuh.ktlint)
23+
alias(libs.plugins.ben.manes.versions)
2324
}
2425

2526
group = "dev.gitlive"
@@ -87,7 +88,7 @@ val jar by tasks.getting(Jar::class) {
8788
val sourceSets = project.the<SourceSetContainer>()
8889

8990
val cleanLibs by tasks.creating(Delete::class) {
90-
delete("$buildDir/libs")
91+
delete("$${layout.buildDirectory.asFile.get().path}/libs")
9192
}
9293

9394
publishing {
@@ -202,39 +203,40 @@ val includeList = listOf(
202203
"slidingpanelayout-*.jar",
203204
"swiperefreshlayout-*.jar",
204205
"versionedparcelable-*.jar",
205-
"viewpager-*.jar",
206+
"viewpager-*.jar"
206207
)
207208

208209
dependencies {
209-
compileOnly("org.robolectric:android-all:12.1-robolectric-8229987")
210-
testImplementation("junit:junit:4.13.2")
211-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.7.3")
212-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.7.3")
213-
testImplementation("org.mockito:mockito-core:5.12.0")
210+
compileOnly(libs.robolectric.android.all)
211+
testImplementation(libs.junit)
212+
testImplementation(libs.kotlinx.coroutines.play.services)
213+
testImplementation(libs.kotlinx.coroutines.swing)
214+
testImplementation(libs.kotlinx.coroutines.test)
215+
testImplementation(libs.mockito.core)
214216
// firebase aars
215-
aar("com.google.firebase:firebase-firestore:24.10.0")
216-
aar("com.google.firebase:firebase-functions:20.4.0")
217-
aar("com.google.firebase:firebase-database:20.3.0")
218-
aar("com.google.firebase:firebase-config:21.6.0")
219-
aar("com.google.firebase:firebase-installations:17.2.0")
220-
aar("com.google.firebase:firebase-storage:21.0.0")
217+
aar(platform(libs.google.firebase.bom))
218+
aar(libs.google.firebase.firestore)
219+
aar(libs.google.firebase.functions)
220+
aar(libs.google.firebase.database)
221+
aar(libs.google.firebase.config)
222+
aar(libs.google.firebase.installations)
223+
aar(libs.google.firebase.storage)
221224
// extracted aar dependencies
222225
api(fileTree(mapOf("dir" to "build/jar", "include" to includeList)))
223226
// polyfill dependencies
224-
implementation("org.jetbrains.kotlin:kotlin-stdlib")
225-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
226-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.0")
227-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
228-
implementation("org.xerial:sqlite-jdbc:3.44.1.0")
227+
implementation(libs.kotlinx.coroutines.core)
228+
implementation(libs.kotlinx.serialization.core)
229+
implementation(libs.kotlinx.serialization.json)
230+
implementation(libs.xerial.sqlite.jdbc)
229231
// firebase dependencies
230-
implementation("javax.inject:javax.inject:1")
231-
implementation("com.squareup.okhttp3:okhttp:3.12.13")
232-
implementation("io.grpc:grpc-protobuf-lite:1.52.1")
233-
implementation("io.grpc:grpc-stub:1.52.1")
234-
implementation("androidx.collection:collection:1.2.0")
235-
implementation("io.grpc:grpc-okhttp:1.52.1")
236-
implementation("androidx.lifecycle:lifecycle-common:2.8.0-rc01")
237-
implementation("androidx.lifecycle:lifecycle-viewmodel:2.8.0-rc01")
232+
implementation(libs.javax.inject)
233+
implementation(libs.okhttp)
234+
implementation(libs.io.grpc.protobuf.lite)
235+
implementation(libs.io.grpc.stub)
236+
implementation(libs.androidx.collection)
237+
implementation(libs.io.grpc.okhttp)
238+
implementation(libs.androidx.lifecycle.common)
239+
implementation(libs.androidx.lifecycle.viewmodel)
238240
}
239241

240242
tasks.named("publishToMavenLocal").configure {
@@ -246,7 +248,7 @@ tasks.named("publish").configure {
246248
}
247249

248250
ktlint {
249-
version.set("0.41.0")
251+
version.set(libs.versions.ktlint.get())
250252
}
251253

252254
signing {
@@ -259,7 +261,8 @@ signing {
259261
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
260262

261263
fun isNonStable(version: String): Boolean {
262-
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
264+
val stableKeyword = listOf("RELEASE", "FINAL", "GA")
265+
.any { version.uppercase(Locale.ROOT).contains(it) }
263266
val versionMatch = "^[0-9,.v-]+(-r)?$".toRegex().matches(version)
264267

265268
return (stableKeyword || versionMatch).not()

firebase.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"emulators": {
3+
"auth": {
4+
"port": 9099
5+
},
6+
"ui": {
7+
"enabled": true
8+
},
9+
"singleProjectMode": true
10+
}
11+
}

gradle.properties

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

gradle/libs.versions.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[versions]
2+
androidx-lifecycle = "2.9.0-alpha01"
3+
ben-manes-versions = "0.51.0"
4+
google-firebase-bom = "32.7.0"
5+
io-grpc = "1.66.0"
6+
jlleitschuh-ktlint = "12.1.1"
7+
kotlin = "2.0.20"
8+
kotlinx-coroutines = "1.8.1"
9+
kotlinx-serialization = "1.7.2"
10+
ktlint = "0.47.1"
11+
mockito = "5.12.0"
12+
13+
[libraries]
14+
androidx-collection = { module = "androidx.collection:collection", version = "1.4.3" }
15+
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
16+
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
17+
google-firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "google-firebase-bom" }
18+
google-firebase-config = { module = "com.google.firebase:firebase-config" }
19+
google-firebase-database = { module = "com.google.firebase:firebase-database" }
20+
google-firebase-firestore = { module = "com.google.firebase:firebase-firestore" }
21+
google-firebase-functions = { module = "com.google.firebase:firebase-functions" }
22+
google-firebase-installations = { module = "com.google.firebase:firebase-installations" }
23+
google-firebase-storage = { module = "com.google.firebase:firebase-storage" }
24+
io-grpc-okhttp = { module = "io.grpc:grpc-okhttp", version.ref = "io-grpc" }
25+
io-grpc-protobuf-lite = { module = "io.grpc:grpc-protobuf-lite", version.ref = "io-grpc" }
26+
io-grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "io-grpc" }
27+
javax-inject = { module = "javax.inject:javax.inject", version = "1" }
28+
junit = { module = "junit:junit", version = "4.13.2" }
29+
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
30+
kotlinx-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
31+
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }
32+
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
33+
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
34+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
35+
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
36+
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "3.12.13" }
37+
robolectric-android-all = { module = "org.robolectric:android-all", version = "14-robolectric-10818077" }
38+
xerial-sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version = "3.46.1.0" }
39+
40+
[plugins]
41+
ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "ben-manes-versions" }
42+
jlleitschuh-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "jlleitschuh-ktlint" }
43+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
44+
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

0 commit comments

Comments
 (0)