Skip to content

Commit

Permalink
Merge branch 'main' into fix/#1237-achievements-image-size-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gy6543721 authored Sep 16, 2023
2 parents f1721b8 + a7ca390 commit 4fe9e1f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ class AppModule {

class AppBuildConfigProvider(
override val versionName: String = BuildConfig.VERSION_NAME,
override val debugBuild: Boolean = BuildConfig.DEBUG,
) : BuildConfigProvider
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import io.github.droidkaigi.confsched2023.data.di.ServerEnvironmentModule.Server
import io.github.droidkaigi.confsched2023.data.remoteconfig.DefaultRemoteConfigApi
import io.github.droidkaigi.confsched2023.data.remoteconfig.RemoteConfigApi
import io.github.droidkaigi.confsched2023.data.user.UserDataStore
import io.github.droidkaigi.confsched2023.model.BuildConfigProvider
import io.ktor.client.HttpClient
import io.ktor.client.engine.okhttp.OkHttp
import kotlinx.serialization.json.Json
Expand All @@ -44,15 +45,15 @@ public class ApiModule {
okHttpClient: OkHttpClient,
settingsDatastore: UserDataStore,
ktorJsonSettings: Json,
buildConfigProvider: BuildConfigProvider,
): HttpClient {
val httpClient = HttpClient(OkHttp) {
engine {
config {
preconfigured = okHttpClient
addInterceptor(
HttpLoggingInterceptor().apply {
// TODO use BuildConfig.DEBUG
level = if (true) {
level = if (buildConfigProvider.debugBuild) {
HttpLoggingInterceptor.Level.BODY
} else {
HttpLoggingInterceptor.Level.NONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ abstract class AppAndroidBuildConfigModule {

private object EmptyBuildConfigProvider : BuildConfigProvider {
override val versionName: String = ""
override val debugBuild: Boolean = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ package io.github.droidkaigi.confsched2023.model

interface BuildConfigProvider {
val versionName: String
val debugBuild: Boolean
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ androidGradlePlugin = "8.1.1"
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin?#pre-release_kotlin_compatibility
kotlin = "1.9.0"

androidxCore = "1.10.1"
androidxCore = "1.12.0"
androidDesugarJdkLibs = "2.0.3"
compose = "2023.09.00"
composeCompiler = "1.5.2"
Expand Down

0 comments on commit 4fe9e1f

Please sign in to comment.