Skip to content

Commit b20e6d2

Browse files
committed
refactor: rename to react-native-libsodium
1 parent 794e1ce commit b20e6d2

51 files changed

Lines changed: 339 additions & 340 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ Remember to add tests for your change if possible. Run the unit tests by:
5353
yarn test
5454
```
5555

56-
To edit the Objective-C or Swift files, open `example/ios/RnlibsodiumExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-rnlibsodium`.
57-
58-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-rnlibsodium` under `Android`.
56+
To edit the Objective-C or Swift files, open `example/ios/LibsodiumExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-libsodium`.
5957

58+
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-libsodium` under `Android`.
6059

6160
### Commit message convention
6261

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# react-native-rnlibsodium
1+
# react-native-libsodium
22

33
React Native bindings to Libsodium
44

55
## Installation
66

77
```sh
8-
npm install react-native-rnlibsodium
8+
npm install react-native-libsodium
99
```
1010

1111
## Usage
1212

1313
```js
14-
import { multiply } from 'react-native-rnlibsodium';
14+
import { multiply } from 'react-native-libsodium';
1515

1616
// ...
1717

android/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set (CMAKE_CXX_STANDARD 11)
55

66
add_library(cpp
77
SHARED
8-
../cpp/react-native-rnlibsodium.cpp
8+
../cpp/react-native-libsodium.cpp
99
cpp-adapter.cpp
1010
)
1111

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ if (isNewArchitectureEnabled()) {
2020
}
2121

2222
def getExtOrDefault(name) {
23-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Rnlibsodium_' + name]
23+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Libsodium_' + name]
2424
}
2525

2626
def getExtOrIntegerDefault(name) {
27-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['Rnlibsodium_' + name]).toInteger()
27+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['Libsodium_' + name]).toInteger()
2828
}
2929

3030
android {
@@ -144,7 +144,7 @@ dependencies {
144144
if (isNewArchitectureEnabled()) {
145145
react {
146146
jsRootDir = file("../src/")
147-
libraryName = "Rnlibsodium"
148-
codegenJavaPackageName = "com.rnlibsodium"
147+
libraryName = "Libsodium"
148+
codegenJavaPackageName = "com.libsodium"
149149
}
150150
}

android/cpp-adapter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include <jni.h>
2-
#include "react-native-rnlibsodium.h"
2+
#include "react-native-libsodium.h"
33

44
extern "C"
55
JNIEXPORT jint JNICALL
6-
Java_com_rnlibsodium_RnlibsodiumModule_nativeMultiply(JNIEnv *env, jclass type, jdouble a, jdouble b) {
7-
return rnlibsodium::multiply(a, b);
6+
Java_com_libsodium_LibsodiumModule_nativeMultiply(JNIEnv *env, jclass type, jdouble a, jdouble b) {
7+
return libsodium::multiply(a, b);
88
}

android/gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Rnlibsodium_kotlinVersion=1.7.0
2-
Rnlibsodium_minSdkVersion=21
3-
Rnlibsodium_targetSdkVersion=31
4-
Rnlibsodium_compileSdkVersion=31
5-
Rnlibsodium_ndkversion=21.4.7075529
1+
Libsodium_kotlinVersion=1.7.0
2+
Libsodium_minSdkVersion=21
3+
Libsodium_targetSdkVersion=31
4+
Libsodium_compileSdkVersion=31
5+
Libsodium_ndkversion=21.4.7075529
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rnlibsodium">
2+
package="com.libsodium">
33

44
</manifest>

android/src/main/java/com/rnlibsodium/RnlibsodiumModule.java renamed to android/src/main/java/com/rnlibsodium/LibsodiumModule.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.rnlibsodium;
1+
package com.libsodium;
22

33
import androidx.annotation.NonNull;
44

@@ -8,11 +8,11 @@
88
import com.facebook.react.bridge.ReactMethod;
99
import com.facebook.react.module.annotations.ReactModule;
1010

11-
@ReactModule(name = RnlibsodiumModule.NAME)
12-
public class RnlibsodiumModule extends ReactContextBaseJavaModule {
13-
public static final String NAME = "Rnlibsodium";
11+
@ReactModule(name = LibsodiumModule.NAME)
12+
public class LibsodiumModule extends ReactContextBaseJavaModule {
13+
public static final String NAME = "Libsodium";
1414

15-
public RnlibsodiumModule(ReactApplicationContext reactContext) {
15+
public LibsodiumModule(ReactApplicationContext reactContext) {
1616
super(reactContext);
1717
}
1818

android/src/main/java/com/rnlibsodium/RnlibsodiumPackage.java renamed to android/src/main/java/com/rnlibsodium/LibsodiumPackage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.rnlibsodium;
1+
package com.libsodium;
22

33
import androidx.annotation.NonNull;
44

@@ -11,12 +11,12 @@
1111
import java.util.Collections;
1212
import java.util.List;
1313

14-
public class RnlibsodiumPackage implements ReactPackage {
14+
public class LibsodiumPackage implements ReactPackage {
1515
@NonNull
1616
@Override
1717
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
1818
List<NativeModule> modules = new ArrayList<>();
19-
modules.add(new RnlibsodiumModule(reactContext));
19+
modules.add(new LibsodiumModule(reactContext));
2020
return modules;
2121
}
2222

0 commit comments

Comments
 (0)