File tree Expand file tree Collapse file tree 7 files changed +12
-12
lines changed
src/main/java/com/segment/analytics/kotlin/consent Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ jobs:
2424 runs-on : ubuntu-latest
2525
2626 steps :
27- - uses : actions/checkout@v2
27+ - uses : actions/checkout@v4
2828 - name : Grant execute permission for gradlew
2929 run : chmod +x gradlew
3030 - name : cache gradle dependencies
31- uses : actions/cache@v2
31+ uses : actions/cache@v4
3232 with :
3333 path : |
3434 ~/.gradle/caches
Original file line number Diff line number Diff line change 2727 - name : Grant execute permission for gradlew
2828 run : chmod +x gradlew
2929 - name : cache gradle dependencies
30- uses : actions/cache@v2
30+ uses : actions/cache@v4
3131 with :
3232 path : |
3333 ~/.gradle/caches
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 environment : deployment
1111 steps :
12- - uses : actions/checkout@v2
12+ - uses : actions/checkout@v4
1313 - name : Grant execute permission for gradlew
1414 run : chmod +x gradlew
1515 - name : cache gradle dependencies
16- uses : actions/cache@v2
16+ uses : actions/cache@v4
1717 with :
1818 path : |
1919 ~/.gradle/caches
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ kotlin.code.style=official
2323# Deployment variables
2424GROUP =com.segment.analytics.kotlin
2525
26- VERSION_CODE =161
27- VERSION_NAME =1.6.1
26+ VERSION_CODE =162
27+ VERSION_NAME =1.6.2
2828
2929POM_ARTIFACT_ID =consent
3030POM_NAME =consent
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ android {
1616
1717 defaultConfig {
1818 multiDexEnabled = true
19- minSdk = 24
19+ minSdk = 16
2020 targetSdk = 33
2121
2222 testInstrumentationRunner = " android.support.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ open class ConsentBlocker(
6666 val categoryPreferenceJson = consentJsonObject[CATEGORY_PREFERENCE_KEY ]
6767 if (categoryPreferenceJson != null ) {
6868 val categoryPreferenceJsonObject = categoryPreferenceJson as JsonObject
69- categoryPreferenceJsonObject.forEach { category, consentGiven ->
69+ for (( category, consentGiven) in categoryPreferenceJsonObject) {
7070 if (consentGiven.toString() == " true" ) {
7171 // Add this category to the list of necessary categories
7272 consentJsonArray.add(category)
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ class ConsentManager(
9797 val allCategories = mutableListOf<String >()
9898 var enabledAtSegment = true
9999
100- // Add all mappings
101- settings.integrations.forEach { integrationName, integrationJson ->
100+
101+ for (( integrationName, integrationJson) in settings.integrations) {
102102 // If the integration has the consent key:
103103 integrationJson.jsonObject[CONSENT_SETTINGS_KEY ]?.let {
104104
@@ -164,7 +164,7 @@ class ConsentManager(
164164 */
165165 private fun stampEvent (event : BaseEvent ) {
166166 event.context = buildJsonObject {
167- event.context.forEach { key, json ->
167+ for (( key, json) in event.context) {
168168 put(key, json)
169169 }
170170 put(CONSENT_KEY , buildJsonObject {
You can’t perform that action at this time.
0 commit comments