Skip to content

Commit

Permalink
Remove use of Gson.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedawson committed Aug 11, 2024
1 parent 4f1807c commit 9912ce1
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 455 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {


group 'com.github.UstadMobile.door'
version '0.79.15'
version '0.79.17'

ext.localProperties = new Properties()

Expand Down
4 changes: 1 addition & 3 deletions door-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ dependencies {
implementation libs.kotlinpoet.metadata
implementation libs.jsqlparser
implementation libs.apache.commons.text
implementation libs.gson
implementation libs.simple.jndi
implementation libs.apache.commons.pool2
implementation libs.sqlite.jdbc
implementation libs.postgres.jdbc
implementation libs.apache.commons.dbcp2
implementation libs.ktor.server.netty
implementation libs.ktor.serialization.gson
implementation libs.ktor.client.okhttp
implementation libs.ktor.client.gson
implementation libs.ktor.client.json
implementation libs.nanohttpd
implementation libs.nanohttpd.nanolets
implementation libs.logback.classic
Expand Down

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions door-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ kotlin {
implementation libs.ktor.server.content.negotiation
implementation libs.ktor.client.content.negotiation
implementation libs.ktor.serialization.kotlinx.json
implementation libs.ktor.serialization.gson
implementation libs.ktor.client.okhttp
implementation libs.ktor.client.gson
implementation libs.ktor.server.test.host
implementation libs.turbine
}
Expand Down
1 change: 0 additions & 1 deletion door-testdb-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ dependencies {
implementation libs.ktor.server.netty
implementation libs.ktor.server.servlet
implementation libs.ktor.server.content.negotiation
implementation libs.ktor.serialization.gson
implementation libs.ktor.server.call.logging
implementation libs.ktor.server.cors

Expand Down
3 changes: 0 additions & 3 deletions door-testdb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ kotlin {

jvmMain {
dependencies {
implementation libs.ktor.serialization.gson
implementation libs.kodein.di.framework.ktor.server
implementation libs.sqlite.jdbc
implementation libs.ktor.server.content.negotiation
Expand All @@ -119,7 +118,6 @@ kotlin {
implementation libs.mockwebserver
implementation libs.mockito.kotlin
implementation libs.ktor.client.okhttp
implementation libs.ktor.client.gson
implementation libs.ktor.serialization.kotlinx.json
implementation libs.simple.jndi
implementation libs.apache.commons.pool2
Expand Down Expand Up @@ -154,7 +152,6 @@ kotlin {
implementation libs.androidx.core.ktx
implementation libs.okhttp
implementation libs.okhttp.sse
implementation libs.gson
implementation libs.nanohttpd
implementation libs.nanohttpd.nanolets
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import io.ktor.client.call.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
import io.ktor.serialization.gson.*
import io.ktor.serialization.kotlinx.json.*
import io.ktor.server.config.*
import io.ktor.server.engine.*
Expand Down Expand Up @@ -80,10 +79,10 @@ class ReplicationRouteTest {

@Suppress("RemoveRedundantQualifierName", "RedundantSuppression") //Ensure clarity between client and server
install(io.ktor.server.plugins.contentnegotiation.ContentNegotiation) {
gson {
register(ContentType.Application.Json, GsonConverter())
register(ContentType.Any, GsonConverter())
}
json(
json = json,
contentType = ContentType.Application.Json
)
}

routing {
Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ androidx-core = "1.12.0"
kotlinpoet = "1.14.2"
jsqlparser = "4.7"
apache-commons-text = "1.10.0"
gson = "2.10.1"
simple-jndi = "0.23.0"
apache-commons-pool2 = "2.12.0"
postgres-jdbc = "42.6.0"
Expand Down Expand Up @@ -60,18 +59,15 @@ kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlin
kotlinpoet-metadata = { module = "com.squareup:kotlinpoet-metadata", version.ref = "kotlinpoet"}
jsqlparser = { module = "com.github.jsqlparser:jsqlparser", version.ref = "jsqlparser"}
apache-commons-text = { module = "org.apache.commons:commons-text", version.ref = "apache-commons-text"}
gson = { module = "com.google.code.gson:gson", version.ref = "gson"}
simple-jndi = { module = "com.github.h-thurow:simple-jndi", version.ref = "simple-jndi"}
apache-commons-pool2 = { module = "org.apache.commons:commons-pool2", version.ref = "apache-commons-pool2"}
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite-jdbc"}
postgres-jdbc = { module = "org.postgresql:postgresql", version.ref = "postgres-jdbc"}
apache-commons-dbcp2 = { module = "org.apache.commons:commons-dbcp2", version.ref = "apache-commons-dbcp2"}

ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor"}
ktor-serialization-gson = { module = "io.ktor:ktor-serialization-gson", version.ref = "ktor"}
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu"}
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor"}
ktor-client-gson = { module = "io.ktor:ktor-client-gson", version.ref = "ktor"}
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor"}
ktor-client-json = { module = "io.ktor:ktor-client-json", version.ref = "ktor"}
ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor"}
Expand Down
3 changes: 0 additions & 3 deletions test-app-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ dependencies {
implementation libs.kotlinx.serialization.json
implementation libs.kotlinx.atomicfu

implementation libs.ktor.serialization.gson
implementation libs.ktor.client.okhttp
implementation libs.ktor.client.gson


implementation libs.androidx.room.runtime
implementation libs.androidx.room.ktx
Expand Down

0 comments on commit 9912ce1

Please sign in to comment.