@mentra/bluetooth-sdk 3.4.0-dev.1030 → 3.4.0-dev.1035
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/README.md +22 -4
- package/android/build.gradle +43 -6
- package/android/gradle.properties +3 -0
- package/android/settings.gradle +47 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/package.json +2 -2
- package/src/generated/releaseMetadata.ts +5 -5
package/README.md
CHANGED
|
@@ -865,10 +865,28 @@ MentraOS repo root:
|
|
|
865
865
|
./scripts/check-android-compile.sh bluetooth-sdk
|
|
866
866
|
```
|
|
867
867
|
|
|
868
|
-
The
|
|
869
|
-
|
|
870
|
-
`
|
|
871
|
-
|
|
868
|
+
The check script prepares `mobile/android` and uses its Gradle wrapper with
|
|
869
|
+
`-PmentraPublicSdk=true`, matching the CI release workflow's public SDK
|
|
870
|
+
dependency mode. Inside an Expo app, the `android/` folder in this package is
|
|
871
|
+
included by autolinking as `:mentra-bluetooth-sdk`.
|
|
872
|
+
|
|
873
|
+
A plain Android app can also build the native SDK from a MentraOS checkout,
|
|
874
|
+
without publishing it to Maven local, through a Gradle composite build. In the
|
|
875
|
+
app's `settings.gradle.kts`:
|
|
876
|
+
|
|
877
|
+
```kotlin
|
|
878
|
+
includeBuild("/path/to/MentraOS/mobile/modules/bluetooth-sdk/android") {
|
|
879
|
+
dependencySubstitution {
|
|
880
|
+
substitute(module("com.mentraglass:bluetooth-sdk")).using(project(":"))
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
```
|
|
884
|
+
|
|
885
|
+
The app keeps its `com.mentraglass:bluetooth-sdk` dependency; Gradle replaces it
|
|
886
|
+
with the source build. This standalone build has the same dependencies as the
|
|
887
|
+
Maven Central artifact (`-PmentraPublicSdk=true` is its default) and leaves out
|
|
888
|
+
the Expo adapter classes, which need an Expo host. It needs the Android NDK for
|
|
889
|
+
`lc3Lib`.
|
|
872
890
|
|
|
873
891
|
For bare native iOS or macOS apps, use the public SwiftPM repository:
|
|
874
892
|
|
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,14 @@ apply plugin: 'signing'
|
|
|
8
8
|
def packageJson = new JsonSlurper().parse(file("../package.json"))
|
|
9
9
|
def mavenGroupId = 'com.mentraglass'
|
|
10
10
|
def mavenPublishVersion = (findProperty('mentraMavenVersion') ?: System.getenv('MENTRA_MAVEN_VERSION') ?: packageJson.version).toString()
|
|
11
|
-
|
|
11
|
+
// Inside an Expo host such as the MentraOS app, autolinking provides
|
|
12
|
+
// :expo-modules-core. Without it, this directory is the root of a standalone
|
|
13
|
+
// build (settings.gradle), for example a composite build in a plain Android app.
|
|
14
|
+
// expo-modules-core has no prebuilt Android artifact to resolve instead, so a
|
|
15
|
+
// standalone build leaves out the Expo adapter classes and defaults to the
|
|
16
|
+
// public Maven artifact's dependency shape.
|
|
17
|
+
def standaloneBuild = findProject(':expo-modules-core') == null
|
|
18
|
+
def publicMavenSdk = (findProperty('mentraPublicSdk') ?: System.getenv('MENTRA_PUBLIC_SDK') ?: standaloneBuild.toString()).toString().toBoolean()
|
|
12
19
|
|
|
13
20
|
// Download Sherpa-ONNX Android AAR from the upstream GitHub release and stage
|
|
14
21
|
// it as a Maven artifact in a tiny on-disk repository under libs/maven/.
|
|
@@ -181,10 +188,35 @@ gradle.taskGraph.whenReady {
|
|
|
181
188
|
}
|
|
182
189
|
}
|
|
183
190
|
|
|
184
|
-
|
|
185
|
-
apply
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
if (standaloneBuild) {
|
|
192
|
+
apply plugin: 'kotlin-android'
|
|
193
|
+
// Java 17 bytecode, as in the MentraOS app build.
|
|
194
|
+
android {
|
|
195
|
+
compileOptions {
|
|
196
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
197
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
kotlin {
|
|
201
|
+
compilerOptions {
|
|
202
|
+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// Expo adapters, compiled only inside an Expo host (see expo-module.config.json).
|
|
206
|
+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
|
207
|
+
exclude(
|
|
208
|
+
'**/com/mentra/bluetoothsdk/BluetoothSdkModule.kt',
|
|
209
|
+
'**/com/mentra/bluetoothsdk/MentraLocalNetworkModule.kt',
|
|
210
|
+
'**/com/mentra/bluetoothsdk/otaserver/MentraOtaServerModule.kt',
|
|
211
|
+
'**/com/mentra/bluetoothsdk/photoreceiver/MentraPhotoReceiverModule.kt'
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
216
|
+
apply from: expoModulesCorePlugin
|
|
217
|
+
applyKotlinExpoModulesCorePlugin()
|
|
218
|
+
useExpoPublishing()
|
|
219
|
+
}
|
|
188
220
|
|
|
189
221
|
// Hosts that embed @mentra/crust compile with Kotlin 2.3 (its QuickJS library
|
|
190
222
|
// requires it). Keep the public Maven artifact usable from Kotlin 2.1 builds:
|
|
@@ -225,6 +257,9 @@ if (useManagedAndroidSdkVersions) {
|
|
|
225
257
|
|
|
226
258
|
android {
|
|
227
259
|
namespace "com.mentra.bluetoothsdk"
|
|
260
|
+
buildFeatures {
|
|
261
|
+
buildConfig true
|
|
262
|
+
}
|
|
228
263
|
defaultConfig {
|
|
229
264
|
versionCode 1
|
|
230
265
|
versionName project.version
|
|
@@ -255,7 +290,9 @@ android {
|
|
|
255
290
|
dependencies {
|
|
256
291
|
// Expo adapter class is compiled into the MentraOS module, but the bare SDK
|
|
257
292
|
// artifact should not expose Expo as a runtime dependency.
|
|
258
|
-
|
|
293
|
+
if (!standaloneBuild) {
|
|
294
|
+
compileOnly project(':expo-modules-core')
|
|
295
|
+
}
|
|
259
296
|
|
|
260
297
|
// Kotlin standard library (explicitly added for IDE support)
|
|
261
298
|
// Version is managed by Expo modules, but explicit dependency helps IDE indexing
|
package/android/settings.gradle
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
// Standalone build of the Bluetooth SDK's Android library, used when this
|
|
2
|
+
// directory is the root of a Gradle build: for example a plain Android app that
|
|
3
|
+
// consumes the SDK from source through a composite build,
|
|
4
|
+
// includeBuild("<MentraOS>/mobile/modules/bluetooth-sdk/android")
|
|
5
|
+
// with com.mentraglass:bluetooth-sdk substituted by project(":").
|
|
6
|
+
// The MentraOS app (an Expo host) ignores this file: Expo autolinking adds this
|
|
7
|
+
// directory as :mentra-bluetooth-sdk, and the SDK's config plugin adds :lc3Lib
|
|
8
|
+
// and :silero to the host's own settings.gradle.
|
|
9
|
+
|
|
10
|
+
gradle.rootProject { project ->
|
|
11
|
+
// Same versions as the MentraOS app's generated Android project. AGP refuses
|
|
12
|
+
// two versions in one composite build, so when this build is included in an
|
|
13
|
+
// app, use the AGP version on that app's root build classpath.
|
|
14
|
+
def androidGradlePluginVersion = '8.12.0'
|
|
15
|
+
def appGradle = gradle.parent
|
|
16
|
+
if (appGradle != null) {
|
|
17
|
+
try {
|
|
18
|
+
androidGradlePluginVersion = appGradle.rootProject.buildscript.classLoader
|
|
19
|
+
.loadClass('com.android.Version')
|
|
20
|
+
.getField('ANDROID_GRADLE_PLUGIN_VERSION')
|
|
21
|
+
.get(null)
|
|
22
|
+
} catch (ClassNotFoundException ignored) {
|
|
23
|
+
// The app does not load AGP in its root build; keep the default.
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
project.buildscript {
|
|
28
|
+
repositories {
|
|
29
|
+
google()
|
|
30
|
+
mavenCentral()
|
|
31
|
+
}
|
|
32
|
+
dependencies {
|
|
33
|
+
classpath "com.android.tools.build:gradle:${androidGradlePluginVersion}"
|
|
34
|
+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
gradle.beforeProject { project ->
|
|
40
|
+
project.repositories {
|
|
41
|
+
google()
|
|
42
|
+
mavenCentral()
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
rootProject.name = 'mentra-bluetooth-sdk'
|
|
47
|
+
|
|
1
48
|
include ':lc3Lib'
|
|
2
49
|
|
|
3
50
|
include ':silero'
|
|
@@ -3,9 +3,9 @@ package com.mentra.bluetoothsdk
|
|
|
3
3
|
/** Generated by release CI. Do not edit in a release checkout. */
|
|
4
4
|
internal object GeneratedReleaseMetadata {
|
|
5
5
|
const val FAMILY_BASE_VERSION: String = "3.4.0"
|
|
6
|
-
const val RELEASE_IDENTITY: String = "3.4.0-dev.
|
|
7
|
-
const val RELEASE_SET_ID: String = "mentra-3.4.0-dev.
|
|
8
|
-
const val SOURCE_COMMIT: String = "
|
|
9
|
-
const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.
|
|
10
|
-
const val OTA_MANIFEST_SHA256: String = "
|
|
6
|
+
const val RELEASE_IDENTITY: String = "3.4.0-dev.1035"
|
|
7
|
+
const val RELEASE_SET_ID: String = "mentra-3.4.0-dev.1035"
|
|
8
|
+
const val SOURCE_COMMIT: String = "4006948eb2cdb8165663773ed45cf1ff49a12f1f"
|
|
9
|
+
const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1035.json"
|
|
10
|
+
const val OTA_MANIFEST_SHA256: String = "09c7aecd6a52a9ff668a068ba78438341332739bf6e91cb4d4a0c64881a086b6"
|
|
11
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.4.0",
|
|
4
|
-
"releaseIdentity": "3.4.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.4.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.4.0-dev.1035",
|
|
5
|
+
"releaseSetId": "mentra-3.4.0-dev.1035",
|
|
6
|
+
"sourceCommit": "4006948eb2cdb8165663773ed45cf1ff49a12f1f",
|
|
7
|
+
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1035.json",
|
|
8
|
+
"otaManifestSha256": "09c7aecd6a52a9ff668a068ba78438341332739bf6e91cb4d4a0c64881a086b6"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,gBAAgB;IACnC,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.4.0\",\n \"releaseIdentity\": \"3.4.0-dev.
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,gBAAgB;IACnC,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,kIAAkI;IACpJ,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.4.0\",\n \"releaseIdentity\": \"3.4.0-dev.1035\",\n \"releaseSetId\": \"mentra-3.4.0-dev.1035\",\n \"sourceCommit\": \"4006948eb2cdb8165663773ed45cf1ff49a12f1f\",\n \"otaManifestUrl\": \"https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1035.json\",\n \"otaManifestSha256\": \"09c7aecd6a52a9ff668a068ba78438341332739bf6e91cb4d4a0c64881a086b6\"\n})\n"]}
|
|
@@ -16,7 +16,7 @@ enum BluetoothSdkDefaults {
|
|
|
16
16
|
/// silently disable it on every pair the app touches.
|
|
17
17
|
static let autoPowerOffEnabled = false
|
|
18
18
|
private static let infoSdkVersionKey = "MentraBluetoothSdkVersion"
|
|
19
|
-
private static let swiftPackageSdkVersion = "3.4.0-dev.
|
|
19
|
+
private static let swiftPackageSdkVersion = "3.4.0-dev.1035"
|
|
20
20
|
private static let swiftPackageSdkVersionPlaceholder = "__MENTRA" + "_BLUETOOTH_SDK_VERSION__"
|
|
21
21
|
|
|
22
22
|
private static func normalizedSdkVersion(_ value: String?) -> String? {
|
|
@@ -3,9 +3,9 @@ import Foundation
|
|
|
3
3
|
/// Generated by release CI. Do not edit in a release checkout.
|
|
4
4
|
enum GeneratedReleaseMetadata {
|
|
5
5
|
static let familyBaseVersion = "3.4.0"
|
|
6
|
-
static let releaseIdentity = "3.4.0-dev.
|
|
7
|
-
static let releaseSetId = "mentra-3.4.0-dev.
|
|
8
|
-
static let sourceCommit = "
|
|
9
|
-
static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.
|
|
10
|
-
static let otaManifestSha256 = "
|
|
6
|
+
static let releaseIdentity = "3.4.0-dev.1035"
|
|
7
|
+
static let releaseSetId = "mentra-3.4.0-dev.1035"
|
|
8
|
+
static let sourceCommit = "4006948eb2cdb8165663773ed45cf1ff49a12f1f"
|
|
9
|
+
static let otaManifestUrl = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1035.json"
|
|
10
|
+
static let otaManifestSha256 = "09c7aecd6a52a9ff668a068ba78438341332739bf6e91cb4d4a0c64881a086b6"
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentra/bluetooth-sdk",
|
|
3
|
-
"version": "3.4.0-dev.
|
|
3
|
+
"version": "3.4.0-dev.1035",
|
|
4
4
|
"description": "SDK for communicating with smart glasses",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"registry": "https://registry.npmjs.org/"
|
|
116
116
|
},
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@mentra/cloud-protocol": "3.4.0-dev.
|
|
118
|
+
"@mentra/cloud-protocol": "3.4.0-dev.1035"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@types/node": "^25.9.3",
|
|
@@ -12,9 +12,9 @@ export interface BluetoothSdkReleaseMetadata {
|
|
|
12
12
|
export const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({
|
|
13
13
|
"schemaVersion": 1,
|
|
14
14
|
"familyBaseVersion": "3.4.0",
|
|
15
|
-
"releaseIdentity": "3.4.0-dev.
|
|
16
|
-
"releaseSetId": "mentra-3.4.0-dev.
|
|
17
|
-
"sourceCommit": "
|
|
18
|
-
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.
|
|
19
|
-
"otaManifestSha256": "
|
|
15
|
+
"releaseIdentity": "3.4.0-dev.1035",
|
|
16
|
+
"releaseSetId": "mentra-3.4.0-dev.1035",
|
|
17
|
+
"sourceCommit": "4006948eb2cdb8165663773ed45cf1ff49a12f1f",
|
|
18
|
+
"otaManifestUrl": "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.4.0/mentra-live-ota-3.4.0-dev.1035.json",
|
|
19
|
+
"otaManifestSha256": "09c7aecd6a52a9ff668a068ba78438341332739bf6e91cb4d4a0c64881a086b6"
|
|
20
20
|
})
|