@flun/node-mobile-app 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/Android /346/236/204/345/273/272/346/214/207/345/215/227.md" +315 -0
  2. package/LICENSE +29 -0
  3. package/README.md +448 -0
  4. package/bin/cli.js +49 -0
  5. package/cli-assets/server.js +37 -0
  6. package/mobileAppConfig.js +146 -0
  7. package/package.json +88 -0
  8. package/scripts/copy-files.js +37 -0
  9. package/src/commands/build.js +109 -0
  10. package/src/commands/clean.js +25 -0
  11. package/src/commands/test.js +108 -0
  12. package/src/config.js +112 -0
  13. package/src/copy.js +235 -0
  14. package/src/fingerprint.js +102 -0
  15. package/src/generate.js +102 -0
  16. package/src/install.js +144 -0
  17. package/src/patcher.js +374 -0
  18. package/src/platform-ios.js +142 -0
  19. package/src/utils.js +131 -0
  20. package/template/.prettierrc.js +5 -0
  21. package/template/.watchmanconfig +22 -0
  22. package/template/@types/nodejs-mobile-react-native/index.d.ts +9 -0
  23. package/template/App.tsx +108 -0
  24. package/template/Gemfile +17 -0
  25. package/template/android/app/build.gradle +127 -0
  26. package/template/android/app/debug.keystore +0 -0
  27. package/template/android/app/proguard-rules.pro +10 -0
  28. package/template/android/app/src/main/AndroidManifest.xml +27 -0
  29. package/template/android/app/src/main/java/com/myapp/MainActivity.kt +22 -0
  30. package/template/android/app/src/main/java/com/myapp/MainApplication.kt +27 -0
  31. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  32. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  33. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  34. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  35. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  36. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  37. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  38. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  39. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  40. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  41. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  42. package/template/android/app/src/main/res/raw/keep.xml +1 -0
  43. package/template/android/app/src/main/res/values/strings.xml +3 -0
  44. package/template/android/app/src/main/res/values/styles.xml +9 -0
  45. package/template/android/build.gradle +21 -0
  46. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  47. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  48. package/template/android/gradle.properties +49 -0
  49. package/template/android/gradlew +248 -0
  50. package/template/android/gradlew.bat +98 -0
  51. package/template/android/settings.gradle +6 -0
  52. package/template/app.json +4 -0
  53. package/template/babel.config.js +3 -0
  54. package/template/eslint.config.js +6 -0
  55. package/template/index.js +12 -0
  56. package/template/ios/.xcode.env +11 -0
  57. package/template/ios/MyApp/AppDelegate.swift +55 -0
  58. package/template/ios/MyApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  59. package/template/ios/MyApp/Images.xcassets/Contents.json +6 -0
  60. package/template/ios/MyApp/Info.plist +74 -0
  61. package/template/ios/MyApp/LaunchScreen.storyboard +47 -0
  62. package/template/ios/MyApp/PrivacyInfo.xcprivacy +37 -0
  63. package/template/ios/MyApp.xcodeproj/project.pbxproj +475 -0
  64. package/template/ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme +88 -0
  65. package/template/ios/Podfile +34 -0
  66. package/template/metro.config.js +18 -0
  67. package/template/mobileApp.runtime.d.ts +16 -0
  68. package/template/package.json +18 -0
  69. package//350/207/252/345/256/232/344/271/211libnode/346/214/207/345/215/227.md +447 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "ignore_dirs": [
