Skip to content

Commit 4a36869

Browse files
authored
Merge pull request #25 from neelkanth-kaushik/neelkanth-kaushik/LIBRARIES-2706
[LIBRARIES-2706] - Downgrade minSdk version from 24 to 16
2 parents 7614edc + eb3cbc2 commit 4a36869

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
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

.github/workflows/snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
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

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ kotlin.code.style=official
2323
# Deployment variables
2424
GROUP=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

2929
POM_ARTIFACT_ID=consent
3030
POM_NAME=consent

lib/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"

lib/src/main/java/com/segment/analytics/kotlin/consent/ConsentBlocker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

lib/src/main/java/com/segment/analytics/kotlin/consent/ConsentManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)