Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3722) (#3723)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
strawberrybread and dogi authored Jun 27, 2024
1 parent 8cd4467 commit 4688b7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1632
versionName "0.16.32"
versionCode 1633
versionName "0.16.33"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
18 changes: 11 additions & 7 deletions app/src/main/java/org/ole/planet/myplanet/datamanager/ApiClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ object ApiClient {
val client = OkHttpClient.Builder().connectTimeout(1, TimeUnit.MINUTES)
.readTimeout(30, TimeUnit.SECONDS).writeTimeout(30, TimeUnit.SECONDS).build()
if (retrofit == null) {
retrofit = Retrofit.Builder().baseUrl(BASE_URL).client(client).addConverterFactory(
GsonConverterFactory.create(
GsonBuilder().setLenient()
.excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
.serializeNulls().create()
)
).build()
retrofit = Retrofit.Builder()
.baseUrl(BASE_URL)
.client(client)
.addConverterFactory(
GsonConverterFactory.create(
GsonBuilder()
.excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
.serializeNulls()
.create()
)
).build()
}
return retrofit
}
Expand Down

0 comments on commit 4688b7f

Please sign in to comment.