@functionland/react-native-fula 0.4.2 → 1.0.0

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.
Files changed (51) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +133 -100
  3. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  4. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  7. package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  8. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  9. package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/7.5.1/fileHashes/resourceHashesCache.bin +0 -0
  13. package/android/.gradle/7.5.1/gc.properties +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  16. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  17. package/android/.gradle/vcs-1/gc.properties +0 -0
  18. package/android/.idea/compiler.xml +5 -5
  19. package/android/.idea/gradle.xml +17 -18
  20. package/android/.idea/jarRepositories.xml +44 -49
  21. package/android/.idea/misc.xml +9 -9
  22. package/android/.idea/vcs.xml +5 -5
  23. package/android/build.gradle +69 -67
  24. package/android/gradle/wrapper/gradle-wrapper.properties +1 -0
  25. package/android/gradlew +375 -240
  26. package/android/local.properties +8 -8
  27. package/android/src/main/AndroidManifest.xml +4 -4
  28. package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
  29. package/android/src/main/java/land/fx/fula/Cryptography.java +47 -47
  30. package/android/src/main/java/land/fx/fula/FulaModule.java +701 -480
  31. package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
  32. package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
  33. package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
  34. package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
  35. package/ios/FulaModule.h +10 -10
  36. package/ios/FulaModule.m +149 -149
  37. package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
  38. package/lib/commonjs/protocols/fula.js +127 -70
  39. package/lib/commonjs/protocols/fula.js.map +1 -1
  40. package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
  41. package/lib/module/protocols/fula.js +122 -68
  42. package/lib/module/protocols/fula.js.map +1 -1
  43. package/lib/typescript/index.d.ts +1 -1
  44. package/lib/typescript/interfaces/fulaNativeModule.d.ts +28 -20
  45. package/lib/typescript/protocols/fula.d.ts +99 -77
  46. package/package.json +149 -152
  47. package/react-native-fula.podspec +19 -19
  48. package/src/interfaces/fulaNativeModule.ts +52 -42
  49. package/src/protocols/fula.ts +212 -138
  50. package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  51. package/android/.gradle/file-system.probe +0 -0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Mahdi Ghorbani
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Mahdi Ghorbani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,100 +1,133 @@
1
- # react-native-fula
2
-
3
- This package is a bridge to use the Fula protocols in the react-native. It uses WNFS to create the Merkle dag from files and folders and transfer the DAG using Graphsync to the nodes.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- npm install react-native-fula
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- import { fula } from 'react-native-fula'; // Until the library becomes stable, we suggest importing from github directly
15
- ```
16
-
17
- ```js
18
- //Initialize the fula client, which creates the libp2p connection. Note that input is not an object e.g. init('','','','noop')
19
- [
20
- peerId, //returns peerId of the created libp2p instance in form of a string of bytes
21
- cid, //return the root cid of the WNFS merkle DAG in form of a string
22
- private_ref //return the keys needed to decode hte encrypted WNFS tree in form of a string of object
23
- ]
24
- =
25
- await fula.init(
26
- identity: string, //bytes of the privateKey of did identity in string format
27
- storePath: string, // leave empty to use the default temp one
28
- bloxAddr: string, //leave empty for testing without a backend node
29
- exchange: 'noop'|'' //add noop for testing without a backend
30
- );
31
- ```
32
-
33
- ```js
34
- //Creates a Folder
35
- const cid //returns the cid of the new root. Note that on every write action the root cid changes.
36
- =
37
- await fula.mkdir(
38
- path: string // This is the Fula path to create a folder and always starts with "root/" and should not start or end with a slash e.g "root/pictures"
39
- );
40
- ```
41
-
42
- ```js
43
- //Write a local file on the device to the Fula tree (upload)
44
- const cid //returns the cid of the new root. Note that on every write action the root cid changes.
45
- =
46
- await fula.writeFile(
47
- fulaTargetFilename: string, //path to the file on the tree. It should include the filename and extension and start from the "root/". e.g. "root/pictures/cat.jpg"
48
- localFilename: string //path to the local file. e.g the file that needs to be uploaded
49
- );
50
- //// TODO: This needs to be improved by using stream to not overload the memory for large files
51
- ```
52
-
53
- ```js
54
- //reads a file on fula tree to a local file on the device (download)
55
- const localFilePath //returns the path to the local file and includes the filename
56
- =
57
- await fula.readFile(
58
- fulaTargetFilename: string, //path to the file on the tree. It should include the filename and extension and start from the "root/". e.g. "root/pictures/cat.jpg"
59
- localFilename: string //path to the local file. It should include the filename and extension. e.g. "/temp/cat.jpg"
60
- );
61
- //// TODO: This needs to be improved by using stream to not overload the memory for large files
62
- ```
63
-
64
- ```js
65
- //shows all files and folders under the specified path on Fula
66
- const fileList //returns all the files and folders in a string separated by \n
67
- =
68
- await fula.ls(
69
- path: string, //path to the folder on the tree. It always starts from the "root". e.g. "root" or "root/pictures"
70
- );
71
- //// TODO: This needs to be improved by returning an array of files and folders and in chunks to not overload hte memory for large folders
72
- ```
73
-
74
- ```js
75
- //removes all files and folders at the specified path on Fula
76
- const cid //returns the cid of the new root. Note that on every write action the root cid changes.
77
- =
78
- await fula.rm(
79
- path: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures" or "root/pictures/cat.jpg"
80
- );
81
-
82
- ```
83
-
84
- ## Roadmap
85
-
86
- Please note the following might not be done in order:
87
-
88
- - [x] Initial version with all functions included
89
- - [ ] Add WNFS tree encryption key generation from an input (deterministically)
90
- - [ ] Improve ls, read, and write functions to use a stream. ( :100: v1.0.0 Release here )
91
- - [ ] Connect to Blockchain codes using APIs
92
- - [ ] Connect to backend
93
-
94
- ## Contributing
95
-
96
- See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
97
-
98
- ## License
99
-
100
- MIT
1
+ # react-native-fula
2
+
3
+ This package is a bridge to use the Fula protocols in the react-native. It uses WNFS to create the Merkle dag from files and folders and transfer the DAG using Graphsync to the nodes.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install react-native-fula
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import { fula } from 'react-native-fula'; // Until the library becomes stable, we suggest importing from github directly
15
+ ```
16
+
17
+ ```js
18
+ //Initialize the fula client, which creates the libp2p connection. Note that input is not an object e.g. init('','','','noop')
19
+ [
20
+ peerId, //returns peerId of the created libp2p instance in form of a string of bytes
21
+ cid, //return the root cid of the WNFS merkle DAG in form of a string
22
+ private_ref //return the keys needed to decode hte encrypted WNFS tree in form of a string of object
23
+ ]
24
+ =
25
+ await fula.init(
26
+ identity: string, //bytes of the privateKey of did identity in string format
27
+ storePath: string, // leave empty to use the default temp one
28
+ bloxAddr: string, //leave empty for testing without a backend node
29
+ exchange: 'noop'|'' //add noop for testing without a backend
30
+ );
31
+ ```
32
+
33
+ ```js
34
+ //Creates a Folder
35
+ const cid //returns the cid of the new root. Note that on every write action the root cid changes.
36
+ =
37
+ await fula.mkdir(
38
+ path: string // This is the Fula path to create a folder and always starts with "root/" and should not start or end with a slash e.g "root/pictures"
39
+ );
40
+ ```
41
+
42
+ ```js
43
+ //Write a local file on the device to the Fula tree (upload). It keeps the original file modification date.
44
+ const cid //returns the cid of the new root. Note that on every write action the root cid changes.
45
+ =
46
+ await fula.writeFile(
47
+ fulaTargetFilename: string, //path to the file on the tree. It should include the filename and extension and start from the "root/". e.g. "root/pictures/cat.jpg"
48
+ localFilename: string //path to the local file. e.g the file that needs to be uploaded
49
+ );
50
+ //// TODO: This needs to be improved by using stream to not overload the memory for large files
51
+ ```
52
+
53
+ ```js
54
+ //reads a file on fula tree to a local file on the device (download)
55
+ const localFilePath //returns the path to the local file and includes the filename
56
+ =
57
+ await fula.readFile(
58
+ fulaTargetFilename: string, //path to the file on the tree. It should include the filename and extension and start from the "root/". e.g. "root/pictures/cat.jpg"
59
+ localFilename: string //path to the local file. It should include the filename and extension. e.g. "/temp/cat.jpg"
60
+ );
61
+ //// TODO: This needs to be improved by using stream to not overload the memory for large files
62
+ ```
63
+
64
+ ```js
65
+ //shows all files and folders under the specified path on Fula
66
+ const fileList //returns all the files and folders in a string separated by \n
67
+ =
68
+ await fula.ls(
69
+ path: string, //path to the folder on the tree. It always starts from the "root". e.g. "root" or "root/pictures"
70
+ );
71
+ //// TODO: This needs to be improved by returning an array of files and folders and in chunks to not overload hte memory for large folders
72
+ ```
73
+
74
+ ```js
75
+ //removes all files and folders at the specified path on Fula
76
+ const cid //returns the cid of the new root. Note that on every write action the root cid changes.
77
+ =
78
+ await fula.rm(
79
+ path: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures" or "root/pictures/cat.jpg"
80
+ );
81
+
82
+ ```
83
+
84
+ ```js
85
+ //copies the specified file or folder at sourcePath to the filename at targetPath. the path itself(apart from filename) must exist
86
+ const cid //returns the cid of the new root. Note that on every write action the root cid changes.
87
+ =
88
+ await fula.cp(
89
+ sourcePath: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures" or "root/pictures/cat.jpg"
90
+ targetPath: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures2" or "root/pictures2/cat.jpg"
91
+ );
92
+
93
+ ```
94
+
95
+ ```js
96
+ //moves the specified file or folder at sourcePath to the filename at targetPath. the path itself(apart from filename) must exist
97
+ const cid //returns the cid of the new root. Note that on every write action the root cid changes.
98
+ =
99
+ await fula.mv(
100
+ sourcePath: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures" or "root/pictures/cat.jpg"
101
+ targetPath: string, //path to the file or folder on the tree. It always starts from the "root". e.g. "root/pictures2" or "root/pictures2/cat.jpg"
102
+ );
103
+
104
+ ```
105
+
106
+ ```js
107
+ //removes all Fula related data and information (Except the encrypted filesystem) at the specified storage local path
108
+ const result //returns true if succesful and false if fails
109
+ =
110
+ await fula.logout(
111
+ identity: string, //bytes of the privateKey of did identity in string format
112
+ storePath: string, // leave empty to use the default temp one
113
+ );
114
+
115
+ ```
116
+
117
+ ## Roadmap
118
+
119
+ Please note the following might not be done in order:
120
+
121
+ - [x] Initial version with all functions included
122
+ - [x] Add WNFS tree encryption key generation from an input (deterministically)
123
+ - [x] Improve ead function to use a stream. ( :100: v1 Release here )
124
+ - [ ] Connect to Blockchain codes using APIs
125
+ - [ ] Connect to backend
126
+
127
+ ## Contributing
128
+
129
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
130
+
131
+ ## License
132
+
133
+ MIT
File without changes
File without changes
@@ -1,2 +1,2 @@
1
- #Mon Nov 28 14:42:26 EST 2022
2
- gradle.version=7.5.1
1
+ #Sun Dec 11 21:25:25 EST 2022
2
+ gradle.version=7.5.1
File without changes
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="CompilerConfiguration">
4
- <bytecodeTargetLevel target="11" />
5
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <bytecodeTargetLevel target="11" />
5
+ </component>
6
6
  </project>
