expo-updates-interface 0.5.1 → 0.6.0

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 CHANGED
@@ -10,7 +10,17 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 0.5.1 — 2022-02-01
13
+ ## 0.6.0 — 2022-04-18
14
+
15
+ ### 🎉 New features
16
+
17
+ - Add controller registry in order to support dev client auto-setup with updates integration on iOS. ([#16230](https://github.com/expo/expo/pull/16230) by [@esamelson](https://github.com/esamelson))
18
+
19
+ ### ⚠️ Notices
20
+
21
+ - On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
22
+
23
+ ## 0.5.1 - 2022-02-01
14
24
 
15
25
  ### 🐛 Bug fixes
16
26
 
@@ -4,20 +4,35 @@ apply plugin: 'kotlin-android-extensions'
4
4
  apply plugin: 'maven-publish'
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '0.5.1'
7
+ version = '0.6.0'
8
8
 
9
9
  buildscript {
10
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
11
+ if (expoModulesCorePlugin.exists()) {
12
+ apply from: expoModulesCorePlugin
13
+ applyKotlinExpoModulesCorePlugin()
14
+ }
15
+
10
16
  // Simple helper that allows the root project to override versions declared by this library.
11
17
  ext.safeExtGet = { prop, fallback ->
12
18
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
13
19
  }
14
20
 
21
+ // Ensures backward compatibility
22
+ ext.getKotlinVersion = {
23
+ if (ext.has("kotlinVersion")) {
24
+ ext.kotlinVersion()
25
+ } else {
26
+ ext.safeExtGet("kotlinVersion", "1.6.10")
27
+ }
28
+ }
29
+
15
30
  repositories {
16
31
  mavenCentral()
17
32
  }
18
33
 
19
34
  dependencies {
20
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "1.3.50")}")
35
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
21
36
  }
22
37
  }
23
38
 
@@ -45,18 +60,22 @@ afterEvaluate {
45
60
  }
46
61
 
47
62
  android {
48
- compileSdkVersion safeExtGet("compileSdkVersion", 29)
63
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
49
64
 
50
65
  compileOptions {
51
- sourceCompatibility JavaVersion.VERSION_1_8
52
- targetCompatibility JavaVersion.VERSION_1_8
66
+ sourceCompatibility JavaVersion.VERSION_11
67
+ targetCompatibility JavaVersion.VERSION_11
68
+ }
69
+
70
+ kotlinOptions {
71
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
53
72
  }
54
73
 
55
74
  defaultConfig {
56
75
  minSdkVersion safeExtGet("minSdkVersion", 21)
57
- targetSdkVersion safeExtGet("targetSdkVersion", 28)
76
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
58
77
  versionCode 1
59
- versionName '0.5.1'
78
+ versionName '0.6.0'
60
79
  }
61
80
  lintOptions {
62
81
  abortOnError false
@@ -68,5 +87,5 @@ repositories {
68
87
  }
69
88
 
70
89
  dependencies {
71
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet("kotlinVersion", "1.3.50")}"
90
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
72
91
  }
@@ -0,0 +1,16 @@
1
+ // Copyright © 2022-present 650 Industries. All rights reserved.
2
+
3
+ #import <EXUpdatesInterface/EXUpdatesExternalInterface.h>
4
+
5
+ /**
6
+ * Simple singleton registry that holds a reference to a single controller implementing
7
+ * EXUpdatesExternalInterface. This allows modules (like expo-dev-launcher) to acccess such a
8
+ * controller without their podspec needing to declare a dependency on expo-updates.
9
+ */
10
+ @interface EXUpdatesControllerRegistry : NSObject
11
+
12
+ @property (nonatomic, weak) id<EXUpdatesExternalInterface> controller;
13
+
14
+ + (instancetype)sharedInstance;
15
+
16
+ @end
@@ -0,0 +1,19 @@
1
+ // Copyright © 2022-present 650 Industries. All rights reserved.
2
+
3
+ #import <EXUpdatesInterface/EXUpdatesControllerRegistry.h>
4
+
5
+ @implementation EXUpdatesControllerRegistry
6
+
7
+ + (instancetype)sharedInstance
8
+ {
9
+ static EXUpdatesControllerRegistry *theRegistry;
10
+ static dispatch_once_t once;
11
+ dispatch_once(&once, ^{
12
+ if (!theRegistry) {
13
+ theRegistry = [[EXUpdatesControllerRegistry alloc] init];
14
+ }
15
+ });
16
+ return theRegistry;
17
+ }
18
+
19
+ @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-updates-interface",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
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": [
@@ -23,5 +23,5 @@
23
23
  "peerDependencies": {
24
24
  "expo": "*"
25
25
  },
26
- "gitHead": "ba24eba18bf4f4d4b0d54828992d81a2bb18246a"
26
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
27
27
  }