3
+ ".git",
4
+ ".vs",
5
+ ".vscode",
6
+ ".idea",
7
+ "android/build",
8
+ "android/app/build",
9
+ "android/.gradle",
10
+ "android/.cxx",
11
+ "android/.kotlin",
12
+ "ios/build",
13
+ "ios/Pods",
14
+ "node-mobile-app-build",
15
+ "nodejs-assets",
16
+ "out",
17
+ "dist",
18
+ "dist-apk",
19
+ "coverage"
20
+ ],
21
+ "settle": 20
22
+ }
@@ -0,0 +1,9 @@
1
+ declare module 'nodejs-mobile-react-native' {
2
+ const start: (scriptPath: string) => void,
3
+ channel: {
4
+ send(msg: unknown): void;
5
+ addListener(event: 'message', listener: (msg: unknown) => void): void;
6
+ removeListener(event: 'message', listener: (msg: unknown) => void): void;
7
+ };
8
+ export { start, channel };
9
+ }
@@ -0,0 +1,108 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { View, Text, ActivityIndicator, StyleSheet, useColorScheme } from 'react-native';
3
+ import { WebView } from 'react-native-webview';
4
+ import * as NodeMobile from 'nodejs-mobile-react-native';
5
+ import runtime from './mobileApp.runtime';
6
+
7
+ // 背景色解析:支持以下三种配置
8
+ // '#ffffff' / 'white' 等字符串 → 固定色
9
+ // 'system' → 跟随系统(内部用默认浅/深色)
10
+ // { light: '#fff', dark: '#000' } → 按系统主题切换
11
+ const resolveBgColor = (bg: string | { light: string; dark: string }, theme: string | null | undefined): string => {
12
+ if (typeof bg === 'object' && bg !== null) {
13
+ return (theme === 'dark' ? bg.dark : bg.light) || bg.light || '#ffffff';
14
+ }
15
+ if (bg === 'system') {
16
+ return theme === 'dark' ? '#121212' : '#ffffff';
17
+ }
18
+ return bg || '#ffffff';
19
+ };
20
+
21
+ const App = () => {
22
+ const systemTheme = useColorScheme(),
23
+ [url, setUrl] = useState<string | null>(null), [failedReason, setFailedReason] = useState<string | null>(null),
24
+ [showDetail, setShowDetail] = useState(false),
25
+ styles = StyleSheet.create({
26
+ fill: { flex: 1 },
27
+ loading: { flex: 1, justifyContent: 'center', alignItems: 'center' },
28
+ errorContainer: {
29
+ flex: 1,
30
+ justifyContent: 'center',
31
+ alignItems: 'center',
32
+ padding: 24,
33
+ },
34
+ errorTitle: { fontSize: 20, fontWeight: '600', marginBottom: 16, color: '#c00' },
35
+ errorHint: { fontSize: 14, textAlign: 'center', color: '#888' },
36
+ detailToggle: { fontSize: 13, marginTop: 24, color: '#06c' },
37
+ detailText: {
38
+ fontSize: 12,
39
+ marginTop: 12,
40
+ paddingHorizontal: 16,
41
+ color: '#666',
42
+ fontFamily: 'monospace',
43
+ textAlign: 'center',
44
+ },
45
+ });
46
+ useEffect(() => {
47
+ NodeMobile.start('main.js');
48
+
49
+ const listener = (msg: unknown) => {
50
+ if (typeof msg !== 'string') return;
51
+ if (msg.startsWith('Node started on ')) {
52
+ const target = msg.slice('Node started on '.length).trim();
53
+ setFailedReason(null), setUrl(target);
54
+ } else if (msg.startsWith('Node failed: ')) {
55
+ const reason = msg.slice('Node failed: '.length).trim();
56
+ setFailedReason(reason);
57
+ }
58
+ };
59
+
60
+ NodeMobile.channel.addListener('message', listener);
61
+ return () => NodeMobile.channel.removeListener('message', listener);
62
+ }, []);
63
+
64
+ // 失败:显示错误页(用户看提示,开发者点开看详情)
65
+ if (failedReason) {
66
+ return (
67
+ <View style={styles.errorContainer}>
68
+ <Text style={styles.errorTitle}>应用启动失败</Text>
69
+ <Text style={styles.errorHint}>请稍后重试,或联系应用发布者</Text>
70
+ <Text
71
+ style={styles.detailToggle}
72
+ onPress={() => setShowDetail((v) => !v)}
73
+ >
74
+ {showDetail ? '▼ 收起详细信息' : '▶ 查看详细信息'}
75
+ </Text>
76
+ {showDetail && (
77
+ <Text style={styles.detailText}>{failedReason}</Text>
78
+ )}
79
+ </View>
80
+ );
81
+ }
82
+
83
+ // 尚未就绪:loading
84
+ if (!url) {
85
+ if (!runtime.showLoading) return <View style={styles.fill} />;
86
+ return (
87
+ <View style={styles.loading}>
88
+ <ActivityIndicator size="large" />
89
+ <Text>{runtime.loadingText}</Text>
90
+ </View>
91
+ );
92
+ }
93
+
94
+ return (
95
+ <WebView
96
+ source={{ uri: url }}
97
+ style={[styles.fill, { backgroundColor: resolveBgColor(runtime.webview.backgroundColor, systemTheme) }]}
98
+ originWhitelist={['*']}
99
+ javaScriptEnabled={runtime.webview.enableJavaScript}
100
+ domStorageEnabled={runtime.webview.enableDomStorage}
101
+ allowFileAccess={runtime.webview.allowFileAccess}
102
+ allowUniversalAccessFromFileURLs={true}
103
+ mixedContentMode={runtime.webview.mixedContentMode}
104
+ />
105
+ );
106
+ };
107
+
108
+ export { App };
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
+ ruby ">= 2.6.10"
5
+
6
+ # Exclude problematic versions of cocoapods and activesupport that causes build failures.
7
+ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8
+ gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9
+ gem 'xcodeproj', '< 1.26.0'
10
+ gem 'concurrent-ruby', '< 1.3.4'
11
+
12
+ # Ruby 3.4.0 has removed some libraries from the standard library.
13
+ gem 'bigdecimal'
14
+ gem 'logger'
15
+ gem 'benchmark'
16
+ gem 'mutex_m'
17
+ gem 'nkf'
@@ -0,0 +1,127 @@
1
+ apply plugin: "com.android.application"
2
+ apply plugin: "org.jetbrains.kotlin.android"
3
+ apply plugin: "com.facebook.react"
4
+
5
+ /**
6
+ * This is the configuration block to customize your React Native Android app.
7
+ * By default you don't need to apply any configuration, just uncomment the lines you need.
8
+ */
9
+ react {
10
+ /* Folders */
11
+ // The root of your project, i.e. where "package.json" lives. Default is '../..'
12
+ root = file("../..")
13
+ // The folder where the react-native NPM package is. Default is ../../node_modules/react-native
14
+ reactNativeDir = file("../../../node_modules/react-native")
15
+ // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
16
+ codegenDir = file("../../../node_modules/@react-native/codegen")
17
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
18
+ cliFile = file("../../../node_modules/react-native/cli.js")
19
+
20
+ // Hermes 编译器路径(RN 0.84+ 位于 hermes-compiler 包下)
21
+ def osName = System.getProperty('os.name').toLowerCase()
22
+ def osBin = osName.contains('windows') ? 'win64-bin' : (osName.contains('mac') ? 'osx-bin' : 'linux64-bin')
23
+ def hermescExt = osName.contains('windows') ? '.exe' : ''
24
+ hermesCommand = file("../../../node_modules/hermes-compiler/hermesc/${osBin}/hermesc${hermescExt}").absolutePath
25
+
26
+ /* Variants */
27
+ // The list of variants to that are debuggable. For those we're going to
28
+ // skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
29
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
30
+ // debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]
31
+
32
+ /* Bundling */
33
+ // A list containing the node command and its flags. Default is just 'node'.
34
+ // nodeExecutableAndArgs = ["node"]
35
+ //
36
+ // The command to run when bundling. By default is 'bundle'
37
+ // bundleCommand = "ram-bundle"
38
+ //
39
+ // The path to the CLI configuration file. Default is empty.
40
+ // bundleConfig = file(../rn-cli.config.js)
41
+ //
42
+ // The name of the generated asset file containing your JS bundle
43
+ // bundleAssetName = "MyApplication.android.bundle"
44
+ //
45
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
46
+ // entryFile = file("../js/MyApplication.android.js")
47
+ //
48
+ // A list of extra flags to pass to the 'bundle' commands.
49
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
50
+ // extraPackagerArgs = []
51
+
52
+ /* Hermes Commands */
53
+ // The hermes compiler command to run. By default it is 'hermesc'
54
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
55
+ //
56
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
57
+ // hermesFlags = ["-O", "-output-source-map"]
58
+
59
+ /* Autolinking */
60
+ autolinkLibrariesWithApp()
61
+ }
62
+
63
+ /**
64
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
65
+ */
66
+ def enableProguardInReleaseBuilds = false
67
+
68
+ /**
69
+ * The preferred build flavor of JavaScriptCore (JSC)
70
+ *
71
+ * For example, to use the international variant, you can use:
72
+ * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
73
+ *
74
+ * The international variant includes ICU i18n library and necessary data
75
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
76
+ * give correct results when using with locales other than en-US. Note that
77
+ * this variant is about 6MiB larger per architecture than default.
78
+ */
79
+ def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
80
+
81
+ android {
82
+ ndkVersion rootProject.ext.ndkVersion
83
+ buildToolsVersion rootProject.ext.buildToolsVersion
84
+ compileSdk rootProject.ext.compileSdkVersion
85
+
86
+ namespace "com.myapp"
87
+ defaultConfig {
88
+ applicationId "com.myapp"
89
+ minSdkVersion rootProject.ext.minSdkVersion
90
+ targetSdkVersion rootProject.ext.targetSdkVersion
91
+ manifestPlaceholders = [usesCleartextTraffic: "true"]
92
+ versionCode 1
93
+ versionName "1.0"
94
+ ndk {
95
+ abiFilters "arm64-v8a", "x86_64"
96
+ }
97
+ }
98
+ signingConfigs {
99
+ debug {
100
+ storeFile file('debug.keystore')
101
+ storePassword 'android'
102
+ keyAlias 'androiddebugkey'
103
+ keyPassword 'android'
104
+ }
105
+ }
106
+ buildTypes {
107
+ debug {
108
+ signingConfig signingConfigs.debug
109
+ }
110
+ release {
111
+ signingConfig signingConfigs.debug
112
+ minifyEnabled enableProguardInReleaseBuilds
113
+ proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
114
+ }
115
+ }
116
+ }
117
+
118
+ dependencies {
119
+ // The version of react-native is set by the React Native Gradle Plugin
120
+ implementation("com.facebook.react:react-android")
121
+
122
+ if (hermesEnabled.toBoolean()) {
123
+ implementation("com.facebook.react:hermes-android")
124
+ } else {
125
+ implementation jscFlavor
126
+ }
127
+ }
@@ -0,0 +1,10 @@
1
+ # Add project specific ProGuard rules here.
2
+ # By default, the flags in this file are appended to flags specified
3
+ # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
+ # You can edit the include path and order by changing the proguardFiles
5
+ # directive in build.gradle.
6
+ #
7
+ # For more details, see
8
+ # http://developer.android.com/guide/developing/tools/proguard.html
9
+
10
+ # Add any project specific keep options here:
@@ -0,0 +1,27 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+
3
+ <uses-permission android:name="android.permission.INTERNET" />
4
+
5
+ <application
6
+ android:name=".MainApplication"
7
+ android:label="@string/app_name"
8
+ android:icon="@mipmap/ic_launcher"
9
+ android:roundIcon="@mipmap/ic_launcher_round"
10
+ android:allowBackup="false"
11
+ android:theme="@style/AppTheme"
12
+ android:usesCleartextTraffic="${usesCleartextTraffic}"
13
+ android:supportsRtl="true">
14
+ <activity
15
+ android:name=".MainActivity"
16
+ android:label="@string/app_name"
17
+ android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
18
+ android:launchMode="singleTask"
19
+ android:windowSoftInputMode="adjustResize"
20
+ android:exported="true">
21
+ <intent-filter>
22
+ <action android:name="android.intent.action.MAIN" />
23
+ <category android:name="android.intent.category.LAUNCHER" />
24
+ </intent-filter>
25
+ </activity>
26
+ </application>
27
+ </manifest>
@@ -0,0 +1,22 @@
1
+ package com.myapp
2
+
3
+ import com.facebook.react.ReactActivity
4
+ import com.facebook.react.ReactActivityDelegate
5
+ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6
+ import com.facebook.react.defaults.DefaultReactActivityDelegate
7
+
8
+ class MainActivity : ReactActivity() {
9
+
10
+ /**
11
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
12
+ * rendering of the component.
13
+ */
14
+ override fun getMainComponentName(): String = "MyApp"
15
+
16
+ /**
17
+ * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18
+ * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19
+ */
20
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
21
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22
+ }
@@ -0,0 +1,27 @@
1
+ package com.myapp
2
+
3
+ import android.app.Application
4
+ import com.facebook.react.PackageList
5
+ import com.facebook.react.ReactApplication
6
+ import com.facebook.react.ReactHost
7
+ import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8
+ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
9
+
10
+ class MainApplication : Application(), ReactApplication {
11
+
12
+ override val reactHost: ReactHost by lazy {
13
+ getDefaultReactHost(
14
+ context = applicationContext,
15
+ packageList =
16
+ PackageList(this).packages.apply {
17
+ // Packages that cannot be autolinked yet can be added manually here, for example:
18
+ // add(MyReactNativePackage())
19
+ },
20
+ )
21
+ }
22
+
23
+ override fun onCreate() {
24
+ super.onCreate()
25
+ loadReactNative(this)
26
+ }
27
+ }
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Copyright (C) 2014 The Android Open Source Project
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+ <inset xmlns:android="http://schemas.android.com/apk/res/android"
17
+ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
+ android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
+ android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
22
+
23
+ <selector>
24
+ <!--
25
+ This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
26
+ The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
27
+ NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
28
+
29
+ <item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
30
+
31
+ For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
32
+ -->
33
+ <item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
34
+ <item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
35
+ </selector>
36
+
37
+ </inset>
@@ -0,0 +1 @@
1
+ <resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@drawable/node_modules_reactnative_libraries_logbox_ui_logboximages_close,@drawable/node_modules_reactnative_libraries_logbox_ui_logboximages_alerttriangle,@drawable/node_modules_reactnative_libraries_logbox_ui_logboximages_loader,@drawable/node_modules_reactnative_libraries_logbox_ui_logboximages_chevronleft,@drawable/node_modules_reactnative_libraries_logbox_ui_logboximages_chevronright" />
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <string name="app_name">MyApp</string>
3
+ </resources>
@@ -0,0 +1,9 @@
1
+ <resources>
2
+
3
+ <!-- Base application theme. -->
4
+ <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
5
+ <!-- Customize your theme here. -->
6
+ <item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
7
+ </style>
8
+
9
+ </resources>
@@ -0,0 +1,21 @@
1
+ buildscript {
2
+ ext {
3
+ buildToolsVersion = "37.0.0"
4
+ minSdkVersion = 24
5
+ compileSdkVersion = 37
6
+ targetSdkVersion = 36
7
+ ndkVersion = "27.1.12297006"
8
+ kotlinVersion = "2.2.0"
9
+ }
10
+ repositories {
11
+ google()
12
+ mavenCentral()
13
+ }
14
+ dependencies {
15
+ classpath("com.android.tools.build:gradle")
16
+ classpath("com.facebook.react:react-native-gradle-plugin")
17
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18
+ }
19
+ }
20
+
21
+ apply plugin: "com.facebook.react.rootproject"
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
@@ -0,0 +1,49 @@
1
+ # Project-wide Gradle settings.
2
+
3
+ # IDE (e.g. Android Studio) users:
4
+ # Gradle settings configured through the IDE *will override*
5
+ # any settings specified in this file.
6
+
7
+ # For more details on how to configure your build environment visit
8
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+ # Specifies the JVM arguments used for the daemon process.
11
+ # The setting is particularly useful for tweaking memory settings.
12
+ # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13
+ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14
+
15
+ # When configured, Gradle will run in incubating parallel mode.
16
+ # This option should only be used with decoupled projects. More details, visit
17
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
+ # org.gradle.parallel=true
19
+
20
+ # AndroidX package structure to make it clearer which packages are bundled with the
21
+ # Android operating system, and which are packaged with your app's APK
22
+ # https://developer.android.com/topic/libraries/support-library/androidx-rn
23
+ android.useAndroidX=true
24
+
25
+ # Use this property to specify which architecture you want to build.
26
+ # You can also override it from the CLI using
27
+ # ./gradlew <task> -PreactNativeArchitectures=x86_64
28
+ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
29
+
30
+ # Use this property to enable support to the new architecture.
31
+ # This will allow you to use TurboModules and the Fabric render in
32
+ # your application. You should enable this flag either if you want
33
+ # to write custom TurboModules/Fabric components OR use libraries that
34
+ # are providing them.
35
+ newArchEnabled=true
36
+
37
+ # Use this property to enable or disable the Hermes JS engine.
38
+ # If set to false, you will be using JSC instead.
39
+ hermesEnabled=true
40
+
41
+ # Use this property to enable edge-to-edge display support.
42
+ # This allows your app to draw behind system bars for an immersive UI.
43
+ # Note: Only works with ReactActivity and should not be used with custom Activity.
44
+ edgeToEdgeEnabled=true
45
+
46
+ # Opt out of built-in kotlin and new DSL behavior that ships with AGP 9.
47
+ # Starting from AGP 10.x these opt outs will be removed.
48
+ android.builtInKotlin=false
49
+ android.newDsl=false