unimodules-app-loader 2.0.0 → 3.0.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
@@ -8,9 +8,39 @@
8
8
 
9
9
  ### 🐛 Bug fixes
10
10
 
11
- ## 2.0.0 — 2021-01-15
11
+ ### 💡 Others
12
12
 
13
- _This version does not introduce any user-facing changes._
13
+ ## 3.0.0 2021-09-28
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
22
+
23
+ ## 2.3.0-alpha.0 — 2021-08-17
24
+
25
+ ### 🎉 New features
26
+
27
+ - Use stable manifest ID where applicable. ([#12964](https://github.com/expo/expo/pull/12964) by [@wschurman](https://github.com/wschurman))
28
+
29
+ ## 2.2.0 — 2021-06-16
30
+
31
+ ### 🐛 Bug fixes
32
+
33
+ - Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))
34
+
35
+ ### 💡 Others
36
+
37
+ - Build Android code using Java 8 to fix Android instrumented test build error. ([#12939](https://github.com/expo/expo/pull/12939) by [@kudo](https://github.com/kudo))
38
+
39
+ ## 2.1.0 — 2021-03-10
40
+
41
+ ### 🎉 New features
42
+
43
+ - Updated Android build configuration to target Android 11 (added support for Android SDK 30). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))
14
44
 
15
45
  ## 2.0.0 — 2021-01-15
16
46
 
@@ -1,12 +1,23 @@
1
1
  apply plugin: 'com.android.library'
2
+ apply plugin: 'kotlin-android'
2
3
  apply plugin: 'maven'
3
4
 
4
5
  group = 'host.exp.exponent'
5
- version = '2.0.0'
6
+ version = '3.0.0'
6
7
 
