apply plugin: "com.android.application" apply plugin: 'com.google.gms.google-services' apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" apply plugin: "com.facebook.react" /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. */ react { /* Folders */ // The root of your project, i.e. where "package.json" lives. Default is '..' // root = file("../") // The folder where the react-native NPM package is. Default is ../node_modules/react-native // reactNativeDir = file("../node_modules/react-native") // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen // codegenDir = file("../node_modules/@react-native/codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js // cliFile = file("../node_modules/react-native/cli.js") /* Variants */ // The list of variants to that are debuggable. For those we're going to // skip the bundling of the JS bundle and the assets. By default is just 'debug'. // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. // debuggableVariants = ["liteDebug", "prodDebug"] /* Bundling */ // A list containing the node command and its flags. Default is just 'node'. // nodeExecutableAndArgs = ["node"] // // The command to run when bundling. By default is 'bundle' // bundleCommand = "ram-bundle" // // The path to the CLI configuration file. Default is empty. // bundleConfig = file(../rn-cli.config.js) // // The name of the generated asset file containing your JS bundle // bundleAssetName = "MyApplication.android.bundle" // // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' // entryFile = file("../js/MyApplication.android.js") // // A list of extra flags to pass to the 'bundle' commands. // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle // extraPackagerArgs = [] /* Hermes Commands */ // The hermes compiler command to run. By default it is 'hermesc' // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] // Add these for Android 14 compatibility extraPackagerArgs = [ "--minSdkVersion=23", "--targetSdkVersion=34" ] } /** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ def enableProguardInReleaseBuilds = false /** * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` */ def jscFlavor = 'org.webkit:android-jsc:+' android { ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion namespace "com.project.yondu.unioilloyaltyapp" defaultConfig { applicationId "com.project.yondu.unioilloyaltyapp" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 49 versionName "1.7.19" multiDexEnabled true // Required for Android 14 compatibility vectorDrawables.useSupportLibrary = true generatedDensities = [] } compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } aaptOptions { additionalParameters "--no-version-vectors" } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } } buildTypes { debug { signingConfig signingConfigs.debug } release { signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } buildFeatures { buildConfig true // Enable BuildConfig generation } packagingOptions { // Standard React Native picks pickFirst 'lib/armeabi-v7a/libc++_shared.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' // Critical for Reanimated + Hermes pickFirst 'lib/**/libreanimated.so' pickFirst 'lib/**/libhermes.so' pickFirst 'lib/**/libfbjni.so' // Safety exclusions exclude 'META-INF/proguard/**' exclude 'META-INF/*.version' } lintOptions { abortOnError false disable 'InvalidPackage', 'OldTargetApi' } } dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") // implementation "com.facebook.react:react-native:0.72.5" // Firebase and other libraries implementation platform("com.google.firebase:firebase-bom:30.5.0") implementation "com.google.firebase:firebase-analytics" implementation "com.google.firebase:firebase-messaging" // implementation "com.airbnb.android:lottie:6.1.0" implementation 'com.android.support:multidex:2.0.1' implementation 'com.facebook.soloader:soloader:0.10.4' implementation project(':react-native-location') implementation "com.google.android.gms:play-services-location:21.0.1" implementation "androidx.core:core-ktx:1.12.0" implementation "androidx.appcompat:appcompat:1.6.1" implementation("com.github.dhaval2404:imagepicker:2.1") implementation project(':lottie-react-native') implementation project(':react-native-async-storage_async-storage') implementation project(':react-native-blob-util') implementation project(':react-native-reanimated') implementation project(':react-native-gesture-handler') debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' } debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } } configurations.all { resolutionStrategy { force "com.facebook.react:react-native:0.72.5" // Force specific versions of problematic dependencies force "org.jetbrains.kotlin:kotlin-stdlib:1.7.22" force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.22" force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22" } } tasks.whenTaskAdded { task -> if (task.name == 'packageDebugResources') { task.dependsOn ':react-native-community_art:generateDebugResValues' task.dependsOn ':react-native-community_art:compileDebugRenderscript' } } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle") applyNativeModulesAppBuildGradle(project)