expo-device 4.1.1 → 4.2.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,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 4.1.1 — 2022-02-01
13
+ ## 4.2.0 — 2022-04-18
14
+
15
+ ### ⚠️ Notices
16
+
17
+ - 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))
18
+
19
+ ## 4.1.1 - 2022-02-01
14
20
 
15
21
  ### 🐛 Bug fixes
16
22
 
package/README.md CHANGED
@@ -4,12 +4,12 @@ Provides specific information about the device running the application.
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/device.md)
8
- - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/device/)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/device.md)
8
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/device/)
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/device/).
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/device/).
13
13
 
14
14
  # Installation in bare React Native projects
15
15
 
@@ -3,20 +3,35 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '4.1.1'
6
+ version = '4.2.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
 
@@ -44,22 +59,22 @@ afterEvaluate {
44
59
  }
45
60
 
46
61
  android {
47
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
48
63
 
49
64
  compileOptions {
50
- sourceCompatibility JavaVersion.VERSION_1_8
51
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
52
67
  }
53
68
 
54
69
  kotlinOptions {
55
- jvmTarget = "1.8"
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
56
71
  }
57
72
 
58
73
  defaultConfig {
59
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
60
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
61
76
  versionCode 12
62
- versionName '4.1.1'
77
+ versionName '4.2.0'
63
78
  }
64
79
  lintOptions {
65
80
  abortOnError false
@@ -72,5 +87,5 @@ dependencies {
72
87
  api 'com.facebook.device.yearclass:yearclass:2.1.0'
73
88
  api "androidx.legacy:legacy-support-v4:1.0.0"
74
89
 
75
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
90
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
76
91
  }
package/build/Device.d.ts CHANGED
@@ -24,3 +24,4 @@ export declare function isRootedExperimentalAsync(): Promise<boolean>;
24
24
  export declare function isSideLoadingEnabledAsync(): Promise<boolean>;
25
25
  export declare function getPlatformFeaturesAsync(): Promise<string[]>;
26
26
  export declare function hasPlatformFeatureAsync(feature: string): Promise<boolean>;
27
+ //# sourceMappingURL=Device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../src/Device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,OAAiD,CAAC;AACzE,eAAO,MAAM,KAAK,EAAE,MAAM,GAAG,IAA2C,CAAC;AACzE,eAAO,MAAM,YAAY,EAAE,MAAM,GAAG,IAAkD,CAAC;AACvF,eAAO,MAAM,OAAO,KAAiD,CAAC;AACtE,eAAO,MAAM,SAAS,EAAE,MAAM,GAAG,IAA+C,CAAC;AACjF,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,IAAwD,CAAC;AAC3F,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAyD,CAAC;AAC7F,eAAO,MAAM,eAAe,EAAE,MAAM,GAAG,IAAqD,CAAC;AAC7F,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAiD,CAAC;AACrF,eAAO,MAAM,yBAAyB,EAAE,MAAM,EAAE,GAAG,IAE3C,CAAC;AACT,eAAO,MAAM,MAAM,EAAE,MAAM,GAAG,IAA4C,CAAC;AAC3E,eAAO,MAAM,SAAS,EAAE,MAAM,GAAG,IAA+C,CAAC;AACjF,eAAO,MAAM,SAAS,EAAE,MAAM,GAAG,IAA+C,CAAC;AACjF,eAAO,MAAM,iBAAiB,EAAE,MAAM,GAAG,IAAuD,CAAC;AACjG,eAAO,MAAM,kBAAkB,EAAE,MAAM,GAAG,IAElC,CAAC;AACT,eAAO,MAAM,gBAAgB,EAAE,MAAM,GAAG,IAEhC,CAAC;AACT,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,IAAgD,CAAC;AAEnF,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,UAAU,CAAC,CAK9D;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAKtD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CASzD;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CAKlE;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CAKlE;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAKlE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK/E"}
@@ -5,3 +5,4 @@ export declare enum DeviceType {
5
5
  DESKTOP = 3,
6
6
  TV = 4
7
7
  }
8
+ //# sourceMappingURL=Device.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Device.types.d.ts","sourceRoot":"","sources":["../src/Device.types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,KAAK,IAAA;IACL,MAAM,IAAA;IACN,OAAO,IAAA;IACP,EAAE,IAAA;CACH"}
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoDevice.d.ts","sourceRoot":"","sources":["../src/ExpoDevice.ts"],"names":[],"mappings":";AACA,wBAA6C"}
@@ -16,3 +16,4 @@ declare const _default: {
16
16
  isRootedExperimentalAsync(): Promise<boolean>;
17
17
  };
18
18
  export default _default;
19
+ //# sourceMappingURL=ExpoDevice.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoDevice.web.d.ts","sourceRoot":"","sources":["../src/ExpoDevice.web.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;;;;;;0BAuDd,QAAQ,UAAU,CAAC;iCAgBZ,QAAQ,OAAO,CAAC;;AAzDrD,wBA4DE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-device",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "A universal module that gets physical information about the device running the application",
5
5
  "main": "build/Device.js",
6
6
  "types": "build/Device.d.ts",
@@ -41,5 +41,5 @@
41
41
  "peerDependencies": {
42
42
  "expo": "*"
43
43
  },
44
- "gitHead": "ba24eba18bf4f4d4b0d54828992d81a2bb18246a"
44
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
45
45
  }