Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: cache gradle dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: cache gradle dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
environment: deployment
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: cache gradle dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ kotlin.code.style=official
# Deployment variables
GROUP=com.segment.analytics.kotlin

VERSION_CODE=161
VERSION_NAME=1.6.1
VERSION_CODE=162
VERSION_NAME=1.6.2

POM_ARTIFACT_ID=consent
POM_NAME=consent
Expand Down
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {

defaultConfig {
multiDexEnabled = true
minSdk = 24
minSdk = 16
targetSdk = 33

testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ open class ConsentBlocker(
val categoryPreferenceJson = consentJsonObject[CATEGORY_PREFERENCE_KEY]
if (categoryPreferenceJson != null) {
val categoryPreferenceJsonObject = categoryPreferenceJson as JsonObject
categoryPreferenceJsonObject.forEach { category, consentGiven ->
for ((category, consentGiven) in categoryPreferenceJsonObject) {
if (consentGiven.toString() == "true") {
// Add this category to the list of necessary categories
consentJsonArray.add(category)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class ConsentManager(
val allCategories = mutableListOf<String>()
var enabledAtSegment = true

// Add all mappings
settings.integrations.forEach { integrationName, integrationJson ->

for ((integrationName, integrationJson) in settings.integrations) {
// If the integration has the consent key:
integrationJson.jsonObject[CONSENT_SETTINGS_KEY]?.let {

Expand Down Expand Up @@ -164,7 +164,7 @@ class ConsentManager(
*/
private fun stampEvent(event: BaseEvent) {
event.context = buildJsonObject {
event.context.forEach { key, json ->
for ((key, json) in event.context) {
put(key, json)
}
put(CONSENT_KEY, buildJsonObject {
Expand Down