Skip to content

Commit 070095f

Browse files
author
Judo Release Bot 🤖
committed
Releasing 1.8.4
1 parent 8eab956 commit 070095f

36 files changed

+41
-1561
lines changed

Diff for: build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val judoVersion by extra("1.8.3")
1+
val judoVersion by extra("1.8.4")
22
val composeVersion by extra("1.0.1")
33

44
// Top-level build file where you can add configuration options common to all sub-projects/modules.
@@ -7,13 +7,13 @@ buildscript {
77

88
repositories {
99
google()
10-
jcenter()
10+
mavenCentral()
1111
}
1212

1313
dependencies {
14-
classpath("com.android.tools.build:gradle:7.0.0")
14+
classpath("com.android.tools.build:gradle:7.0.4")
1515
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
16-
classpath("com.google.gms:google-services:4.3.5")
16+
classpath("com.google.gms:google-services:4.3.14")
1717

1818
// NOTE: Do not place your application dependencies here; they belong
1919
// in the individual module build.gradle files
@@ -23,7 +23,7 @@ buildscript {
2323
allprojects {
2424
repositories {
2525
google()
26-
jcenter()
26+
mavenCentral()
2727
maven {
2828
url = java.net.URI.create("https://judoapp.github.io/judo-android-libs/maven")
2929
}

Diff for: example/build.gradle.kts

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ plugins {
77
}
88

99
android {
10-
compileSdkVersion(31)
10+
compileSdk = 31
1111

1212
defaultConfig {
1313
applicationId = "app.judo.example"
14-
minSdkVersion(21)
15-
targetSdkVersion(30)
14+
minSdk = 21
15+
targetSdk = 31
1616
versionCode = 1
1717
versionName = "1.0"
1818
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -46,13 +46,9 @@ android {
4646
}
4747

4848
dependencies {
49-
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.4.30")
50-
implementation("androidx.core:core-ktx:1.3.2")
51-
implementation("androidx.appcompat:appcompat:1.2.0")
49+
implementation("androidx.core:core-ktx:1.7.0")
50+
implementation("androidx.appcompat:appcompat:1.4.1")
5251
implementation("com.android.support:multidex:1.0.3")
5352
implementation(project(":sdk"))
54-
implementation("com.google.firebase:firebase-messaging-ktx:21.0.1")
55-
implementation("com.google.firebase:firebase-analytics-ktx:18.0.2")
5653
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
57-
implementation("androidx.work:work-runtime:2.5.0")
5854
}

Diff for: example/src/main/AndroidManifest.xml

+7-14
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,9 @@
1515
android:supportsRtl="true"
1616
android:theme="@style/AppTheme">
1717

18-
<service
19-
android:name=".core.services.ExampleFirebaseMessagingService"
20-
android:exported="false">
21-
22-
<intent-filter>
23-
24-
<action android:name="com.google.firebase.MESSAGING_EVENT" />
25-
26-
</intent-filter>
27-
28-
</service>
29-
30-
<activity android:name=".ExampleMainActivity">
18+
<activity
19+
android:name=".ExampleMainActivity"
20+
android:exported="true">
3121

3222
<intent-filter>
3323

@@ -40,7 +30,10 @@
4030

4131
<!-- You'll need to add an Activity element to your manifest for Judo's ExperienceActivity
4232
(or your own subclass thereof to enable certain customizations) in order to specify the Intent filters -->
43-
<activity android:name="app.judo.sdk.ui.ExperienceActivity">
33+
<activity
34+
android:name="app.judo.sdk.ui.ExperienceActivity"
35+
android:exported="true">
36+
4437
<!-- An Example Intent Filter that opens Experience links in Judo's ExperienceActivity -->
4538
<intent-filter>
4639
<action android:name="android.intent.action.VIEW" />

Diff for: example/src/main/kotlin/app/judo/example/ExampleApplication.kt

+6-77
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,22 @@
1717

1818
package app.judo.example
1919

20-
import android.content.Context
21-
import android.content.DialogInterface
2220
import android.content.Intent
2321
import android.net.Uri
2422
import android.util.Log
2523
import androidx.appcompat.app.AlertDialog
2624
import androidx.multidex.MultiDexApplication
27-
import androidx.work.*
2825
import app.judo.sdk.api.Judo
2926
import app.judo.sdk.api.logs.LogLevel
30-
import com.google.firebase.analytics.FirebaseAnalytics
31-
import com.google.firebase.analytics.ktx.logEvent
32-
import com.google.firebase.messaging.FirebaseMessaging
33-
import java.util.concurrent.CountDownLatch
34-
import java.util.concurrent.TimeUnit
3527

3628
class ExampleApplication : MultiDexApplication() {
3729

3830
companion object {
3931
private const val TAG = "ExampleApplication"
4032
}
4133

42-
private lateinit var analytics: FirebaseAnalytics
43-
private lateinit var messaging: FirebaseMessaging
44-
4534
override fun onCreate() {
4635
super.onCreate()
47-
analytics = FirebaseAnalytics.getInstance(this)
48-
messaging = FirebaseMessaging.getInstance()
4936

5037
if (app.judo.example.BuildConfig.DEBUG) {
5138
Judo.logLevel = LogLevel.Verbose
@@ -65,10 +52,6 @@ class ExampleApplication : MultiDexApplication() {
6552
configuration = config.build()
6653
)
6754

68-
Judo.performSync() {
69-
Log.d(TAG, "Experience sync completed")
70-
}
71-
7255
// you can register a callback to be fired whenever a user taps/activates an Action
7356
// with the Custom type set on a layer.
7457
Judo.addCustomActionCallback { actionEvent ->
@@ -93,37 +76,6 @@ class ExampleApplication : MultiDexApplication() {
9376
}
9477
}
9578

96-
messaging.token.addOnCompleteListener { task ->
97-
if (!task.isSuccessful) {
98-
Log.w(TAG, "Fetching FCM registration token failed", task.exception)
99-
return@addOnCompleteListener
100-
}
101-
102-
// Get new FCM registration token
103-
task.result?.let { fcmToken ->
104-
// Log
105-
Log.d(TAG, "FCM registration token retrieved: $fcmToken")
106-
107-
Judo.setPushToken(fcmToken = fcmToken)
108-
}
109-
}
110-
111-
val judoWorkRequest =
112-
PeriodicWorkRequest.Builder(JudoSyncWorker::class.java, 1, TimeUnit.HOURS)
113-
.setConstraints(
114-
Constraints.Builder()
115-
.setRequiredNetworkType(NetworkType.UNMETERED)
116-
.setRequiresCharging(true)
117-
.build(),
118-
)
119-
.build()
120-
121-
WorkManager.getInstance(this).enqueueUniquePeriodicWork(
122-
"judo-sync",
123-
ExistingPeriodicWorkPolicy.REPLACE,
124-
judoWorkRequest
125-
)
126-
12779
// you may also subscribe to events from the Judo SDK, namely, be notified whenever a screen is Viewed, or when an action is received (aka, a button tapped).
12880
Judo.addScreenViewedCallback { event ->
12981
// a common use case is to notify your own Analytics tooling that a Judo screen has been
@@ -154,35 +106,12 @@ class ExampleApplication : MultiDexApplication() {
154106
// amplitudeClient.logEvent("Screen Viewed", eventProperties)
155107

156108
// Firebase Analytics:
157-
analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) {
158-
param(
159-
FirebaseAnalytics.Param.SCREEN_NAME,
160-
"Judo / ${event.experience.name} / ${event.screen.name}"
161-
)
162-
}
163-
}
164-
}
165-
}
166-
167-
class JudoSyncWorker(appContext: Context, workerParameters: WorkerParameters) :
168-
Worker(appContext, workerParameters) {
169-
companion object {
170-
private const val TAG = "JudoSyncWorker"
171-
}
172-
173-
override fun doWork(): Result {
174-
val latch = CountDownLatch(1)
175-
176-
Judo.performSync {
177-
latch.countDown()
178-
}
179-
180-
try {
181-
latch.await()
182-
} catch (error: Exception) {
183-
Log.e(TAG, "Unable to complete background Judo sync")
184-
return Result.failure()
109+
// firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) {
110+
// param(
111+
// FirebaseAnalytics.Param.SCREEN_NAME,
112+
// "Judo / ${event.experience.name} / ${event.screen.name}"
113+
// )
114+
// }
185115
}
186-
return Result.success()
187116
}
188117
}

Diff for: example/src/main/kotlin/app/judo/example/core/services/ExampleFirebaseMessagingService.kt

-56
This file was deleted.

Diff for: sdk/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ val judoApiVersion = "2"
1414
val useRenderTree = false
1515

1616
android {
17-
compileSdkVersion(31)
17+
compileSdk = 31
1818

1919
defaultConfig {
20-
minSdkVersion(21)
20+
minSdk = 21
2121
multiDexEnabled = true
2222
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2323
buildConfigField("int", "API_VERSION", judoApiVersion)

Diff for: sdk/src/main/kotlin/app/judo/sdk/api/Judo.kt

+10-22
Original file line numberDiff line numberDiff line change
@@ -185,39 +185,33 @@ object Judo {
185185
}
186186

187187
@JvmStatic
188-
@Deprecated(
189-
message = "Manually pre-fetching assets is no longer supported",
190-
replaceWith = ReplaceWith("Judo.performSync {}"),
191-
)
188+
@Deprecated("Manually pre-fetching assets is no longer supported.")
192189
fun performSync(
193190
@Suppress("unused")
194191
prefetchAssets: Boolean = false,
195192
onComplete: () -> Unit = {}
196193
) {
197-
CoroutineScope(Dispatchers.IO).launch {
198-
controller.performSync(onComplete)
199-
}
194+
//NO-OP: Manually pre-fetching assets is no longer supported.
195+
onComplete()
200196
}
201197

202198
@JvmStatic
199+
@Deprecated("Experience syncing is no longer supported.")
203200
fun performSync(
204201
onComplete: () -> Unit = {}
205202
) {
206-
CoroutineScope(Dispatchers.IO).launch {
207-
controller.performSync(onComplete = onComplete)
208-
}
203+
//NO-OP: Sync is no longer supported.
204+
onComplete()
209205
}
210206

207+
@Deprecated("The Judo SDK no longer requires notification of FCM messages, as background sync is no longer supported.")
211208
fun onFirebaseRemoteMessageReceived(data: Map<String, String>) {
212-
CoroutineScope(Dispatchers.IO).launch {
213-
controller.onFirebaseRemoteMessageReceived(data)
214-
}
209+
//NO-OP: Remote syncing is no longer supported.
215210
}
216211

212+
@Deprecated("The Judo SDK no longer requires an FCM token, as background sync is no longer supported.")
217213
fun setPushToken(fcmToken: String) {
218-
CoroutineScope(Dispatchers.IO).launch {
219-
controller.setPushToken(fcmToken)
220-
}
214+
//NO-OP: Remote syncing is no longer supported.
221215
}
222216

223217
/**
@@ -308,7 +302,6 @@ object Judo {
308302
*/
309303
val analyticsMode: AnalyticsMode = AnalyticsMode.DEFAULT,
310304

311-
val experienceCacheSize: Long = Environment.Sizes.EXPERIENCE_CACHE_SIZE,
312305
val imageCacheSize: Long = Environment.Sizes.IMAGE_CACHE_SIZE,
313306
var authorizers: List<Authorizer> = emptyList()
314307
) {
@@ -356,11 +349,6 @@ object Judo {
356349
return this
357350
}
358351

359-
fun setExperienceCacheSize(experienceCacheSize: Long): Builder {
360-
results = results.copy(experienceCacheSize = experienceCacheSize)
361-
return this
362-
}
363-
364352
fun setImageCacheSize(imageCacheSize: Long): Builder {
365353
this.results = results.copy(imageCacheSize = imageCacheSize)
366354
return this

Diff for: sdk/src/main/kotlin/app/judo/sdk/api/analytics/AnalyticsEvent.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface AnalyticsEvent {
4343
val id: String,
4444

4545
/**
46-
* The Firebase FCM push token.
46+
* The Firebase FCM push token, which is no longer required.
4747
*/
4848
val token: String?
4949
)

0 commit comments

Comments
 (0)