Skip to content

Commit fa8a4f3

Browse files
author
Bas Buijsen
committed
Merge branch 'master' of https://github.com/GitLiveApp/firebase-kotlin-sdk into feat/Documentation
1 parent f396917 commit fa8a4f3

File tree

19 files changed

+125
-128
lines changed

19 files changed

+125
-128
lines changed

build.gradle.kts

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,19 @@ repositories {
1414
}
1515

1616
plugins {
17-
kotlin("multiplatform") apply false
18-
kotlin("native.cocoapods") apply false
17+
alias(libs.plugins.android.application) apply false
18+
alias(libs.plugins.kotlinx.serialization) apply false
19+
alias(libs.plugins.multiplatform) apply false
20+
alias(libs.plugins.native.cocoapods) apply false
21+
alias(libs.plugins.test.logger.plugin) apply false
22+
alias(libs.plugins.ben.manes.versions) apply false
1923
id("base")
2024
id("com.github.ben-manes.versions") version "0.42.0"
2125
id("org.jetbrains.dokka") version "1.9.20"
2226
}
2327

2428
buildscript {
25-
repositories {
26-
google()
27-
mavenCentral()
28-
gradlePluginPortal()
29-
maven {
30-
url = uri("https://plugins.gradle.org/m2/")
31-
}
32-
}
3329
dependencies {
34-
classpath("com.android.tools.build:gradle:${project.extra["gradlePluginVersion"]}")
35-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.extra["kotlinVersion"]}")
36-
classpath("com.adarshr:gradle-test-logger-plugin:3.2.0")
3730
classpath("org.jetbrains.dokka:dokka-base:1.9.20")
3831
}
3932
}
@@ -166,31 +159,27 @@ subprojects {
166159
}
167160

168161
afterEvaluate {
169-
170-
val coroutinesVersion: String by project
171-
val firebaseBoMVersion: String by project
172-
173162
dependencies {
174-
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
175-
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion")
176-
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:$firebaseBoMVersion"))
163+
"commonMainImplementation"(libs.kotlinx.coroutines.core)
164+
"androidMainImplementation"(libs.kotlinx.coroutines.play.services)
165+
"androidMainImplementation"(platform(libs.firebase.bom))
177166
"commonTestImplementation"(kotlin("test-common"))
178167
"commonTestImplementation"(kotlin("test-annotations-common"))
179168
if (this@afterEvaluate.name != "firebase-crashlytics") {
180-
"jvmMainApi"("dev.gitlive:firebase-java-sdk:0.4.3")
181-
"jvmMainApi"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion") {
169+
"jvmMainApi"(libs.gitlive.firebase.java.sdk)
170+
"jvmMainApi"(libs.kotlinx.coroutines.play.services) {
182171
exclude("com.google.android.gms")
183172
}
184173
"jsTestImplementation"(kotlin("test-js"))
185174
"jvmTestImplementation"(kotlin("test-junit"))
186-
"jvmTestImplementation"("junit:junit:4.13.2")
175+
"jvmTestImplementation"(libs.junit)
187176
}
188177
"androidInstrumentedTestImplementation"(kotlin("test-junit"))
189178
"androidUnitTestImplementation"(kotlin("test-junit"))
190-
"androidInstrumentedTestImplementation"("junit:junit:4.13.2")
191-
"androidInstrumentedTestImplementation"("androidx.test:core:1.5.0")
192-
"androidInstrumentedTestImplementation"("androidx.test.ext:junit:1.1.5")
193-
"androidInstrumentedTestImplementation"("androidx.test:runner:1.5.2")
179+
"androidInstrumentedTestImplementation"(libs.junit)
180+
"androidInstrumentedTestImplementation"(libs.androidx.test.core)
181+
"androidInstrumentedTestImplementation"(libs.androidx.test.junit)
182+
"androidInstrumentedTestImplementation"(libs.androidx.test.runner)
194183
}
195184
}
196185

