Skip to content

Commit

Permalink
revert: Rollback Kotlin upgrade
Browse files Browse the repository at this point in the history
Upgrading to Kotlin 1.5.30 caused a build error in the Maven Signing plugin. Upgrading the plugin is slated to take place in the near future and we will upgrade Kotlin at that time
  • Loading branch information
willpassidomo committed Sep 13, 2021
1 parent b7e946a commit 7deee2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.mparticle.commerce.CommerceEvent
import com.mparticle.identity.MParticleIdentityClientImpl
import com.mparticle.internal.Logger
import org.json.JSONArray
import kotlin.collections.forEach as kForEach

import org.json.JSONObject;

Expand Down Expand Up @@ -97,7 +96,7 @@ Data Plan parsed for Kit Filtering:
}
if (event is CommerceEvent) {
val productActionDatapoint = dataPoints["$dataPointKey.$PRODUCT_ACTION_PRODUCTS"]
event.products?.kForEach { product ->
event.products?.forEach { product ->
product?.customAttributes?.apply {
val filteredAttributes = filterKeys {
productActionDatapoint?.contains(it) ?: true
Expand All @@ -108,8 +107,8 @@ Data Plan parsed for Kit Filtering:
}
val productImpressionDatapoint = dataPoints["$dataPointKey.$PRODUCT_IMPRESSION_PRODUCTS"]
if (event.impressions?.size ?: 0 > 0) {
event.impressions?.kForEach {
it.products.kForEach { product ->
event.impressions?.forEach {
it.products.forEach { product ->
product?.customAttributes?.apply {
val filteredAttributes = filterKeys {
productImpressionDatapoint?.contains(it) ?: true
Expand Down Expand Up @@ -223,14 +222,14 @@ Data Plan parsed for Kit Filtering:
?.optJSONArray("data_points")
?.toList()
?.filterIsInstance<JSONObject>()
?.kForEach {
?.forEach {
val match = it.getJSONObject("match")
val key = generateDatapointKey(match)
if (key != null) {
val properties = getAllowedKeys(key, it)
points.put(key.toString(), properties)
val productKeys = key.getProductDataPoints()
productKeys?.kForEach { productKey ->
productKeys?.forEach { productKey ->
points.put(productKey.toString(), getAllowedKeys(productKey, it))
}
}
Expand Down Expand Up @@ -408,7 +407,7 @@ Data Plan parsed for Kit Filtering:

fun <T> Iterator<T>.toHashSet(): HashSet<T> {
val set = HashSet<T>()
this.kForEach { set.add(it) }
this.forEach { set.add(it) }
return set
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.5.30'
ext.kotlin_version = '1.4.10'

repositories {
jcenter()
Expand Down

0 comments on commit 7deee2e

Please sign in to comment.