@rhq/rover 0.1.1 → 0.1.3

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.
@@ -24,9 +24,17 @@ add_library(roverjsi SHARED
24
24
  find_library(LOG_LIB log)
25
25
  find_library(ANDROID_LIB android)
26
26
 
27
- target_link_libraries(roverjsi
28
- PRIVATE
29
- relay_rover
30
- ${LOG_LIB}
31
- ${ANDROID_LIB}
32
- )
27
+ if(TARGET relay_rover)
28
+ target_link_libraries(roverjsi
29
+ PRIVATE
30
+ relay_rover
31
+ ${LOG_LIB}
32
+ ${ANDROID_LIB}
33
+ )
34
+ else()
35
+ target_link_libraries(roverjsi
36
+ PRIVATE
37
+ ${LOG_LIB}
38
+ ${ANDROID_LIB}
39
+ )
40
+ endif()
@@ -1,6 +1,10 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
3
 
4
+ def safeExtGet(prop, fallback) {
5
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
6
+ }
7
+
4
8
  group = 'com.relayhq.rover'
5
9
  version = '0.1.0'
6
10
 
@@ -16,17 +20,21 @@ buildscript {
16
20
  }
17
21
 
18
22
  android {
19
- compileSdkVersion 34
23
+ compileSdkVersion safeExtGet('compileSdkVersion', 34)
20
24
  namespace "com.relayhq.rover"
21
25
 
26
+ if (rootProject.ext.has('ndkVersion')) {
27
+ ndkVersion rootProject.ext.get('ndkVersion')
28
+ }
29
+
22
30
  defaultConfig {
23
- minSdkVersion 21
24
- targetSdkVersion 34
31
+ minSdkVersion safeExtGet('minSdkVersion', 21)
32
+ targetSdkVersion safeExtGet('targetSdkVersion', 34)
25
33
  versionCode 1
26
34
  versionName "0.1.0"
27
35
 
28
36
  ndk {
29
- abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64', 'x86'
37
+ abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
30
38
  }
31
39
 
32
40
  externalNativeBuild {
@@ -61,17 +69,18 @@ repositories {
61
69
 
62
70
  dependencies {
63
71
  // Kotlin & Coroutines
64
- implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"
72
+ implementation "org.jetbrains.kotlin:kotlin-stdlib"
65
73
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
66
74
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
67
75
 
68
76
  // JNA for UniFFI bindings
69
77
  implementation "net.java.dev.jna:jna:5.14.0@aar"
70
78
 
71
- // Optional Expo Modules Core dependency
72
- compileOnly "host.exp:expo:+"
73
- compileOnly project(':expo-modules-core')
79
+ // Expo Modules Core dependency
80
+ if (findProject(':expo-modules-core') != null) {
81
+ implementation project(':expo-modules-core')
82
+ }
74
83
 
75
- // Optional React Native dependency
76
- compileOnly "com.facebook.react:react-android:+"
84
+ // React Native dependency
85
+ compileOnly "com.facebook.react:react-android"
77
86
  }
@@ -1,3 +1,2 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.relayhq.rover">
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
2
  </manifest>
@@ -2,8 +2,6 @@ package com.relayhq.rover
2
2
 
3
3
  import expo.modules.kotlin.modules.Module
4
4
  import expo.modules.kotlin.modules.ModuleDefinition
5
- import kotlinx.coroutines.Dispatchers
6
- import kotlinx.coroutines.withContext
7
5
 
8
6
  /**
9
7
  * Expo Module implementation for Relay Rover on Android.
@@ -42,15 +40,11 @@ class RoverModule : Module() {
42
40
  }
43
41
 
44
42
  AsyncFunction("processEmailAsync") { emailJson: String ->
45
- withContext(Dispatchers.Default) {
46
- RoverNativeBridge.processEmailJson(emailJson)
47
- }
43
+ RoverNativeBridge.processEmailJson(emailJson)
48
44
  }
49
45
 
50
46
  AsyncFunction("processBatchAsync") { batchJson: String ->
51
- withContext(Dispatchers.Default) {
52
- RoverNativeBridge.processBatchJson(batchJson)
53
- }
47
+ RoverNativeBridge.processBatchJson(batchJson)
54
48
  }
55
49
  }
56
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhq/rover",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "High-performance React Native and JavaScript bindings for Relay Rover Email Intelligence Engine",
5
5
  "main": "./index.js",
6
6
  "react-native": "./index.native.js",
@@ -22,9 +22,10 @@
22
22
  "eng/relay_rover.wasm",
23
23
  "expo-module.config.json",
24
24
  "Rover.podspec",
25
- "android/build.gradle",
26
- "android/CMakeLists.txt",
27
- "android/src",
25
+ "android",
26
+ "!android/.gradle",
27
+ "!android/build",
28
+ "!android/.cxx",
28
29
  "ios",
29
30
  "!ios/Pods",
30
31
  "!ios/build",