expo-screen-orientation 4.1.1 → 4.3.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,6 +10,26 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 4.3.0 — 2022-07-07
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 4.2.0 — 2022-04-18
18
+
19
+ ### 💡 Others
20
+
21
+ - Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
22
+
23
+ ### ⚠️ Notices
24
+
25
+ - 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))
26
+
27
+ ## 4.1.2 - 2022-02-01
28
+
29
+ ### 🐛 Bug fixes
30
+
31
+ - Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
32
+
13
33
  ## 4.1.1 — 2021-12-08
14
34
 
15
35
  _This version does not introduce any user-facing changes._
package/README.md CHANGED
@@ -4,12 +4,12 @@ Allows you to manage the orientation of your app's interface.
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/screen-orientation.md)
8
- - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/screen-orientation/)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/screen-orientation.md)
8
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/screen-orientation/)
9
9
 
10
10
  # Installation in managed Expo projects
11
11
 
12
- For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/screen-orientation/). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
12
+ For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/screen-orientation/). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
13
13
 
14
14
  # Installation in bare React Native projects
15
15
 
@@ -1,63 +1,80 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
- apply plugin: 'maven'
3
+ apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '4.1.1'
6
+ version = '4.3.0'
7
7
 
8
8
  buildscript {
9
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10
+ if (expoModulesCorePlugin.exists()) {
11
+ apply from: expoModulesCorePlugin
12
+ applyKotlinExpoModulesCorePlugin()
13
+ }
14
+
9
15
  // Simple helper that allows the root project to override versions declared by this library.
10
16
  ext.safeExtGet = { prop, fallback ->
11
17
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12
18
  }
13
19
 
20
+ // Ensures backward compatibility
21
+ ext.getKotlinVersion = {
22
+ if (ext.has("kotlinVersion")) {
23
+ ext.kotlinVersion()
24
+ } else {
25
+ ext.safeExtGet("kotlinVersion", "1.6.10")
26
+ }
27
+ }
28
+
14
29
  repositories {
15
30
  mavenCentral()
16
31
  }
17
32
 
18
33
  dependencies {
19
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
34
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
20
35
  }
21
36
  }
22
37
 
23
- // Upload android library to maven with javadoc and android sources
24
- configurations {
25
- deployerJars
26
- }
27
-
28
38
  // Creating sources with comments
29
39
  task androidSourcesJar(type: Jar) {
30
40
  classifier = 'sources'
31
41
  from android.sourceSets.main.java.srcDirs
32
42
  }
33
43
 
