@solana-mobile/seed-vault-lib 0.2.1 → 0.3.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.
@@ -1,150 +1,150 @@
1
- buildscript {
2
- // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
- def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['SolanaMobileSeedVaultLibModule_kotlinVersion']
4
-
5
- repositories {
6
- google()
7
- mavenCentral()
8
- }
9
-
10
- dependencies {
11
- classpath 'com.android.tools.build:gradle:7.4.2'
12
- // noinspection DifferentKotlinGradleVersion
13
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
- classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
15
- }
16
- }
17
-
18
- def isNewArchitectureEnabled() {
19
- return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
20
- }
21
-
22
- apply plugin: 'com.android.library'
23
- apply plugin: 'kotlin-android'
24
- apply plugin: 'kotlinx-serialization'
25
-
26
- if (isNewArchitectureEnabled()) {
27
- apply plugin: 'com.facebook.react'
28
- }
29
-
30
- def getExtOrDefault(name) {
31
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SolanaMobileSeedVaultLibModule_' + name]
32
- }
33
-
34
- def getExtOrIntegerDefault(name) {
35
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['SolanaMobileSeedVaultLibModule_' + name]).toInteger()
36
- }
37
-
38
- android {
39
- namespace "com.solanamobile.seedvault.reactnative"
40
- compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
41
-
42
- defaultConfig {
43
- minSdkVersion getExtOrIntegerDefault('minSdkVersion')
44
- targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
45
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
46
- }
47
- buildTypes {
48
- release {
49
- minifyEnabled false
50
- }
51
- }
52
-
53
- lintOptions {
54
- disable 'GradleCompatible'
55
- }
56
-
57
- compileOptions {
58
- sourceCompatibility JavaVersion.VERSION_1_8
59
- targetCompatibility JavaVersion.VERSION_1_8
60
- }
61
- }
62
-
63
- repositories {
64
- mavenCentral()
65
- google()
66
-
67
- def found = false
68
- def defaultDir = null
69
- def androidSourcesName = 'React Native sources'
70
-
71
- if (rootProject.ext.has('reactNativeAndroidRoot')) {
72
- defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
73
- } else {
74
- defaultDir = new File(
75
- projectDir,
76
- '/../../../node_modules/react-native/android'
77
- )
78
- }
79
-
80
- if (defaultDir.exists()) {
81
- maven {
82
- url defaultDir.toString()
83
- name androidSourcesName
84
- }
85
-
86
- logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
87
- found = true
88
- } else {
89
- def parentDir = rootProject.projectDir
90
-
91
- 1.upto(5, {
92
- if (found) return true
93
- parentDir = parentDir.parentFile
94
-
95
- def androidSourcesDir = new File(
96
- parentDir,
97
- 'node_modules/react-native'
98
- )
99
-
100
- def androidPrebuiltBinaryDir = new File(
101
- parentDir,
102
- 'node_modules/react-native/android'
103
- )
104
-
105
- if (androidPrebuiltBinaryDir.exists()) {
106
- maven {
107
- url androidPrebuiltBinaryDir.toString()
108
- name androidSourcesName
109
- }
110
-
111
- logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
112
- found = true
113
- } else if (androidSourcesDir.exists()) {
114
- maven {
115
- url androidSourcesDir.toString()
116
- name androidSourcesName
117
- }
118
-
119
- logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
120
- found = true
121
- }
122
- })
123
- }
124
-
125
- if (!found) {
126
- throw new GradleException(
127
- "${project.name}: unable to locate React Native android sources. " +
128
- "Ensure you have you installed React Native as a dependency in your project and try again."
129
- )
130
- }
131
- }
132
-
133
- def kotlin_version = getExtOrDefault('kotlinVersion')
134
-
135
- dependencies {
136
- //noinspection GradleDynamicVersion
137
- implementation "com.facebook.react:react-native:+" // From node_modules
138
- implementation 'com.solanamobile:seedvault-wallet-sdk:0.2.8'
139
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
140
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
141
- implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
142
- }
143
-
144
- if (isNewArchitectureEnabled()) {
145
- react {
146
- jsRootDir = file("../src/")
147
- libraryName = "SolanaMobileWSeedVaultLibModule"
148
- codegenJavaPackageName = "com.solanamobile.SeedVault.reactnative"
149
- }
150
- }
1
+ buildscript {
2
+ // Buildscript is evaluated before everything else so we can't use getExtOrDefault
3
+ def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['SolanaMobileSeedVaultLibModule_kotlinVersion']
4
+
5
+ repositories {
6
+ google()
7
+ mavenCentral()
8
+ }
9
+
10
+ dependencies {
11
+ classpath libs.versions.android.gradle
12
+ // noinspection DifferentKotlinGradleVersion
13
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
+ classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
15
+ }
16
+ }
17
+
18
+ def isNewArchitectureEnabled() {
19
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
20
+ }
21
+
22
+ apply plugin: 'com.android.library'
23
+ apply plugin: 'kotlin-android'
24
+ apply plugin: 'kotlinx-serialization'
25
+
26
+ if (isNewArchitectureEnabled()) {
27
+ apply plugin: 'com.facebook.react'
28
+ }
29
+
30
+ def getExtOrDefault(name) {
31
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SolanaMobileSeedVaultLibModule_' + name]
32
+ }
33
+
34
+ def getExtOrIntegerDefault(name) {
35
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['SolanaMobileSeedVaultLibModule_' + name]).toInteger()
36
+ }
37
+
38
+ android {
39
+ namespace "com.solanamobile.seedvault.reactnative"
40
+ compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
41
+
42
+ defaultConfig {
43
+ minSdkVersion getExtOrIntegerDefault('minSdkVersion')
44
+ targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
45
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
46
+ }
47
+ buildTypes {
48
+ release {
49
+ minifyEnabled false
50
+ }
51
+ }
52
+
53
+ lintOptions {
54
+ disable 'GradleCompatible'
55
+ }
56
+
57
+ compileOptions {
58
+ sourceCompatibility JavaVersion.VERSION_1_8
59
+ targetCompatibility JavaVersion.VERSION_1_8
60
+ }
61
+ }
62
+
63
+ repositories {
64
+ mavenCentral()
65
+ google()
66
+
67
+ def found = false
68
+ def defaultDir = null
69
+ def androidSourcesName = 'React Native sources'
70
+
71
+ if (rootProject.ext.has('reactNativeAndroidRoot')) {
72
+ defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
73
+ } else {
74
+ defaultDir = new File(
75
+ projectDir,
76
+ '/../../../node_modules/react-native/android'
77
+ )
78
+ }
79
+
80
+ if (defaultDir.exists()) {
81
+ maven {
82
+ url defaultDir.toString()
83
+ name androidSourcesName
84
+ }
85
+
86
+ logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
87
+ found = true
88
+ } else {
89
+ def parentDir = rootProject.projectDir
90
+
91
+ 1.upto(5, {
92
+ if (found) return true
93
+ parentDir = parentDir.parentFile
94
+
95
+ def androidSourcesDir = new File(
96
+ parentDir,
97
+ 'node_modules/react-native'
98
+ )
99
+
100
+ def androidPrebuiltBinaryDir = new File(
101
+ parentDir,
102
+ 'node_modules/react-native/android'
103
+ )
104
+
105
+ if (androidPrebuiltBinaryDir.exists()) {
106
+ maven {
107
+ url androidPrebuiltBinaryDir.toString()
108
+ name androidSourcesName
109
+ }
110
+
111
+ logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
112
+ found = true
113
+ } else if (androidSourcesDir.exists()) {
114
+ maven {
115
+ url androidSourcesDir.toString()
116
+ name androidSourcesName
117
+ }
118
+
119
+ logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
120
+ found = true
121
+ }
122
+ })
123
+ }
124
+
125
+ if (!found) {
126
+ throw new GradleException(
127
+ "${project.name}: unable to locate React Native android sources. " +
128
+ "Ensure you have you installed React Native as a dependency in your project and try again."
129
+ )
130
+ }
131
+ }
132
+
133
+ def kotlin_version = getExtOrDefault('kotlinVersion')
134
+
135
+ dependencies {
136
+ //noinspection GradleDynamicVersion
137
+ implementation "com.facebook.react:react-native:+" // From node_modules
138
+ implementation project(path: ':seedvault')
139
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
140
+ implementation libs.version.kotlinx.coroutines.android
141
+ implementation libs.version.kotlinx.serialization.json
142
+ }
143
+
144
+ if (isNewArchitectureEnabled()) {
145
+ react {
146
+ jsRootDir = file("../src/")
147
+ libraryName = "SolanaMobileWSeedVaultLibModule"
148
+ codegenJavaPackageName = "com.solanamobile.SeedVault.reactnative"
149
+ }
150
+ }
@@ -1,5 +1,5 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
@@ -1,4 +1,4 @@
1
- SolanaMobileSeedVaultLibModule_kotlinVersion=1.7.0
1
+ SolanaMobileSeedVaultLibModule_kotlinVersion=1.9.0
2
2
  SolanaMobileSeedVaultLibModule_minSdkVersion=21
3
3
  SolanaMobileSeedVaultLibModule_targetSdkVersion=33
4
4
  SolanaMobileSeedVaultLibModule_compileSdkVersion=33
@@ -0,0 +1,7 @@
1
+ dependencyResolutionManagement {
2
+ versionCatalogs {
3
+ libs {
4
+ from(files("../../../../gradle/libs.versions.toml"))
5
+ }
6
+ }
7
+ }
@@ -73,7 +73,7 @@ internal fun SeedVaultEvent.toWritableMap() : WritableMap = Arguments.createMap(
73
73
  Arguments.createMap().apply {
74
74
  putArray("publicKey", response.publicKey.toWritableArray())
75
75
  putString("publicKeyEncoded", response.publicKeyEncoded)
76
- putString("resolvedDerviationPath", response.resolvedDerivationPath.toString())
76
+ putString("resolvedDerivationPath", response.resolvedDerivationPath.toString())
77
77
  }
78
78
  }))
79
79
  }