-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Adding library support for RN 0.73 & migrating example apps. 1. [x] Migrate TestsExample 2. [x] Migrate FabricTestExample 3. [ ] Migrate Example <-- in separate PR 4. [x] Migrate lib ## Test code and steps to reproduce CI ## Checklist - [x] Ensured that CI passes --------- Co-authored-by: Mike Hardy <[email protected]> Co-authored-by: Miklós Fazekas <[email protected]> Co-authored-by: Tymoteusz Boba <[email protected]>
- Loading branch information
1 parent
d4c16b8
commit 811fe65
Showing
53 changed files
with
5,763 additions
and
6,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
FabricTestExample/android/app/src/debug/java/com/fabrictestexample/ReactNativeFlipper.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
FabricTestExample/android/app/src/main/java/com/fabrictestexample/MainActivity.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
FabricTestExample/android/app/src/main/java/com/fabrictestexample/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.fabrictestexample | ||
|
||
import com.facebook.react.ReactActivity | ||
import com.facebook.react.ReactActivityDelegate | ||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled | ||
import com.facebook.react.defaults.DefaultReactActivityDelegate | ||
|
||
class MainActivity : ReactActivity() { | ||
/** | ||
* Returns the name of the main component registered from JavaScript. This is used to schedule | ||
* rendering of the component. | ||
*/ | ||
override fun getMainComponentName(): String = "FabricTestExample" | ||
|
||
/** | ||
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] | ||
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled] | ||
*/ | ||
override fun createReactActivityDelegate(): ReactActivityDelegate = | ||
DefaultReactActivityDelegate( | ||
this, | ||
mainComponentName, // If you opted-in for the New Architecture, we enable the Fabric Renderer. | ||
fabricEnabled | ||
) | ||
} | ||
|
62 changes: 0 additions & 62 deletions
62
FabricTestExample/android/app/src/main/java/com/fabrictestexample/MainApplication.java
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
FabricTestExample/android/app/src/main/java/com/fabrictestexample/MainApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.fabrictestexample | ||
|
||
import android.app.Application | ||
import com.facebook.react.PackageList | ||
import com.facebook.react.ReactApplication | ||
import com.facebook.react.ReactHost | ||
import com.facebook.react.ReactNativeHost | ||
import com.facebook.react.ReactPackage | ||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load | ||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost | ||
import com.facebook.react.defaults.DefaultReactNativeHost | ||
import com.facebook.react.flipper.ReactNativeFlipper.initializeFlipper | ||
import com.facebook.soloader.SoLoader | ||
|
||
class MainApplication : Application(), ReactApplication { | ||
override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { | ||
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG | ||
|
||
override fun getPackages(): List<ReactPackage> { | ||
// Packages that cannot be autolinked yet can be added manually here, for example: | ||
// packages.add(new MyReactNativePackage()); | ||
return PackageList(this).packages | ||
} | ||
|
||
override fun getJSMainModuleName(): String = "index" | ||
|
||
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED | ||
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED | ||
} | ||
|
||
override val reactHost: ReactHost | ||
get() = getDefaultReactHost(this.applicationContext, reactNativeHost) | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
SoLoader.init(this, /* native exopackage */false) | ||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { | ||
// If you opted-in for the New Architecture, we load the native entry point for this app. | ||
load() | ||
} | ||
initializeFlipper(this, reactNativeHost.reactInstanceManager) | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
FabricTestExample/android/app/src/release/java/com/fabrictestexample/ReactNativeFlipper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
3 changes: 2 additions & 1 deletion
3
FabricTestExample/android/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.