7
- // Simple helper that allows the root project to override versions declared by this library.
8
- def safeExtGet(prop, fallback) {
9
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
8
+ buildscript {
9
+ // Simple helper that allows the root project to override versions declared by this library.
10
+ ext.safeExtGet = { prop, fallback ->
11
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12
+ }
13
+
14
+ repositories {
15
+ mavenCentral()
16
+ }
17
+
18
+ dependencies {
19
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
20
+ }
10
21
  }
11
22
 
12
23
  // Upload android library to maven with javadoc and android sources
@@ -35,31 +46,30 @@ uploadArchives {
35
46
  }
36
47
 
37
48
  android {
38
- compileSdkVersion safeExtGet("compileSdkVersion", 29)
49
+ compileSdkVersion safeExtGet("compileSdkVersion", 30)
50
+
51
+ compileOptions {
52
+ sourceCompatibility JavaVersion.VERSION_1_8
53
+ targetCompatibility JavaVersion.VERSION_1_8
54
+ }
39
55
 
40
56
  defaultConfig {
41
57
  minSdkVersion safeExtGet("minSdkVersion", 21)
42
- targetSdkVersion safeExtGet("targetSdkVersion", 29)
43
- versionCode 9
44
- versionName '2.0.0'
58
+ targetSdkVersion safeExtGet("targetSdkVersion", 30)
59
+ versionCode 8
60
+ versionName '3.0.0'
45
61
  }
46
62
  lintOptions {
47
63
  abortOnError false
48
64
  }
49
65
  }
50
66
 
51
- if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
52
- apply from: project(":unimodules-core").file("../unimodules-core.gradle")
53
- } else {
54
- throw new GradleException(
55
- '\'unimodules-core.gradle\' was not found in the usual React Native dependency location. ' +
56
- 'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
57
- }
58
-
59
67
  repositories {
60
68
  mavenCentral()
61
69
  }
62
70
 
63
71
  dependencies {
64
- unimodule 'unimodules-core'
72
+ api project(':expo-modules-core')
73
+
74
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
65
75
  }
@@ -10,8 +10,9 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '11.0'
13
+ s.platform = :ios, '12.0'
14
14
  s.source = { git: 'https://github.com/expo/expo.git' }
15
+ s.static_framework = true
15
16
 
16
17
  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
17
18
  s.source_files = "#{s.name}/**/*.h"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unimodules-app-loader",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "App loader for background applications",
5
5
  "keywords": [
6
6
  "react-native",
@@ -19,7 +19,7 @@
19
19
  "license": "MIT",
20
20
  "homepage": "https://github.com/expo/expo/tree/master/packages/unimodules-app-loader",
21
21
  "devDependencies": {
22
- "expo-module-scripts": "^1.2.0"
22
+ "expo-module-scripts": "^2.0.0"
23
23
  },
24
- "gitHead": "e362887ddc6ba4e3518efd623d64b3cbd301a6a9"
24
+ "gitHead": "1fffde73411ee7a642b98f1506a8de921805d52b"
25
25
  }
@@ -1,17 +0,0 @@
1
- package org.unimodules.apploader;
2
-
3
- import java.util.List;
4
-
5
- import org.unimodules.core.interfaces.Package;
6
-
7
- public interface AppLoaderPackagesProviderInterface<ReactPackageType> {
8
- /**
9
- * Returns a list of React Native packages to load.
10
- */
11
- List<ReactPackageType> getPackages();
12
-
13
- /**
14
- * Returns a list of Expo packages to load.
15
- */
16
- List<Package> getExpoPackages();
17
- }
@@ -1,50 +0,0 @@
1
- package org.unimodules.apploader;
2
-
3
- import android.content.Context;
4
- import android.content.pm.PackageManager;
5
- import android.util.Log;
6
-
7
- import java.util.HashMap;
8
- import java.util.Map;
9
-
10
- public class AppLoaderProvider {
11
-
12
- private static Map<String, HeadlessAppLoader> loaders = new HashMap<>();
13
-
14
- public static HeadlessAppLoader getLoader(String name, Context context) {
15
- if (!loaders.containsKey(name)) {
16
- try {
17
- createLoader(name, context);
18
- } catch (Exception e) {
19
- Log.e("Expo", "Cannot initialize app loader. " + e.getMessage());
20
- e.printStackTrace();
21
- return null;
22
- }
23
- }
24
- return loaders.get(name);
25
- }
26
-
27
- @SuppressWarnings("unchecked")
28
- private static void createLoader(String name, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException, java.lang.reflect.InvocationTargetException, NoSuchMethodException {
29
- Class<? extends HeadlessAppLoader> loaderClass;
30
- try {
31
- String loaderClassName = context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA).metaData.getString("org.unimodules.core.AppLoader#" + name);
32
- if (loaderClassName != null) {
33
- loaderClass = (Class<? extends HeadlessAppLoader>)Class.forName(loaderClassName);
34
- loaders.put(name, (HeadlessAppLoader) loaderClass.getDeclaredConstructor(Context.class).newInstance(context));
35
- } else {
36
- throw new IllegalStateException("Unable to instantiate AppLoader!");
37
- }
38
- } catch (PackageManager.NameNotFoundException e) {
39
- throw new IllegalStateException("Unable to instantiate AppLoader!", e);
40
- }
41
-
42
- }
43
-
44
- public static abstract class Callback {
45
-
46
- public void onComplete(boolean success, Exception exception) {
47
- // nothing
48
- }
49
- }
50
- }
@@ -1,45 +0,0 @@
1
- package org.unimodules.apploader;
2
-
3
- import android.content.Context;
4
-
5
- import org.unimodules.core.interfaces.Consumer;
6
-
7
- public interface HeadlessAppLoader {
8
-
9
- class AppConfigurationError extends Exception {
10
-
11
- public AppConfigurationError(String message) {
12
- super(message);
13
- }
14
-
15
- public AppConfigurationError(String message, Exception cause) {
16
- super(message, cause);
17
- }
18
- }
19
-
20
- void loadApp(Context context, Params params, Runnable alreadyRunning, Consumer<Boolean> callback) throws AppConfigurationError;
21
-
22
- boolean invalidateApp(String appId);
23
-
24
- boolean isRunning(String appId);
25
-
26
- final class Params {
27
- private final String appId;
28
- private final String appUrl;
29
-
30
- public Params(String appId, String appUrl) {
31
- this.appId = appId;
32
- this.appUrl = appUrl;
33
- }
34
-
35
- public String getAppId() {
36
- return appId;
37
- }
38
-
39
- public String getAppUrl() {
40
- return appUrl;
41
- }
42
-
43
- }
44
-
45
- }