expo-device 5.9.4 → 6.0.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
CHANGED
|
@@ -10,21 +10,30 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 6.0.1 — 2024-04-23
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 6.0.0 — 2024-04-18
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- `Device.productName` now returns `Build.PRODUCT` instead of `Build.DEVICE`. ([#27230](https://github.com/expo/expo/pull/27230) by [@alex-fournier](https://github.com/alex-fournier))
|
|
14
22
|
|
|
15
23
|
### 💡 Others
|
|
16
24
|
|
|
17
25
|
- [iOS] Add privacy manifest describing required reason API usage. ([#27770](https://github.com/expo/expo/pull/27770) by [@aleqsio](https://github.com/aleqsio))
|
|
26
|
+
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
|
|
18
27
|
|
|
19
|
-
## 5.9.3
|
|
28
|
+
## 5.9.3 - 2024-01-18
|
|
20
29
|
|
|
21
30
|
_This version does not introduce any user-facing changes._
|
|
22
31
|
|
|
23
|
-
## 5.9.2
|
|
32
|
+
## 5.9.2 - 2024-01-10
|
|
24
33
|
|
|
25
34
|
_This version does not introduce any user-facing changes._
|
|
26
35
|
|
|
27
|
-
## 5.9.1
|
|
36
|
+
## 5.9.1 - 2023-12-19
|
|
28
37
|
|
|
29
38
|
_This version does not introduce any user-facing changes._
|
|
30
39
|
|
package/android/build.gradle
CHANGED
|
@@ -1,111 +1,24 @@
|
|
|
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 = '
|
|
4
|
+
version = '6.0.1'
|
|
7
5
|
|
|
8
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
useExpoPublishing()
|
|
15
|
-
useCoreDependencies()
|
|
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.device"
|
|
95
15
|
defaultConfig {
|
|
96
16
|
versionCode 12
|
|
97
|
-
versionName '
|
|
17
|
+
versionName '6.0.1'
|
|
98
18
|
}
|
|
99
19
|
}
|
|
100
20
|
|
|
101
21
|
dependencies {
|
|
102
|
-
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
103
|
-
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
104
|
-
implementation project(':expo-modules-core')
|
|
105
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
22
|
api 'com.facebook.device.yearclass:yearclass:2.1.0'
|
|
109
23
|
api "androidx.legacy:legacy-support-v4:1.0.0"
|
|
110
|
-
|
|
111
24
|
}
|
|
@@ -41,7 +41,7 @@ class DeviceModule : Module() {
|
|
|
41
41
|
"manufacturer" to Build.MANUFACTURER,
|
|
42
42
|
"modelName" to Build.MODEL,
|
|
43
43
|
"designName" to Build.DEVICE,
|
|
44
|
-
"productName" to Build.
|
|
44
|
+
"productName" to Build.PRODUCT,
|
|
45
45
|
"deviceYearClass" to deviceYearClass,
|
|
46
46
|
"totalMemory" to run {
|
|
47
47
|
val memoryInfo = ActivityManager.MemoryInfo()
|
|
@@ -66,20 +66,20 @@ class DeviceModule : Module() {
|
|
|
66
66
|
)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
AsyncFunction("getDeviceTypeAsync") {
|
|
69
|
+
AsyncFunction<Int>("getDeviceTypeAsync") {
|
|
70
70
|
return@AsyncFunction getDeviceType(context).JSValue
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
AsyncFunction("getUptimeAsync") {
|
|
73
|
+
AsyncFunction<Double>("getUptimeAsync") {
|
|
74
74
|
return@AsyncFunction SystemClock.uptimeMillis().toDouble()
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
AsyncFunction("getMaxMemoryAsync") {
|
|
77
|
+
AsyncFunction<Double>("getMaxMemoryAsync") {
|
|
78
78
|
val maxMemory = Runtime.getRuntime().maxMemory()
|
|
79
|
-
return@AsyncFunction if (maxMemory != Long.MAX_VALUE) maxMemory.toDouble() else -1
|
|
79
|
+
return@AsyncFunction if (maxMemory != Long.MAX_VALUE) maxMemory.toDouble() else -1.0
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
AsyncFunction("isRootedExperimentalAsync") {
|
|
82
|
+
AsyncFunction<Boolean>("isRootedExperimentalAsync") {
|
|
83
83
|
val isRooted: Boolean
|
|
84
84
|
val isDevice = !isRunningOnEmulator
|
|
85
85
|
|
|
@@ -97,7 +97,7 @@ class DeviceModule : Module() {
|
|
|
97
97
|
return@AsyncFunction isRooted
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
AsyncFunction("isSideLoadingEnabledAsync") {
|
|
100
|
+
AsyncFunction<Boolean>("isSideLoadingEnabledAsync") {
|
|
101
101
|
return@AsyncFunction if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
|
102
102
|
Settings.Global.getInt(
|
|
103
103
|
context.applicationContext.contentResolver,
|
|
@@ -109,7 +109,7 @@ class DeviceModule : Module() {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
AsyncFunction("getPlatformFeaturesAsync") {
|
|
112
|
+
AsyncFunction<List<String>>("getPlatformFeaturesAsync") {
|
|
113
113
|
val allFeatures = context.applicationContext.packageManager.systemAvailableFeatures
|
|
114
114
|
return@AsyncFunction allFeatures.filterNotNull().map { it.name }
|
|
115
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-device",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
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": "
|
|
44
|
+
"gitHead": "ee4f30ef3b5fa567ad1bf94794197f7683fdd481"
|
|
45
45
|
}
|