Rename android, swift and react native bindings

This commit is contained in:
Ross Savage
2024-04-30 22:46:27 +02:00
parent c8174153cb
commit 7add324b2a
86 changed files with 366 additions and 360 deletions

View File

@@ -35,12 +35,12 @@ android_library(
android_build_config(
name = "build_config",
package = "com.example.lssdk",
package = "com.example.breezliquidsdk",
)
android_resource(
name = "res",
package = "com.example.lssdk",
package = "com.example.breezliquidsdk",
res = "src/main/res",
)

View File

@@ -135,7 +135,7 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.example.lssdk"
applicationId "com.example.breezliquidsdk"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
@@ -157,7 +157,7 @@ android {
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "LiquidSwapSDKExample_appmodules"
targets "BreezLiquidSDKExample_appmodules"
// Fix for windows limit on number of character in file paths and in command lines
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
arguments "NDK_APP_SHORT_COMMANDS=true"
@@ -269,7 +269,7 @@ android {
}
dependencies {
implementation project(':breeztech_react-native-liquid-swap-sdk')
implementation project(':breeztech_react-native-breez-liquid-sdk')
implementation project(':react-native-build-config')

View File

@@ -4,7 +4,7 @@
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.example.lssdk;
package com.example.breezliquidsdk;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;

View File

@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lssdk">
package="com.example.breezliquidsdk">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

View File

@@ -1,4 +1,4 @@
package com.example.lssdk;
package com.example.breezliquidsdk;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
@@ -12,7 +12,7 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "LiquidSwapSDKExample";
return "BreezLiquidSDKExample";
}
/**

View File

@@ -1,4 +1,4 @@
package com.example.lssdk;
package com.example.breezliquidsdk;
import android.app.Application;
import android.content.Context;
@@ -9,8 +9,8 @@ import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.soloader.SoLoader;
import com.example.lssdk.newarchitecture.MainApplicationReactNativeHost;
import com.lssdk.LiquidSwapSDKPackage;
import com.example.breezliquidsdk.newarchitecture.MainApplicationReactNativeHost;
import com.breezliquidsdk.BreezLiquidSDKPackage;
import java.lang.reflect.InvocationTargetException;
@@ -31,7 +31,7 @@ public class MainApplication extends Application implements ReactApplication {
// Packages that cannot be autolinked yet can be added manually here, for
// example:
// packages.add(new MyReactNativePackage());
//packages.add(new LiquidSwapSDKPackage());
//packages.add(new BreezLiquidSDKPackage());
return packages;
}
@@ -77,7 +77,7 @@ public class MainApplication extends Application implements ReactApplication {
* We use reflection here to pick up the class that initializes Flipper,
* since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.example.lssdk.ReactNativeFlipper");
Class<?> aClass = Class.forName("com.example.breezliquidsdk.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);

View File

@@ -1,4 +1,4 @@
package com.example.lssdk.newarchitecture;
package com.example.breezliquidsdk.newarchitecture;
import android.app.Application;
import androidx.annotation.NonNull;
@@ -19,9 +19,9 @@ import com.facebook.react.fabric.CoreComponentsRegistry;
import com.facebook.react.fabric.FabricJSIModuleProvider;
import com.facebook.react.fabric.ReactNativeConfig;
import com.facebook.react.uimanager.ViewManagerRegistry;
import com.example.lssdk.BuildConfig;
import com.example.lssdk.newarchitecture.components.MainComponentsRegistry;
import com.example.lssdk.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
import com.example.breezliquidsdk.BuildConfig;
import com.example.breezliquidsdk.newarchitecture.components.MainComponentsRegistry;
import com.example.breezliquidsdk.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.example.lssdk.newarchitecture.components;
package com.example.breezliquidsdk.newarchitecture.components;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;

View File

@@ -1,4 +1,4 @@
package com.example.lssdk.newarchitecture.modules;
package com.example.breezliquidsdk.newarchitecture.modules;
import com.facebook.jni.HybridData;
import com.facebook.react.ReactPackage;
@@ -41,7 +41,7 @@ public class MainApplicationTurboModuleManagerDelegate
if (!sIsSoLibraryLoaded) {
// If you change the name of your application .so file in the Android.mk file,
// make sure you update the name here as well.
SoLoader.loadLibrary("LiquidSwapSDKExample_appmodules");
SoLoader.loadLibrary("BreezLiquidSDKExample_appmodules");
sIsSoLibraryLoaded = true;
}
}

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13)
# Define the library name here.
project(react-native-liquid-swap-sdk-example_appmodules)
project(react-native-breez-liquid-sdk-example_appmodules)
# This file includes all the necessary to let you build your application with the New Architecture.
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)

View File

@@ -14,7 +14,7 @@ class MainApplicationTurboModuleManagerDelegate
public:
// Adapt it to the package you used for your Java class.
static constexpr auto kJavaDescriptor =
"Lcom/example/lssdk/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
"Lcom/example/breezliquidsdk/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);

View File

@@ -13,7 +13,7 @@ class MainComponentsRegistry
public:
// Adapt it to the package you used for your Java class.
constexpr static auto kJavaDescriptor =
"Lcom/example/lssdk/newarchitecture/components/MainComponentsRegistry;";
"Lcom/example/breezliquidsdk/newarchitecture/components/MainComponentsRegistry;";
static void registerNatives();

View File

@@ -1,3 +1,3 @@
<resources>
<string name="app_name">LiquidSwapSDKExample</string>
<string name="app_name">BreezLiquidSDKExample</string>
</resources>

View File

@@ -1,10 +1,10 @@
rootProject.name = 'LiquidSwapSDKExample'
rootProject.name = 'BreezLiquidSDKExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
include ':breeztech_react-native-liquid-swap-sdk'
project(':breeztech_react-native-liquid-swap-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/@breeztech/react-native-liquid-swap-sdk/android')
include ':breeztech_react-native-breez-liquid-sdk'
project(':breeztech_react-native-breez-liquid-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/@breeztech/react-native-breez-liquid-sdk/android')
include ':react-native-build-config'
project(':react-native-build-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-build-config/android')