Skip to content

Commit 19d4574

Browse files
authored
Update appsfly version (#17)
* update library versions * update sonatype to use the staging api * update version * update gha cache version * update ubuntu version * Revert "update ubuntu version" This reverts commit 0832afd. * fix ci issue * fix ci issue * remove desugaring * replace foreach * fix release issue * fix release issue * fix release issue
1 parent 93d7739 commit 19d4574

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
lines changed

.github/workflows/build.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/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Grant execute permission for gradlew
2727
run: chmod +x gradlew
2828
- name: cache gradle dependencies
29-
uses: actions/cache@v2
29+
uses: actions/cache@v4
3030
with:
3131
path: |
3232
~/.gradle/caches

.github/workflows/snapshot.yml

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

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ allprojects {
3838

3939
nexusPublishing {
4040
repositories {
41-
sonatype()
41+
sonatype {
42+
// New Portal OSSRH Staging API endpoints
43+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
44+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
45+
}
4246
}
4347
}
4448

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.destinations
2525

26-
VERSION_CODE=161
27-
VERSION_NAME=1.6.1
26+
VERSION_CODE=170
27+
VERSION_NAME=1.7.0
2828

2929
POM_ARTIFACT_ID=appsflyer
3030
POM_NAME=appsflyer

lib/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ android {
2929
}
3030
}
3131
compileOptions {
32-
isCoreLibraryDesugaringEnabled = true
3332
sourceCompatibility = JavaVersion.VERSION_1_8
3433
targetCompatibility = JavaVersion.VERSION_1_8
3534
}
@@ -39,7 +38,7 @@ android {
3938
}
4039

4140
dependencies {
42-
implementation("com.segment.analytics.kotlin:android:1.14.2")
41+
implementation("com.segment.analytics.kotlin:android:1.22.0")
4342
implementation("androidx.multidex:multidex:2.0.1")
4443

4544
implementation("androidx.core:core-ktx:1.8.0")
@@ -51,7 +50,7 @@ dependencies {
5150

5251
// Partner Dependencies
5352
dependencies {
54-
implementation("com.appsflyer:af-android-sdk:6.13.0")
53+
implementation("com.appsflyer:af-android-sdk:6.17.4")
5554
implementation ("com.android.installreferrer:installreferrer:2.2")
5655
}
5756

lib/src/main/java/com/segment/analytics/kotlin/destinations/appsflyer/AppsflyerDestination.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ class AppsFlyerDestination(
185185
is Number -> JsonPrimitive(value)
186186
is String -> JsonPrimitive(value)
187187
is Map<*, *> -> buildJsonObject {
188-
value.forEach { (k, v) ->
188+
for ((k, v) in value) {
189189
put(k.toString(), convertToPrimitive(v))
190190
}
191191
}
192192
is List<*> -> buildJsonArray {
193-
value.iterator().forEach { v ->
193+
for (v in value) {
194194
add(convertToPrimitive(v))
195195
}
196196
}
197197
is Array<*> -> buildJsonArray {
198-
value.forEach { v ->
198+
for (v in value) {
199199
add(convertToPrimitive(v))
200200
}
201201
}
@@ -207,7 +207,7 @@ class AppsFlyerDestination(
207207
// See https://segment.com/docs/spec/mobile/#install-attributed.
208208
val properties = buildJsonObject {
209209
put("provider", key)
210-
attributionData.forEach { (k, v) ->
210+
for ((k, v) in attributionData) {
211211
if (k !in setOf("media_source", "adgroup")) {
212212
put(k, convertToPrimitive(v))
213213
}

publishing-plugins/src/main/kotlin/mvn-publish.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ tasks.getByName("publish") {
122122
dependsOn("build")
123123
}
124124

125+
tasks.matching { it.name.startsWith("publish") && it.name.contains("Publication") }.configureEach {
126+
mustRunAfter(tasks.matching { it.name.startsWith("sign") })
127+
}
128+
125129
tasks.getByName("publishToMavenLocal") {
126130
dependsOn("build")
127131
}
@@ -130,3 +134,12 @@ tasks.getByName("publishToSonatype") {
130134
dependsOn("publish")
131135
}
132136

137+
tasks.whenTaskAdded {
138+
if (name.startsWith("publishTestPublicationTo")) {
139+
dependsOn("bundleReleaseAar")
140+
}
141+
if (name.startsWith("sign") && name.contains("Publication")) {
142+
mustRunAfter("bundleReleaseAar")
143+
}
144+
}
145+

0 commit comments

Comments
 (0)