@@ -1,19 +1,18 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="GradleMigrationSettings" migrationVersion="1" />
4
- <component name="GradleSettings">
5
- <option name="linkedExternalProjectsSettings">
6
- <GradleProjectSettings>
7
- <option name="testRunner" value="GRADLE" />
8
- <option name="distributionType" value="DEFAULT_WRAPPED" />
9
- <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
- <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../Gradle/gradle-7.6" />
11
- <option name="modules">
12
- <set>
13
- <option value="$PROJECT_DIR$" />
14
- </set>
15
- </option>
16
- </GradleProjectSettings>
17
- </option>
18
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GradleMigrationSettings" migrationVersion="1" />
4
+ <component name="GradleSettings">
5
+ <option name="linkedExternalProjectsSettings">
6
+ <GradleProjectSettings>
7
+ <option name="testRunner" value="GRADLE" />
8
+ <option name="distributionType" value="DEFAULT_WRAPPED" />
9
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
+ <option name="modules">
11
+ <set>
12
+ <option value="$PROJECT_DIR$" />
13
+ </set>
14
+ </option>
15
+ </GradleProjectSettings>
16
+ </option>
17
+ </component>
19
18
  </project>
@@ -1,50 +1,45 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="RemoteRepositoriesConfiguration">
4
- <remote-repository>
5
- <option name="id" value="central" />
6
- <option name="name" value="Maven Central repository" />
7
- <option name="url" value="https://repo1.maven.org/maven2" />
8
- </remote-repository>
9
- <remote-repository>
10
- <option name="id" value="jboss.community" />
11
- <option name="name" value="JBoss Community repository" />
12
- <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
13
- </remote-repository>
14
- <remote-repository>
15
- <option name="id" value="MavenRepo" />
16
- <option name="name" value="MavenRepo" />
17
- <option name="url" value="https://repo.maven.apache.org/maven2/" />
18
- </remote-repository>
19
- <remote-repository>
20
- <option name="id" value="maven" />
21
- <option name="name" value="maven" />
22
- <option name="url" value="file:/$PROJECT_DIR$/../node_modules/react-native/android/" />
23
- </remote-repository>
24
- <remote-repository>
25
- <option name="id" value="BintrayJCenter" />
26
- <option name="name" value="BintrayJCenter" />
27
- <option name="url" value="https://jcenter.bintray.com/" />
28
- </remote-repository>
29
- <remote-repository>
30
- <option name="id" value="MavenLocal" />
31
- <option name="name" value="MavenLocal" />
32
- <option name="url" value="file:/$USER_HOME$/.m2/repository" />
33
- </remote-repository>
34
- <remote-repository>
35
- <option name="id" value="Google" />
36
- <option name="name" value="Google" />
37
- <option name="url" value="https://dl.google.com/dl/android/maven2/" />
38
- </remote-repository>
39
- <remote-repository>
40
- <option name="id" value="maven2" />
41
- <option name="name" value="maven2" />
42
- <option name="url" value="https://jitpack.io" />
43
- </remote-repository>
44
- <remote-repository>
45
- <option name="id" value="MavenLocal" />
46
- <option name="name" value="MavenLocal" />
47
- <option name="url" value="file:/$USER_HOME$/.m2/repository/" />
48
- </remote-repository>
49
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="RemoteRepositoriesConfiguration">
4
+ <remote-repository>
5
+ <option name="id" value="central" />
6
+ <option name="name" value="Maven Central repository" />
7
+ <option name="url" value="https://repo1.maven.org/maven2" />
8
+ </remote-repository>
9
+ <remote-repository>
10
+ <option name="id" value="jboss.community" />
11
+ <option name="name" value="JBoss Community repository" />
12
+ <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
13
+ </remote-repository>
14
+ <remote-repository>
15
+ <option name="id" value="MavenRepo" />
16
+ <option name="name" value="MavenRepo" />
17
+ <option name="url" value="https://repo.maven.apache.org/maven2/" />
18
+ </remote-repository>
19
+ <remote-repository>
20
+ <option name="id" value="maven" />
21
+ <option name="name" value="maven" />
22
+ <option name="url" value="file:$PROJECT_DIR$/../node_modules/react-native/android/" />
23
+ </remote-repository>
24
+ <remote-repository>
25
+ <option name="id" value="BintrayJCenter" />
26
+ <option name="name" value="BintrayJCenter" />
27
+ <option name="url" value="https://jcenter.bintray.com/" />
28
+ </remote-repository>
29
+ <remote-repository>
30
+ <option name="id" value="MavenLocal" />
31
+ <option name="name" value="MavenLocal" />
32
+ <option name="url" value="file:$USER_HOME$/.m2/repository/" />
33
+ </remote-repository>
34
+ <remote-repository>
35
+ <option name="id" value="Google" />
36
+ <option name="name" value="Google" />
37
+ <option name="url" value="https://dl.google.com/dl/android/maven2/" />
38
+ </remote-repository>
39
+ <remote-repository>
40
+ <option name="id" value="maven2" />
41
+ <option name="name" value="maven2" />
42
+ <option name="url" value="https://jitpack.io" />
43
+ </remote-repository>
44
+ </component>
50
45
  </project>