firebase-analytics/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ kotlin {
121121
sourceSets {
122122
all {
123123
languageSettings.apply {
124-
val apiVersion: String by project
125-
val languageVersion: String by project
126-
this.apiVersion = apiVersion
127-
this.languageVersion = languageVersion
124+
this.apiVersion = libs.versions.settings.api.get()
125+
this.languageVersion = libs.versions.settings.language.get()
128126
progressiveMode = true
129127
if (name.lowercase().contains("ios")) {
130128
optIn("kotlinx.cinterop.ExperimentalForeignApi")
@@ -147,7 +145,7 @@ kotlin {
147145

148146
getByName("androidMain") {
149147
dependencies {
150-
api("com.google.firebase:firebase-analytics")
148+
api(libs.google.firebase.analytics)
151149
}
152150
}
153151
}

firebase-app/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,8 @@ kotlin {
117117
sourceSets {
118118
all {
119119
languageSettings.apply {
120-
val apiVersion: String by project
121-
val languageVersion: String by project
122-
this.apiVersion = apiVersion
123-
this.languageVersion = languageVersion
120+
this.apiVersion = libs.versions.settings.api.get()
121+
this.languageVersion = libs.versions.settings.language.get()
124122
progressiveMode = true
125123
if (name.lowercase().contains("ios")) {
126124
optIn("kotlinx.cinterop.ExperimentalForeignApi")
@@ -142,7 +140,7 @@ kotlin {
142140

143141
getByName("androidMain") {
144142
dependencies {
145-
api("com.google.firebase:firebase-common-ktx")
143+
api(libs.google.firebase.common.ktx)
146144
}
147145
}
148146

firebase-auth/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ kotlin {
129129
sourceSets {
130130
all {
131131
languageSettings.apply {
132-
val apiVersion: String by project
133-
val languageVersion: String by project
134-
this.apiVersion = apiVersion
135-
this.languageVersion = languageVersion
132+
this.apiVersion = libs.versions.settings.api.get()
133+
this.languageVersion = libs.versions.settings.language.get()
136134
progressiveMode = true
137135
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
138136
if (name.lowercase().contains("ios")) {
@@ -157,7 +155,7 @@ kotlin {
157155

158156
getByName("androidMain") {
159157
dependencies {
160-
api("com.google.firebase:firebase-auth-ktx")
158+
api(libs.google.firebase.auth.ktx)
161159
}
162160
}
163161
}

firebase-common-internal/build.gradle.kts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ kotlin {
110110
sourceSets {
111111
all {
112112
languageSettings.apply {
113-
val apiVersion: String by project
114-
val languageVersion: String by project
115-
this.apiVersion = apiVersion
116-
this.languageVersion = languageVersion
113+
this.apiVersion = libs.versions.settings.api.get()
114+
this.languageVersion = libs.versions.settings.language.get()
117115
progressiveMode = true
118116
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
119117
optIn("kotlinx.serialization.ExperimentalSerializationApi")
@@ -122,11 +120,9 @@ kotlin {
122120
}
123121

124122
getByName("commonMain") {
125-
val serializationVersion: String by project
126-
127123
dependencies {
128124
implementation(project(":firebase-common"))
129-
api("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
125+
api(libs.kotlinx.serialization.core)
130126
}
131127
}
132128

@@ -138,7 +134,7 @@ kotlin {
138134

139135
getByName("androidMain") {
140136
dependencies {
141-
api("com.google.firebase:firebase-common-ktx")
137+
api(libs.google.firebase.common.ktx)
142138
}
143139
}
144140

firebase-common/build.gradle.kts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ kotlin {
110110
sourceSets {
111111
all {
112112
languageSettings.apply {
113-
val apiVersion: String by project
114-
val languageVersion: String by project
115-
this.apiVersion = apiVersion
116-
this.languageVersion = languageVersion
113+
this.apiVersion = libs.versions.settings.api.get()
114+
this.languageVersion = libs.versions.settings.language.get()
117115
progressiveMode = true
118116
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
119117
optIn("kotlinx.serialization.ExperimentalSerializationApi")
@@ -122,10 +120,8 @@ kotlin {
122120
}
123121

124122
getByName("commonMain") {
125-
val serializationVersion: String by project
126-
127123
dependencies {
128-
api("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
124+
api(libs.kotlinx.serialization.core)
129125
}
130126
}
131127

@@ -137,7 +133,7 @@ kotlin {
137133

138134
getByName("androidMain") {
139135
dependencies {
140-
api("com.google.firebase:firebase-common-ktx")
136+
api(libs.google.firebase.common.ktx)
141137
}
142138
}
143139

firebase-config/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@ kotlin {
125125
sourceSets {
126126
all {
127127
languageSettings.apply {
128-
val apiVersion: String by project
129-
val languageVersion: String by project
130-
this.apiVersion = apiVersion
131-
this.languageVersion = languageVersion
128+
this.apiVersion = libs.versions.settings.api.get()
129+
this.languageVersion = libs.versions.settings.language.get()
132130
progressiveMode = true
133131
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
134132
if (name.lowercase().contains("ios")) {
@@ -153,7 +151,7 @@ kotlin {
153151

154152
getByName("androidMain") {
155153
dependencies {
156-
api("com.google.firebase:firebase-config-ktx")
154+
api(libs.google.firebase.config.ktx)
157155
}
158156
}
159157

firebase-crashlytics/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@ kotlin {
100100
sourceSets {
101101
all {
102102
languageSettings.apply {
103-
val apiVersion: String by project
104-
val languageVersion: String by project
105-
this.apiVersion = apiVersion
106-
this.languageVersion = languageVersion
103+
this.apiVersion = libs.versions.settings.api.get()
104+
this.languageVersion = libs.versions.settings.language.get()
107105
progressiveMode = true
108106
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
109107
if (name.lowercase().contains("ios")) {
@@ -127,7 +125,7 @@ kotlin {
127125

128126
getByName("androidMain") {
129127
dependencies {
130-
api("com.google.firebase:firebase-crashlytics-ktx")
128+
api(libs.google.firebase.crashlytics.ktx)
131129
}
132130
}
133131

firebase-database/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ kotlin {
126126
sourceSets {
127127
all {
128128
languageSettings.apply {
129-
val apiVersion: String by project
130-
val languageVersion: String by project
131-
this.apiVersion = apiVersion
132-
this.languageVersion = languageVersion
129+
this.apiVersion = libs.versions.settings.api.get()
130+
this.languageVersion = libs.versions.settings.language.get()
133131
progressiveMode = true
134132
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
135133
optIn("kotlinx.coroutines.FlowPreview")
@@ -160,7 +158,7 @@ kotlin {
160158

161159
getByName("androidMain") {
162160
dependencies {
163-
api("com.google.firebase:firebase-database-ktx")
161+
api(libs.google.firebase.database.ktx)
164162
}
165163
}
166164
getByName("jvmMain") {

firebase-firestore/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ kotlin {
138138
sourceSets {
139139
all {
140140
languageSettings.apply {
141-
val apiVersion: String by project
142-
val languageVersion: String by project
143-
this.apiVersion = apiVersion
144-
this.languageVersion = languageVersion
141+
this.apiVersion = libs.versions.settings.api.get()
142+
this.languageVersion = libs.versions.settings.language.get()
145143
progressiveMode = true
146144
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
147145
optIn("kotlinx.serialization.InternalSerializationApi")
@@ -169,7 +167,7 @@ kotlin {
169167

170168
getByName("androidMain") {
171169
dependencies {
172-
api("com.google.firebase:firebase-firestore")
170+
api(libs.google.firebase.firestore)
173171
}
174172
}
175173

0 commit comments

Comments
 (0)