From 8aca4bbd2d6c502014aa3bc1a24dbe40d9b39f2f Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Fri, 8 Dec 2023 12:43:58 -0500 Subject: [PATCH 1/6] Fix comment about adding packages in android template --- .../app/src/main/java/com/helloworld/MainApplication.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index 5c868b449d9087..93cd8664d5e389 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -17,7 +17,9 @@ class MainApplication : Application(), ReactApplication { object : DefaultReactNativeHost(this) { override fun getPackages(): List { // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); + // val packages = PackageList(this).packages + // packages.add(MyReactNativePackage()) + // return packages return PackageList(this).packages } From 17d58f84b7fea28e59981d9212be8a44875073b7 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Fri, 8 Dec 2023 13:41:18 -0500 Subject: [PATCH 2/6] Update packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt Co-authored-by: Nicola Corti --- .../app/src/main/java/com/helloworld/MainApplication.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index 93cd8664d5e389..e22794e806e54f 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -17,10 +17,10 @@ class MainApplication : Application(), ReactApplication { object : DefaultReactNativeHost(this) { override fun getPackages(): List { // Packages that cannot be autolinked yet can be added manually here, for example: - // val packages = PackageList(this).packages - // packages.add(MyReactNativePackage()) - // return packages - return PackageList(this).packages + return PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } } override fun getJSMainModuleName(): String = "index" From 72107deb7cfff8db91bb49bb10c4876bc02b74e8 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Fri, 8 Dec 2023 13:42:55 -0500 Subject: [PATCH 3/6] Update MainApplication.kt --- .../app/src/main/java/com/helloworld/MainApplication.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index e22794e806e54f..b60db09211865a 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -16,9 +16,8 @@ class MainApplication : Application(), ReactApplication { override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { override fun getPackages(): List { - // Packages that cannot be autolinked yet can be added manually here, for example: return PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: + // Packages that cannot be autolinked yet can be added manually here, for example: // add(MyReactNativePackage()) } } From 34b994cb74bd80fb21fca27e5e75323efe3f73c4 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Fri, 8 Dec 2023 13:43:26 -0500 Subject: [PATCH 4/6] Update MainApplication.kt From 4e5257213cc554bfaff2dd28ee6137ba1c612951 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 12 Dec 2023 11:40:45 -0500 Subject: [PATCH 5/6] Update MainApplication.kt --- .../src/main/java/com/helloworld/MainApplication.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index b60db09211865a..363edddb91efa1 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -15,12 +15,11 @@ class MainApplication : Application(), ReactApplication { override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { - override fun getPackages(): List { - return PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - } + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + add(TWAppTurboReactPackage()) + } override fun getJSMainModuleName(): String = "index" From cab12a227597d2c1fc9110653eac097cca99691a Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 12 Dec 2023 12:24:51 -0500 Subject: [PATCH 6/6] Update packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt Co-authored-by: Nicola Corti --- .../android/app/src/main/java/com/helloworld/MainApplication.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt index 363edddb91efa1..a2f5caca408e10 100644 --- a/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt +++ b/packages/react-native/template/android/app/src/main/java/com/helloworld/MainApplication.kt @@ -18,7 +18,7 @@ class MainApplication : Application(), ReactApplication { override fun getPackages(): List = PackageList(this).packages.apply { // Packages that cannot be autolinked yet can be added manually here, for example: - add(TWAppTurboReactPackage()) + // add(MyReactNativePackage()) } override fun getJSMainModuleName(): String = "index"