expo-updates-interface 0.15.3 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -3
- package/android/build.gradle +7 -95
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesControllerRegistry.kt +7 -0
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterface.kt +34 -0
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterfaceCallbacks.kt +5 -0
- package/ios/EXUpdatesInterface/UpdatesExternalInterface.swift +2 -1
- package/ios/EXUpdatesInterface.podspec +2 -0
- package/package.json +3 -3
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterface.java +0 -38
- package/android/src/main/java/expo/modules/updatesinterface/UpdatesInterfaceCallbacks.java +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,15 +10,28 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.
|
|
13
|
+
## 0.16.1 — 2024-04-29
|
|
14
14
|
|
|
15
15
|
_This version does not introduce any user-facing changes._
|
|
16
16
|
|
|
17
|
-
## 0.
|
|
17
|
+
## 0.16.0 — 2024-04-18
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Decouple from "bridge" in `expo-updates`. ([#27216](https://github.com/expo/expo/pull/27216) by [@kudo](https://github.com/kudo))
|
|
22
|
+
- Migrated expo-updates-interface to Kotlin. ([#28033](https://github.com/expo/expo/pull/28033) by [@kudo](https://github.com/kudo))
|
|
23
|
+
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
|
|
24
|
+
- Aligned `UpdatesControllerRegistry` with iOS for a better expo-updates and expo-dev-launcher interoperability. ([#27996](https://github.com/expo/expo/pull/27996) by [@kudo](https://github.com/kudo))
|
|
25
|
+
|
|
26
|
+
## 0.15.3 - 2024-01-18
|
|
27
|
+
|
|
28
|
+
_This version does not introduce any user-facing changes._
|
|
29
|
+
|
|
30
|
+
## 0.15.2 - 2024-01-10
|
|
18
31
|
|
|
19
32
|
_This version does not introduce any user-facing changes._
|
|
20
33
|
|
|
21
|
-
## 0.15.1
|
|
34
|
+
## 0.15.1 - 2023-12-19
|
|
22
35
|
|
|
23
36
|
### 🐛 Bug fixes
|
|
24
37
|
|
package/android/build.gradle
CHANGED
|
@@ -1,107 +1,19 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
|
-
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven-publish'
|
|
4
2
|
|
|
5
3
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.
|
|
4
|
+
version = '0.16.1'
|
|
7
5
|
|
|
8
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
15
|
-
useExpoPublishing()
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
buildscript {
|
|
20
|
-
// Simple helper that allows the root project to override versions declared by this library.
|
|
21
|
-
ext.safeExtGet = { prop, fallback ->
|
|
22
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Ensures backward compatibility
|
|
26
|
-
ext.getKotlinVersion = {
|
|
27
|
-
if (ext.has("kotlinVersion")) {
|
|
28
|
-
ext.kotlinVersion()
|
|
29
|
-
} else {
|
|
30
|
-
ext.safeExtGet("kotlinVersion", "1.8.10")
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
repositories {
|
|
35
|
-
mavenCentral()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
dependencies {
|
|
39
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
44
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
45
|
-
afterEvaluate {
|
|
46
|
-
publishing {
|
|
47
|
-
publications {
|
|
48
|
-
release(MavenPublication) {
|
|
49
|
-
from components.release
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
repositories {
|
|
53
|
-
maven {
|
|
54
|
-
url = mavenLocal().url
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
7
|
+
apply from: expoModulesCorePlugin
|
|
8
|
+
applyKotlinExpoModulesCorePlugin()
|
|
9
|
+
useCoreDependencies()
|
|
10
|
+
useDefaultAndroidSdkVersions()
|
|
11
|
+
useExpoPublishing()
|
|
60
12
|
|
|
61
13
|
android {
|
|
62
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
-
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
|
-
|
|
66
|
-
defaultConfig {
|
|
67
|
-
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
publishing {
|
|
72
|
-
singleVariant("release") {
|
|
73
|
-
withSourcesJar()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
lintOptions {
|
|
78
|
-
abortOnError false
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
83
|
-
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
|
|
84
|
-
compileOptions {
|
|
85
|
-
sourceCompatibility JavaVersion.VERSION_11
|
|
86
|
-
targetCompatibility JavaVersion.VERSION_11
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
kotlinOptions {
|
|
90
|
-
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
14
|
namespace "expo.modules.updatesinterface"
|
|
95
15
|
defaultConfig {
|
|
96
16
|
versionCode 1
|
|
97
|
-
versionName '0.
|
|
17
|
+
versionName '0.16.1'
|
|
98
18
|
}
|
|
99
19
|
}
|
|
100
|
-
|
|
101
|
-
repositories {
|
|
102
|
-
mavenCentral()
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
dependencies {
|
|
106
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
107
|
-
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
package expo.modules.updatesinterface
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import org.json.JSONObject
|
|
5
|
+
import java.lang.ref.WeakReference
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Interface for modules that depend on expo-updates for loading production updates but do not want
|
|
9
|
+
* to depend on expo-updates or delegate control to the singleton UpdatesController.
|
|
10
|
+
*/
|
|
11
|
+
interface UpdatesInterface {
|
|
12
|
+
interface UpdateCallback {
|
|
13
|
+
fun onFailure(e: Exception?)
|
|
14
|
+
fun onSuccess(update: Update?)
|
|
15
|
+
fun onProgress(successfulAssetCount: Int, failedAssetCount: Int, totalAssetCount: Int)
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Called when a manifest has been downloaded. The return value indicates whether or not to
|
|
19
|
+
* continue downloading the update described by this manifest. Returning `false` will abort the
|
|
20
|
+
* load, and the `onSuccess` callback will be immediately called with a null `update`.
|
|
21
|
+
*/
|
|
22
|
+
fun onManifestLoaded(manifest: JSONObject): Boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface Update {
|
|
26
|
+
val manifest: JSONObject
|
|
27
|
+
val launchAssetPath: String
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var updatesInterfaceCallbacks: WeakReference<UpdatesInterfaceCallbacks>?
|
|
31
|
+
|
|
32
|
+
fun reset()
|
|
33
|
+
fun fetchUpdateWithConfiguration(configuration: HashMap<String, Any>, context: Context, callback: UpdateCallback)
|
|
34
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright © 2021 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
3
|
import Foundation
|
|
4
|
+
import ExpoModulesCore
|
|
4
5
|
|
|
5
6
|
public typealias UpdatesErrorBlock = (_ error: Error) -> Void
|
|
6
7
|
public typealias UpdatesUpdateSuccessBlock = (_ manifest: [String: Any]?) -> Void
|
|
@@ -19,7 +20,7 @@ public typealias UpdatesManifestBlock = (_ manifest: [String: Any]) -> Bool
|
|
|
19
20
|
*/
|
|
20
21
|
@objc(EXUpdatesExternalInterface)
|
|
21
22
|
public protocol UpdatesExternalInterface {
|
|
22
|
-
@objc weak var
|
|
23
|
+
@objc weak var appContext: AppContext? { get set }
|
|
23
24
|
@objc weak var updatesExternalInterfaceDelegate: (any UpdatesExternalInterfaceDelegate)? { get set }
|
|
24
25
|
@objc var launchAssetURL: URL? { get }
|
|
25
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates-interface",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Native interface for modules that optionally depend on expo-updates, e.g. expo-dev-launcher.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"author": "650 Industries, Inc.",
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"homepage": "https://docs.expo.dev
|
|
21
|
+
"homepage": "https://docs.expo.dev",
|
|
22
22
|
"dependencies": {},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"expo": "*"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4a7cf0d0baf6dfc595d93f604945d2142e705a36"
|
|
27
27
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
package expo.modules.updatesinterface;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
import org.json.JSONObject;
|
|
6
|
-
|
|
7
|
-
import java.util.HashMap;
|
|
8
|
-
import java.util.List;
|
|
9
|
-
import java.util.UUID;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Interface for modules that depend on expo-updates for loading production updates but do not want
|
|
13
|
-
* to depend on expo-updates or delegate control to the singleton UpdatesController.
|
|
14
|
-
*/
|
|
15
|
-
public interface UpdatesInterface {
|
|
16
|
-
|
|
17
|
-
interface UpdateCallback {
|
|
18
|
-
void onFailure(Exception e);
|
|
19
|
-
void onSuccess(Update update);
|
|
20
|
-
void onProgress(int successfulAssetCount, int failedAssetCount, int totalAssetCount);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Called when a manifest has been downloaded. The return value indicates whether or not to
|
|
24
|
-
* continue downloading the update described by this manifest. Returning `false` will abort the
|
|
25
|
-
* load, and the `onSuccess` callback will be immediately called with a null `update`.
|
|
26
|
-
*/
|
|
27
|
-
boolean onManifestLoaded(JSONObject manifest);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface Update {
|
|
31
|
-
JSONObject getManifest();
|
|
32
|
-
String getLaunchAssetPath();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
void reset();
|
|
36
|
-
|
|
37
|
-
void fetchUpdateWithConfiguration(HashMap<String, Object> configuration, Context context, UpdateCallback callback);
|
|
38
|
-
}
|