Skip to content

Commit b32c1cc

Browse files
fix: Lint error caused by dependency library
2 parents 8c84b66 + b3a534c commit b32c1cc

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ android {
3939
minSdkVersion 21
4040
consumerProguardFiles 'consumer-proguard.pro'
4141
}
42-
42+
lint {
43+
disable "NullSafeMutableLiveData"
44+
}
4345
testOptions {
4446
unitTests.returnDefaultValues = true
4547
unitTests.all {
@@ -60,8 +62,8 @@ repositories {
6062
dependencies {
6163
implementation 'androidx.annotation:annotation:1.5.0'
6264
api 'com.rokt:roktsdk:4.8.1'
63-
testImplementation 'org.json:json:20210307'
6465

66+
testImplementation files('libs/java-json.jar')
6567
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
6668
testImplementation ("io.mockk:mockk:1.13.4")
6769
}

consumer-proguard.pro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# These are the proguard rules specified by the Button SDK's documentation
22

33
-keep class com.google.android.gms.ads.identifier.** { *; }
4-
-keep class com.mparticle.kits.ButtonKit { *; }
5-
-keep class com.mparticle.kits.button.** { *; }
4+
-keep class com.rokt.** { *; }

libs/java-json.jar

82.7 KB
Binary file not shown.

libs/testutils.aar

46.6 KB
Binary file not shown.

src/main/kotlin/com/mparticle/kits/RoktKit.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ class RoktKit : KitIntegration(), CommerceListener, IdentityListener, RoktListen
140140
onShouldHideLoadingIndicatorCallback = onShouldHideLoadingIndicator
141141
onShouldShowLoadingIndicatorCallback = onShouldShowLoadingIndicator
142142
val finalAttributes: HashMap<String, String> = HashMap<String, String>()
143-
filterUser?.userAttributes?.forEach { (key, value) ->
144-
finalAttributes[key] = value.toString()
143+
filterUser?.userAttributes?.let { attributes ->
144+
for ((key, value) in attributes) {
145+
finalAttributes[key] = value.toString()
146+
}
145147
}
146148
filterAttributes(finalAttributes, configuration).let {
147149
finalAttributes.putAll(it)

0 commit comments

Comments
 (0)