Skip to content

Commit

Permalink
Add a FirebaseUrlFactory (#1825)
Browse files Browse the repository at this point in the history
* Add a FirebaseUrlFactory

* Improve

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fix copyright warning
  • Loading branch information
yschimke authored Nov 22, 2023
1 parent 4bbd268 commit dad25be
Show file tree
Hide file tree
Showing 6 changed files with 1,094 additions and 15 deletions.
32 changes: 17 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,23 @@ allprojects {
subprojects {
apply(plugin = "com.diffplug.spotless")

spotless {
kotlin {
target("**/*.kt")
ktlint(libs.versions.ktlint.get())
.setEditorConfigPath(rootProject.file("quality/ktlint/.editorconfig"))
licenseHeaderFile(rootProject.file("spotless/copyright.txt"))
}
kotlinGradle {
target("**/*.gradle.kts")
ktlint(libs.versions.ktlint.get())
.setEditorConfigPath(rootProject.file("quality/ktlint/.editorconfig"))
licenseHeaderFile(
rootProject.file("spotless/copyright.txt"),
"(buildscript|apply|import|plugins)"
)
if (childProjects.isEmpty()) {
spotless {
kotlin {
target("**/*.kt")
ktlint(libs.versions.ktlint.get())
.setEditorConfigPath(rootProject.file("quality/ktlint/.editorconfig"))
licenseHeaderFile(rootProject.file("spotless/copyright.txt"))
}
kotlinGradle {
target("**/*.gradle.kts")
ktlint(libs.versions.ktlint.get())
.setEditorConfigPath(rootProject.file("quality/ktlint/.editorconfig"))
licenseHeaderFile(
rootProject.file("spotless/copyright.txt"),
"(buildscript|apply|import|plugins)"
)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ coil-base = { module = "io.coil-kt:coil-compose-base", version.ref = "io-coil-kt
coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "io-coil-kt" }
com-squareup-okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "com-squareup-okhttp3" }
com-squareup-okhttp3-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "com-squareup-okhttp3" }
com-squareup-okhttp3-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "com-squareup-okhttp3" }
compose-bom = "androidx.compose:compose-bom:2023.10.01"
compose-foundation-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose-material" }
compose-foundation-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "androidx-compose-material" }
Expand Down
9 changes: 9 additions & 0 deletions network-awareness/okhttp/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,12 @@ package com.google.android.horologist.networks.okhttp.impl {

}

package com.google.android.horologist.networks.okhttp.urlconnection {

public final class FirebaseUrlFactory implements java.net.URLStreamHandlerFactory {
ctor public FirebaseUrlFactory(okhttp3.Call.Factory client);
method public java.net.URLStreamHandler? createURLStreamHandler(String protocol);
}

}

1 change: 1 addition & 0 deletions network-awareness/okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ dependencies {
testImplementation(libs.androidx.test.ext.ktx)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.robolectric)
testImplementation(libs.com.squareup.okhttp3.mockwebserver)
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
Expand Down
Loading

0 comments on commit dad25be

Please sign in to comment.