Skip to content

Commit a5fff0b

Browse files
author
daibhin
committed
Rename package
1 parent 7a1007d commit a5fff0b

38 files changed

+150
-969
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Remember to add tests for your change if possible. Run the unit tests by:
5151
yarn test
5252
```
5353

54-
To edit the Objective-C files, open `example/ios/UnflowReactNativeSdkExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > unflow-react-native-sdk`.
54+
To edit the Objective-C files, open `example/ios/UnflowReactNativeExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > unflow-react-native`.
5555

56-
To edit the Kotlin files, open `example/android` in Android studio and find the source files at `unflowreactnativesdk` under `Android`.
56+
To edit the Kotlin files, open `example/android` in Android studio and find the source files at `unflowreactnative` under `Android`.
5757

5858
### Commit message convention
5959

android/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
// 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['UnflowReactNativeSdk_kotlinVersion']
3+
def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['UnflowReactNative_kotlinVersion']
44

55
repositories {
66
google()
@@ -18,11 +18,11 @@ apply plugin: 'com.android.library'
1818
apply plugin: 'kotlin-android'
1919

2020
def getExtOrDefault(name) {
21-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['UnflowReactNativeSdk_' + name]
21+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['UnflowReactNative_' + name]
2222
}
2323

2424
def getExtOrIntegerDefault(name) {
25-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['UnflowReactNativeSdk_' + name]).toInteger()
25+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['UnflowReactNative_' + name]).toInteger()
2626
}
2727

2828
android {

android/gradle.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
UnflowReactNativeSdk_kotlinVersion=1.5.31
2-
UnflowReactNativeSdk_compileSdkVersion=31
3-
UnflowReactNativeSdk_targetSdkVersion=31
1+
UnflowReactNative_kotlinVersion=1.5.31
2+
UnflowReactNative_compileSdkVersion=31
3+
UnflowReactNative_targetSdkVersion=31
44

55
android.useAndroidX=true

android/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest package="com.unflow.reactnativesdk" />
1+
<manifest package="com.unflow.reactnative" />

android/src/main/java/com/unflowreactnativesdk/UnflowModule.kt android/src/main/java/com/unflow/reactnative/UnflowModule.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.unflowreactnativesdk
1+
package com.unflow.reactnative
22

33
import com.facebook.react.bridge.*
44
import com.unflow.androidsdk.UnflowSdk

android/src/main/java/com/unflowreactnativesdk/UnflowOpenerViewManager.kt android/src/main/java/com/unflow/reactnative/UnflowOpenerViewManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.unflowreactnativesdk
1+
package com.unflow.reactnative
22

33
import android.content.Context
44
import android.content.res.Resources

android/src/main/java/com/unflowreactnativesdk/UnflowReactNativeSdkPackage.kt android/src/main/java/com/unflow/reactnative/UnflowReactNativePackage.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package com.unflowreactnativesdk
1+
package com.unflow.reactnative
22

33
import com.facebook.react.ReactPackage
44
import com.facebook.react.bridge.NativeModule
55
import com.facebook.react.bridge.ReactApplicationContext
66
import com.facebook.react.uimanager.ViewManager
77

8-
class UnflowReactNativeSdkPackage : ReactPackage {
8+
class UnflowReactNativePackage : ReactPackage {
99

1010
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
1111
return listOf(UnflowModule(reactContext))

example/android/app/_BUCK

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ android_library(
3535

3636
android_build_config(
3737
name = "build_config",
38-
package = "com.example.unflowreactnativesdk",
38+
package = "com.unflow.reactnative",
3939
)
4040

4141
android_resource(
4242
name = "res",
43-
package = "com.example.unflowreactnativesdk",
43+
package = "com.unflow.reactnative",
4444
res = "src/main/res",
4545
)
4646

example/android/app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import com.android.build.OutputFile
3737
* // bundleInBeta: true,
3838
*
3939
* // whether to disable dev mode in custom build variants (by default only disabled in release)
40-
* // for UnflowReactNativeSdkExample: to disable dev mode in the staging build type (if configured)
40+
* // for UnflowReactNativeExample: to disable dev mode in the staging build type (if configured)
4141
* devDisabledInStaging: true,
4242
* // The configuration property can be in the following formats
4343
* // 'devDisabledIn${productFlavor}${buildType}'
@@ -64,7 +64,7 @@ import com.android.build.OutputFile
6464
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
6565
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
6666
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67-
* // for UnflowReactNativeSdkExample, you might want to remove it from here.
67+
* // for UnflowReactNativeExample, you might want to remove it from here.
6868
* inputExcludes: ["android/**", "ios/**"],
6969
*
7070
* // override which node gets called and with what additional arguments
@@ -129,7 +129,7 @@ android {
129129
compileSdkVersion rootProject.ext.compileSdkVersion
130130

131131
defaultConfig {
132-
applicationId "com.example.unflowreactnativesdk"
132+
applicationId "com.unflow.reactnative"
133133
minSdkVersion rootProject.ext.minSdkVersion
134134
targetSdkVersion rootProject.ext.targetSdkVersion
135135
versionCode 1
@@ -211,7 +211,7 @@ dependencies {
211211
implementation jscFlavor
212212
}
213213

214-
implementation project(':unflowreactnativesdk')
214+
implementation project(':unflowreactnative')
215215
}
216216

217217
// Run this once to be able to run the application with BUCK

example/android/app/src/debug/java/com/example/unflowreactnativesdk/ReactNativeFlipper.java example/android/app/src/debug/java/com/unflow/reactnative/ReactNativeFlipper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
55
* directory of this source tree.
66
*/
7-
package com.example.unflowreactnativesdk;
7+
package com.unflow.reactnative;
88

99
import android.content.Context;
1010
import com.facebook.flipper.android.AndroidFlipperClient;

example/android/app/src/main/AndroidManifest.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.unflowreactnativesdk">
2+
package="com.unflow.reactnative">
33

44
<uses-permission android:name="android.permission.INTERNET" />
55

66
<application
7-
android:name=".MainApplication"
7+
android:name="com.unflow.reactnative.MainApplication"
88
android:label="@string/app_name"
99
android:icon="@mipmap/ic_launcher"
1010
android:roundIcon="@mipmap/ic_launcher_round"
1111
android:allowBackup="false"
1212
android:theme="@style/AppTheme">
1313
<activity
14-
android:name=".MainActivity"
14+
android:name="com.unflow.reactnative.MainActivity"
1515
android:label="@string/app_name"
1616
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
1717
android:launchMode="singleTask"

example/android/app/src/main/java/com/example/unflowreactnativesdk/MainActivity.java example/android/app/src/main/java/com/unflow/reactnative/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.unflowreactnativesdk;
1+
package com.unflow.reactnative;
22

33
import com.facebook.react.ReactActivity;
44

@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
1010
*/
1111
@Override
1212
protected String getMainComponentName() {
13-
return "UnflowReactNativeSdkExample";
13+
return "UnflowReactNativeExample";
1414
}
1515
}

example/android/app/src/main/java/com/example/unflowreactnativesdk/MainApplication.java example/android/app/src/main/java/com/unflow/reactnative/MainApplication.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.unflowreactnativesdk;
1+
package com.unflow.reactnative;
22

33
import android.app.Application;
44
import android.content.Context;
@@ -10,7 +10,7 @@
1010
import com.facebook.soloader.SoLoader;
1111
import java.lang.reflect.InvocationTargetException;
1212
import java.util.List;
13-
import com.unflowreactnativesdk.UnflowReactNativeSdkPackage;
13+
import com.unflow.reactnative.UnflowReactNativePackage;
1414

1515
public class MainApplication extends Application implements ReactApplication {
1616

@@ -25,9 +25,9 @@ public boolean getUseDeveloperSupport() {
2525
protected List<ReactPackage> getPackages() {
2626
@SuppressWarnings("UnnecessaryLocalVariable")
2727
List<ReactPackage> packages = new PackageList(this).getPackages();
28-
// Packages that cannot be autolinked yet can be added manually here, for UnflowReactNativeSdkExample:
28+
// Packages that cannot be autolinked yet can be added manually here, for UnflowReactNativeExample:
2929
// packages.add(new MyReactNativePackage());
30-
packages.add(new UnflowReactNativeSdkPackage());
30+
packages.add(new UnflowReactNativePackage());
3131
return packages;
3232
}
3333

@@ -61,7 +61,7 @@ private static void initializeFlipper(Context context, ReactInstanceManager reac
6161
We use reflection here to pick up the class that initializes Flipper,
6262
since Flipper library is not available in release mode
6363
*/
64-
Class<?> aClass = Class.forName("com.unflowreactnativesdkExample.ReactNativeFlipper");
64+
Class<?> aClass = Class.forName("com.unflowreactnativeExample.ReactNativeFlipper");
6565
aClass
6666
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
6767
.invoke(null, context, reactInstanceManager);
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">UnflowReactNativeSdk Example</string>
2+
<string name="app_name">UnflowReactNative Example</string>
33
</resources>

example/android/settings.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
rootProject.name = 'UnflowReactNativeSdkExample'
1+
rootProject.name = 'UnflowReactNativeExample'
22
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
33
include ':app'
44

5-
include ':unflowreactnativesdk'
6-
project(':unflowreactnativesdk').projectDir = new File(rootProject.projectDir, '../../android')
5+
include ':unflowreactnative'
6+
project(':unflowreactnative').projectDir = new File(rootProject.projectDir, '../../android')

example/app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "UnflowReactNativeSdkExample",
3-
"displayName": "UnflowReactNativeSdk Example"
2+
"name": "UnflowReactNativeExample",
3+
"displayName": "UnflowReactNative Example"
44
}

example/ios/File.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// File.swift
3-
// UnflowReactNativeSdkExample
3+
// UnflowReactNativeExample
44
//
55

66
import Foundation

example/ios/Podfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require_relative "../node_modules/@react-native-community/cli-platform-ios/nativ
44
platform :ios, "11.0"
55
use_frameworks!
66

7-
target "UnflowReactNativeSdkExample" do
7+
target "UnflowReactNativeExample" do
88
config = use_native_modules!
99

1010
use_react_native!(
@@ -13,7 +13,7 @@ target "UnflowReactNativeSdkExample" do
1313
:hermes_enabled => false,
1414
)
1515

16-
pod "unflow-react-native-sdk", :path => "../.."
16+
pod "unflow-react-native", :path => "../.."
1717

1818
# Enables Flipper.
1919
#

0 commit comments

Comments
 (0)