34
- // Put the androidSources and javadoc to the artifacts
35
- artifacts {
36
- archives androidSourcesJar
37
- }
38
-
39
- uploadArchives {
40
- repositories {
41
- mavenDeployer {
42
- configuration = configurations.deployerJars
43
- repository(url: mavenLocal().url)
44
+ afterEvaluate {
45
+ publishing {
46
+ publications {
47
+ release(MavenPublication) {
48
+ from components.release
49
+ // Add additional sourcesJar to artifacts
50
+ artifact(androidSourcesJar)
51
+ }
52
+ }
53
+ repositories {
54
+ maven {
55
+ url = mavenLocal().url
56
+ }
44
57
  }
45
58
  }
46
59
  }
47
60
 
48
61
  android {
49
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
50
63
 
51
64
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_1_8
53
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
67
+ }
68
+
69
+ kotlinOptions {
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
54
71
  }
55
72
 
56
73
  defaultConfig {
57
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
58
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
59
76
  versionCode 7
60
- versionName '4.1.1'
77
+ versionName '4.3.0'
61
78
  }
62
79
  lintOptions {
63
80
  abortOnError false
@@ -67,5 +84,5 @@ android {
67
84
  dependencies {
68
85
  implementation project(':expo-modules-core')
69
86
 
70
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
87
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
71
88
  }
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoScreenOrientation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoScreenOrientation.d.ts","sourceRoot":"","sources":["../src/ExpoScreenOrientation.ts"],"names":[],"mappings":";AAEA,wBAA8D"}
@@ -9,3 +9,4 @@ declare const _default: {
9
9
  unlockAsync(): Promise<void>;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=ExpoScreenOrientation.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoScreenOrientation.web.d.ts","sourceRoot":"","sources":["../src/ExpoScreenOrientation.web.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;;;kDAqGmB,eAAe,GAAG,QAAQ,OAAO,CAAC;uCAG7C,QAAQ,kBAAkB,CAAC;2BAGvC,QAAQ,WAAW,CAAC;+BAQhB,eAAe,GAAG,QAAQ,IAAI,CAAC;0CAOpB,kBAAkB,GAAG,QAAQ,IAAI,CAAC;mBAIzD,QAAQ,IAAI,CAAC;;AA7BpC,wBAoDE"}
@@ -103,3 +103,4 @@ export declare function removeOrientationChangeListeners(): void;
103
103
  * on an orientation change.
104
104
  */
105
105
  export declare function removeOrientationChangeListener(subscription: Subscription): void;
106
+ //# sourceMappingURL=ScreenOrientation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenOrientation.d.ts","sourceRoot":"","sources":["../src/ScreenOrientation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAG9F,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,YAAY,GACb,CAAC;AAQF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,SAAS,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/E;AAGD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CvF;AAGD;;;;;;GAMG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAKjD;AAGD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,WAAW,CAAC,CAKhE;AAGD;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,eAAe,CAAC,CAKxE;AAGD;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAiBxF;AAGD;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAChD,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,OAAO,CAAC,CAWlB;AAaD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,yBAAyB,GAAG,YAAY,CA2B9F;AAMD;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAUvD;AAGD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAQhF"}
@@ -149,3 +149,4 @@ export declare type OrientationChangeEvent = {
149
149
  */
150
150
  orientationInfo: ScreenOrientationInfo;
151
151
  };
152
+ //# sourceMappingURL=ScreenOrientation.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenOrientation.types.d.ts","sourceRoot":"","sources":["../src/ScreenOrientation.types.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACrB;;OAEG;IACH,OAAO,IAAI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IACjC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,YAAY,CAAC;CACpC,CAAC;AAEF,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAGhF,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IACjC;;OAEG;IACH,eAAe,EAAE,qBAAqB,CAAC;CACxC,CAAC"}
@@ -3,6 +3,7 @@
3
3
  #import <UIKit/UIKit.h>
4
4
  #import <Foundation/Foundation.h>
5
5
  #import <ExpoModulesCore/ExpoModulesCore.h>
6
+ #import <ExpoModulesCore/EXSingletonModule.h>
6
7
 
7
8
  NS_ASSUME_NONNULL_BEGIN
8
9
 
@@ -3,7 +3,7 @@
3
3
  import ExpoModulesCore
4
4
 
5
5
  public class ScreenOrientationAppDelegate: ExpoAppDelegateSubscriber {
6
- public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
6
+ public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
7
7
  if let screenOrientationRegistry = ModuleRegistryProvider.getSingletonModule(for: EXScreenOrientationRegistry.self) as? EXScreenOrientationRegistry {
8
8
  screenOrientationRegistry.updateCurrentScreenOrientation()
9
9
  }
@@ -4,6 +4,6 @@ import ExpoModulesCore
4
4
 
5
5
  public class ScreenOrientationReactDelegateHandler: ExpoReactDelegateHandler {
6
6
  public override func createRootViewController(reactDelegate: ExpoReactDelegate) -> UIViewController? {
7
- return EXScreenOrientationViewController(defaultScreenOrientationFromPlist: ());
7
+ return EXScreenOrientationViewController(defaultScreenOrientationFromPlist: ())
8
8
  }
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-screen-orientation",
3
- "version": "4.1.1",
3
+ "version": "4.3.0",
4
4
  "description": "Expo universal module for managing device's screen orientation",
5
5
  "main": "build/ScreenOrientation.js",
6
6
  "types": "build/ScreenOrientation.d.ts",
@@ -36,7 +36,7 @@
36
36
  "preset": "expo-module-scripts"
37
37
  },
38
38
  "dependencies": {
39
- "@expo/config-plugins": "^4.0.2"
39
+ "@expo/config-plugins": "~5.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "expo-module-scripts": "^2.0.0"
@@ -44,5 +44,5 @@
44
44
  "peerDependencies": {
45
45
  "expo": "*"
46
46
  },
47
- "gitHead": "cf8e7fde1b19e10dd9b74a8af0e9362ae8e14001"
47
+ "gitHead": "6e131f2da851a47c3a24eb3d6fc971a1a7822086"
48
48
  }
@@ -25,9 +25,11 @@ interface ExpoConfigWithInitialOrientation extends ExpoConfig {
25
25
  initialOrientation?: OrientationMasks;
26
26
  }
27
27
 
28
- const withScreenOrientationViewController: ConfigPlugin<{
29
- initialOrientation?: keyof typeof OrientationLock;
30
- } | void> = (config, { initialOrientation = 'DEFAULT' } = {}) => {
28
+ const withScreenOrientationViewController: ConfigPlugin<
29
+ {
30
+ initialOrientation?: keyof typeof OrientationLock;
31
+ } | void
32
+ > = (config, { initialOrientation = 'DEFAULT' } = {}) => {
31
33
  config = withInfoPlist(config, (config) => {
32
34
  const extendedConfig = {
33
35
  ...config,
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "outDir": "./build"
6
6
  },
7
7
  "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*"]
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
9
9
  }