Skip to content

Commit a1a6e12

Browse files
PIMOB:2459 - Added moshi codegen dependency (#266)
1 parent 02f23ca commit a1a6e12

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

buildSrc/src/main/java/Dependencies.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ object Dependencies {
4141
const val okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}"
4242
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:${Versions.loggingInterceptor}"
4343
const val moshi = "com.squareup.moshi:moshi-kotlin:${Versions.moshi}"
44+
const val moshiCodeGen = "com.squareup.moshi:moshi-kotlin-codegen:${Versions.moshi}"
4445

4546
// Logging
4647
const val eventLogger = "com.checkout:checkout-sdk-event-logger-android:${Versions.eventLogger}"

buildSrc/src/main/java/Versions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object Versions {
3333
// Networking Dependencies
3434
const val okhttp = "4.10.0"
3535
const val loggingInterceptor = "4.9.3"
36-
const val moshi = "1.13.0"
36+
const val moshi = "1.15.1"
3737

3838
// Unit Testing Dependencies
3939
const val junit5Jupiter = "5.8.0"

buildSrc/src/main/java/com/checkout/buildsrc/BaseDependencies.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fun DependencyHandler.networkingDependencies() {
5151
implementation(Dependencies.okhttp)
5252
implementation(Dependencies.loggingInterceptor)
5353
implementation(Dependencies.moshi)
54+
kapt(Dependencies.moshiCodeGen)
5455
}
5556

5657
/**

checkout/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.checkout.buildsrc.applyNetworkConfigurations
88
plugins {
99
id("com.android.library")
1010
kotlin("android")
11+
kotlin("kapt")
1112
id("org.jetbrains.dokka")
1213
id("maven-publish")
1314
}

checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import com.checkout.tokenization.usecase.ValidateTokenizationDataUseCase
2727
import com.checkout.validation.validator.AddressValidator
2828
import com.checkout.validation.validator.PhoneValidator
2929
import com.squareup.moshi.Moshi
30-
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
3130

3231
public object CheckoutApiServiceFactory {
3332

@@ -73,7 +72,7 @@ public object CheckoutApiServiceFactory {
7372
) = TokenNetworkApiClient(
7473
url,
7574
OkHttpProvider.createOkHttpClient(publicKey),
76-
Moshi.Builder().addLast(KotlinJsonAdapterFactory()).build(),
75+
Moshi.Builder().build(),
7776
)
7877

7978
private fun provideThreeDSExecutor(logger: Logger<LoggingEvent>): Executor<ThreeDSRequest> = ThreeDSExecutor(

0 commit comments

Comments
 (0)