@@ -1,10 +1,10 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ExternalStorageConfigurationManager" enabled="true" />
4
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
5
- <output url="file://$PROJECT_DIR$/build/classes" />
6
- </component>
7
- <component name="ProjectType">
8
- <option name="id" value="Android" />
9
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
4
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
5
+ <output url="file://$PROJECT_DIR$/build/classes" />
6
+ </component>
7
+ <component name="ProjectType">
8
+ <option name="id" value="Android" />
9
+ </component>
10
10
  </project>
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
6
  </project>
@@ -1,67 +1,69 @@
1
- buildscript {
2
- if (project == rootProject) {
3
- repositories {
4
- google()
5
- mavenCentral()
6
- jcenter()
7
- }
8
-
9
- dependencies {
10
- classpath 'com.android.tools.build:gradle:7.0.4'
11
- }
12
- }
13
- }
14
-
15
- apply plugin: 'com.android.library'
16
-
17
- def safeExtGet(prop, fallback) {
18
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
19
- }
20
-
21
- android {
22
- compileSdkVersion safeExtGet('Fula_compileSdkVersion', 31)
23
- defaultConfig {
24
- minSdkVersion safeExtGet('Fula_minSdkVersion', 26)
25
- targetSdkVersion safeExtGet('Fula_targetSdkVersion', 31)
26
- versionCode 1
27
- versionName "1.0"
28
-
29
- }
30
-
31
- buildTypes {
32
- release {
33
- minifyEnabled false
34
- }
35
- }
36
- lintOptions {
37
- disable 'GradleCompatible'
38
- }
39
- compileOptions {
40
- sourceCompatibility JavaVersion.VERSION_1_8
41
- targetCompatibility JavaVersion.VERSION_1_8
42
- }
43
- }
44
-
45
- repositories {
46
- mavenLocal()
47
- google()
48
- jcenter()
49
- mavenCentral()
50
- maven {
51
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
52
- url("$rootDir/../node_modules/react-native/android")
53
- }
54
-
55
-
56
-
57
- // Add this repo to get go-fula package
58
- maven { url 'https://jitpack.io' }
59
- }
60
-
61
- dependencies {
62
- //noinspection GradleDynamicVersion
63
- implementation "com.facebook.react:react-native:+" // From node_modules
64
- implementation 'com.github.functionland:fula-build-aar:v0.7.3' // From jitpack.io
65
- implementation 'com.github.functionland:wnfs-build-aar:v1.2.4' // From jitpack.io
66
- // implementation files('mobile.aar')
67
- }
1
+ buildscript {
2
+ if (project == rootProject) {
3
+ repositories {
4
+ google()
5
+ mavenCentral()
6
+ jcenter()
7
+ }
8
+
9
+ dependencies {
10
+ classpath 'com.android.tools.build:gradle:4.2.2'
11
+ }
12
+ }
13
+ }
14
+
15
+ apply plugin: 'com.android.library'
16
+
17
+ def safeExtGet(prop, fallback) {
18
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
19
+ }
20
+
21
+ android {
22
+ compileSdk 33
23
+ defaultConfig {
24
+ minSdkVersion safeExtGet('Fula_minSdkVersion', 26)
25
+ targetSdkVersion safeExtGet('Fula_targetSdkVersion', 31)
26
+ versionCode 1
27
+ versionName "1.0"
28
+
29
+ }
30
+
31
+ buildTypes {
32
+ release {
33
+ minifyEnabled false
34
+ }
35
+ }
36
+ lintOptions {
37
+ disable 'GradleCompatible'
38
+ }
39
+ compileOptions {
40
+ sourceCompatibility JavaVersion.VERSION_1_8
41
+ targetCompatibility JavaVersion.VERSION_1_8
42
+ }
43
+ ndkVersion '25.1.8937393'
44
+ }
45
+
46
+ repositories {
47
+ mavenLocal()
48
+ google()
49
+ jcenter()
50
+ mavenCentral()
51
+ maven {
52
+ // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
53
+ url("$rootDir/../node_modules/react-native/android")
54
+ }
55
+
56
+
57
+
58
+ // Add this repo to get go-fula package
59
+ maven { url 'https://jitpack.io' }
60
+ }
61
+
62
+ dependencies {
63
+ //noinspection GradleDynamicVersion
64
+ implementation "com.facebook.react:react-native:+" // From node_modules
65
+ implementation 'com.github.functionland:fula-build-aar:v0.7.4' // From jitpack.io
66
+ implementation 'com.github.functionland:wnfs-build-aar:v1.4.1' // From jitpack.io
67
+ implementation 'commons-io:commons-io:20030203.000550'
68
+ // implementation files('mobile.aar')
69
+ }