@keystonehq/react-native-keystone-wallet-core 0.1.0 → 0.1.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.
@@ -1,53 +1,80 @@
1
+ import com.android.Version
2
+
1
3
  buildscript {
2
- repositories {
3
- google()
4
- mavenCentral()
5
- }
6
- dependencies {
7
- classpath "com.android.tools.build:gradle:8.11.0"
8
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"
9
- }
4
+ ext.safeExtGet = { prop, fallback ->
5
+ def props = (prop instanceof String) ? [prop] : prop
6
+ def result = props.find { key ->
7
+ return rootProject.ext.has(key)
8
+ }
9
+ return result ? rootProject.ext.get(result) : fallback
10
+ }
11
+ repositories {
12
+ google()
13
+ mavenCentral()
14
+ }
15
+ dependencies {
16
+ classpath("com.android.tools.build:gradle:8.11.0")
17
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
18
+ }
10
19
  }
11
20
 
12
21
  apply plugin: "com.android.library"
13
22
  apply plugin: "kotlin-android"
14
23
 
24
+ def resolveReactNativeDirectory() {
25
+ def userDefinedRnDirPath = rootProject.ext.has("REACT_NATIVE_NODE_MODULES_DIR") ? rootProject.ext.get("REACT_NATIVE_NODE_MODULES_DIR") : null
26
+ if (userDefinedRnDirPath != null) {
27
+ return file(userDefinedRnDirPath)
28
+ }
29
+
30
+ File standardRnDirFile = file("$rootDir/../node_modules/react-native/")
31
+ if (standardRnDirFile.exists()) {
32
+ return standardRnDirFile
33
+ }
34
+
35
+ return file("$projectDir/../node_modules/react-native/")
36
+ }
37
+
38
+ def reactNativeRootDir = resolveReactNativeDirectory()
39
+
15
40
  android {
16
- compileSdkVersion 34
17
- namespace "com.reactnativekeystonewalletcore"
18
-
19
- defaultConfig {
20
- minSdkVersion 24
21
- targetSdkVersion 34
22
- versionCode 1
23
- versionName "1.0"
24
- }
25
-
26
- buildTypes {
27
- release {
28
- minifyEnabled false
29
- }
30
- }
31
- lintOptions {
32
- disable "GradleCompatible"
33
- }
34
- compileOptions {
35
- sourceCompatibility JavaVersion.VERSION_1_8
36
- targetCompatibility JavaVersion.VERSION_1_8
37
- }
41
+ compileSdkVersion safeExtGet("compileSdkVersion", 34)
42
+ namespace "com.reactnativekeystonewalletcore"
43
+
44
+ defaultConfig {
45
+ minSdkVersion safeExtGet("minSdkVersion", 24)
46
+ targetSdkVersion safeExtGet("targetSdkVersion", 34)
47
+ versionCode 1
48
+ versionName "1.0"
49
+ }
50
+
51
+ buildTypes {
52
+ release {
53
+ minifyEnabled false
54
+ }
55
+ }
56
+ lintOptions {
57
+ abortOnError false
58
+ disable "GradleCompatible"
59
+ }
60
+ compileOptions {
61
+ sourceCompatibility JavaVersion.VERSION_17
62
+ targetCompatibility JavaVersion.VERSION_17
63
+ }
38
64
  }
39
65
 
40
66
  repositories {
41
- mavenCentral()
42
- google()
67
+ mavenCentral()
68
+ google()
43
69
  }
44
70
 
45
71
  dependencies {
46
- implementation "com.facebook.react:react-native:+"
47
- implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.0"
48
-
49
- // Dependencies from KeystoneWalletCoreWrapper AAR
50
- implementation files("libs/KeystoneWalletCoreWrapper-release.aar")
51
- implementation "net.java.dev.jna:jna:5.13.0@aar"
52
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
72
+ implementation "com.facebook.react:react-native:+"
73
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.24"
74
+
75
+ // Dependencies required by the included bindings and libs
76
+ // Note: We are now including the source (bindings) and libs (.so) directly
77
+ // instead of depending on the KeystoneWalletCoreWrapper AAR.
78
+ implementation "net.java.dev.jna:jna:5.13.0@aar"
79
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
53
80
  }