11apply plugin : " com.android.application"
2-
2+ apply plugin : " org.jetbrains.kotlin.android "
33apply plugin : " com.facebook.react"
44
55/**
66 * This is the configuration block to customize your React Native Android app.
77 * By default you don't need to apply any configuration, just uncomment the lines you need.
88 */
99
10- project. ext. react = [
11- entryFile : " index.js" ,
12- enableHermes : true , // clean and rebuild if changing
13- ]
10+ /**
11+ * This is the configuration block to customize your React Native Android app.
12+ * By default you don't need to apply any configuration, just uncomment the lines you need.
13+ */
14+ react {
15+ /* Folders */
16+ // The root of your project, i.e. where "package.json" lives. Default is '../..'
17+ // root = file("../../")
18+ // The folder where the react-native NPM package is. Default is ../../node_modules/react-native
19+ // reactNativeDir = file("../../node_modules/react-native")
20+ // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
21+ // codegenDir = file("../../node_modules/@react-native/codegen")
22+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
23+ // cliFile = file("../../node_modules/react-native/cli.js")
24+
25+ /* Variants */
26+ // The list of variants to that are debuggable. For those we're going to
27+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
28+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
29+ // debuggableVariants = ["liteDebug", "prodDebug"]
30+
31+ /* Bundling */
32+ // A list containing the node command and its flags. Default is just 'node'.
33+ // nodeExecutableAndArgs = ["node"]
34+ //
35+ // The command to run when bundling. By default is 'bundle'
36+ // bundleCommand = "ram-bundle"
37+ //
38+ // The path to the CLI configuration file. Default is empty.
39+ // bundleConfig = file(../rn-cli.config.js)
40+ //
41+ // The name of the generated asset file containing your JS bundle
42+ // bundleAssetName = "MyApplication.android.bundle"
43+ //
44+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
45+ // entryFile = file("../js/MyApplication.android.js")
46+ //
47+ // A list of extra flags to pass to the 'bundle' commands.
48+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
49+ // extraPackagerArgs = []
50+
51+ /* Hermes Commands */
52+ // The hermes compiler command to run. By default it is 'hermesc'
53+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
54+ //
55+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
56+ // hermesFlags = ["-O", "-output-source-map"]
57+
58+ /* Autolinking */
59+ autolinkLibrariesWithApp()
60+ }
1461
1562// apply from: "../../node_modules/react-native/react.gradle"
1663
@@ -38,23 +85,14 @@ def enableProguardInReleaseBuilds = true
3885 * The preferred build flavor of JavaScriptCore.
3986 *
4087 * For example, to use the international variant, you can use:
41- * `def jscFlavor = 'org.webkit:android- jsc-intl:+' `
88+ * `def jscFlavor = io.github.react-native-community: jsc-android- intl:2026004.+ `
4289 *
4390 * The international variant includes ICU i18n library and necessary data
4491 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
45- * give correct results when using with locales other than en-US. Note that
92+ * give correct results when using with locales other than en-US. Note that
4693 * this variant is about 6MiB larger per architecture than default.
4794 */
48- def jscFlavor = ' org.webkit:android-jsc:+'
49-
50- /**
51- * Whether to enable the Hermes VM.
52- *
53- * This should be set on project.ext.react and mirrored here. If it is not set
54- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
55- * and the benefits of using Hermes will therefore be sharply reduced.
56- */
57- def enableHermes = project. ext. react. get(" enableHermes" , false );
95+ def jscFlavor = ' io.github.react-native-community:jsc-android:2026004.+'
5896
5997/**
6098 * Architectures to build native code for in debug.
@@ -75,9 +113,10 @@ if (keystorePropertiesFile.exists() && !keystorePropertiesFile.isDirectory()) {
75113
76114android {
77115 ndkVersion rootProject. ext. ndkVersion
116+ buildToolsVersion rootProject. ext. buildToolsVersion
117+ compileSdk rootProject. ext. compileSdkVersion
78118
79- compileSdkVersion rootProject. ext. compileSdkVersion
80-
119+ namespace ' fr.amicaleinsat.application'
81120 defaultConfig {
82121 applicationId ' fr.amicaleinsat.application'
83122 minSdkVersion rootProject. ext. minSdkVersion
@@ -131,14 +170,6 @@ android {
131170dependencies {
132171 // The version of react-native is set by the React Native Gradle Plugin
133172 implementation(" com.facebook.react:react-android" )
134- debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " )
135-
136- debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
137- exclude group :' com.facebook.flipper'
138- exclude group :' com.squareup.okhttp3' , module :' okhttp'
139- }
140-
141- debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ FLIPPER_VERSION} " )
142173 if (hermesEnabled. toBoolean()) {
143174 implementation(" com.facebook.react:hermes-android" )
144175 } else {
@@ -159,5 +190,3 @@ task copyDownloadableDepsToLibs(type: Copy) {
159190 from configurations. implementation
160191 into ' libs'
161192}
162-
163- apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments