diff --git a/.env b/.env new file mode 100644 index 0000000000..0244c26b9a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +APP_CONFIG = "prod" \ No newline at end of file diff --git a/.env.benchmark b/.env.benchmark new file mode 100644 index 0000000000..fb168cff10 --- /dev/null +++ b/.env.benchmark @@ -0,0 +1 @@ +APP_CONFIG = "benchmark" \ No newline at end of file diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000000..fa1f33757d --- /dev/null +++ b/.env.dev @@ -0,0 +1 @@ +APP_CONFIG = "dev" \ No newline at end of file diff --git a/.env.mock b/.env.mock new file mode 100644 index 0000000000..722251fe97 --- /dev/null +++ b/.env.mock @@ -0,0 +1 @@ +APP_CONFIG = "mock" \ No newline at end of file diff --git a/.env.prod b/.env.prod new file mode 100644 index 0000000000..0244c26b9a --- /dev/null +++ b/.env.prod @@ -0,0 +1 @@ +APP_CONFIG = "prod" \ No newline at end of file diff --git a/.env.qa b/.env.qa new file mode 100644 index 0000000000..53a0e927af --- /dev/null +++ b/.env.qa @@ -0,0 +1 @@ +APP_CONFIG = "qa" \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index aa3bd81c74..8685be8c5c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,6 +32,7 @@ android { resourceConfigurations += ['en'] testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments clearPackageData: 'true' + resValue 'string', 'build_config_package','com.naviapp' } signingConfigs { @@ -71,6 +72,8 @@ android { } testCoverageEnabled false signingConfig signingConfigs.debug + matchingFallbacks = ['debug'] + resValue 'string', 'build_config_package','com.naviapp.dev' } benchmark { initWith release @@ -81,6 +84,7 @@ android { matchingFallbacks = ['release'] signingConfig signingConfigs.debug manifestPlaceholders = [branchMode: 'false'] + resValue 'string', 'build_config_package','com.naviapp.dev' } release { debuggable false @@ -89,6 +93,8 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'retrofit2.pro', 'gson.pro', 'alfred.pro', 'courier.pro' signingConfig signingConfigs.release manifestPlaceholders = [branchMode: 'false'] + matchingFallbacks = ['release'] + resValue 'string', 'build_config_package','com.naviapp' } } bundle { @@ -174,6 +180,7 @@ android { TRUECALLER_KEY : "yicxl1xh6jidagslpi0h9d-uklfeinnx4a6mb6rdgyi" ] resValue 'string', 'CodePushDeploymentKey', formatString('QLh2ypE_wVIAdp9rcSPIkbdxwKgPijXyGpKX_') + resValue 'string', 'build_config_package','com.naviapp.dev' } qa { isDefault true @@ -197,6 +204,7 @@ android { TRUECALLER_KEY : "yicxl1xh6jidagslpi0h9d-uklfeinnx4a6mb6rdgyi" ] resValue 'string', 'CodePushDeploymentKey', formatString('QLh2ypE_wVIAdp9rcSPIkbdxwKgPijXyGpKX_') + resValue 'string', 'build_config_package','com.naviapp.dev' } mock { dimension "app" @@ -219,6 +227,7 @@ android { TRUECALLER_KEY : "yicxl1xh6jidagslpi0h9d-uklfeinnx4a6mb6rdgyi" ] resValue "string", 'CodePushDeploymentKey', formatString('QLh2ypE_wVIAdp9rcSPIkbdxwKgPijXyGpKX_') + resValue 'string', 'build_config_package','com.naviapp.dev' } prod { dimension "app" @@ -257,6 +266,7 @@ android { TRUECALLER_KEY : "$TRUECALLER_KEY" ] resValue "string", 'CodePushDeploymentKey', formatString("$CODEPUSH_DEPLOYMENT_KEY") + resValue 'string', 'build_config_package','com.naviapp' } } } @@ -272,6 +282,13 @@ project.ext.react = [ ] +project.ext.envConfigFiles = [ + dev: ".env.dev", + qa :".env.qa", + benchmark: ".env.benchmark", + production:'.env.prod' +] + publishing { repositories { @@ -395,6 +412,8 @@ dependencies { kapt { correctErrorTypes true } + +apply from: project(':react-native-config').projectDir.getPath() + '/dotenv.gradle' apply from: new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute().text.trim(), "../sentry.gradle") apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) apply from: "../../node_modules/react-native-code-push/android/codepush.gradle" diff --git a/android/build.gradle b/android/build.gradle index e7692e7c38..e386d2ab1b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,6 +7,7 @@ buildscript { ext { compileSdkVersion = 34 minSdkVersion = 21 + targetSdkVersion = 33 } subprojects { subproject -> afterEvaluate{ diff --git a/android/navi-base/build.gradle b/android/navi-base/build.gradle index c0601a587e..904635e1bb 100644 --- a/android/navi-base/build.gradle +++ b/android/navi-base/build.gradle @@ -34,6 +34,7 @@ android { } benchmark { initWith release + matchingFallbacks = ['release'] } } compileOptions { diff --git a/android/navi-insurance/src/main/AndroidManifest.xml b/android/navi-insurance/src/main/AndroidManifest.xml index 638219a9e7..d4ab995220 100644 --- a/android/navi-insurance/src/main/AndroidManifest.xml +++ b/android/navi-insurance/src/main/AndroidManifest.xml @@ -301,7 +301,7 @@ =0.61" + }, + "peerDependenciesMeta": { + "react-native-windows": { + "optional": true + } + } + }, "node_modules/react-native-gesture-handler": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.15.0.tgz", diff --git a/package.json b/package.json index fa5bfbcfbc..832cefbf15 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,9 @@ "lodash": "^4.17.21", "lottie-react-native": "^5.1.6", "react": "^18.2.0", - "react-native": "^0.73", + "react-native": "0.73.2", "react-native-code-push": "^8.2.0", + "react-native-config": "^1.5.1", "react-native-gesture-handler": "^2.14.0", "react-native-linear-gradient": "^2.5.6", "react-native-modal": "^13.0.1", @@ -44,4 +45,4 @@ "@types/react-test-renderer": "^18.0.0", "typescript": "^5.1.6" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 868400b3c0..a1df6d9c64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4897,6 +4897,11 @@ react-native-code-push@^8.2.0: semver "^7.3.5" xcode "3.0.1" +react-native-config@^1.5.1: + version "1.5.1" + resolved "https://registry.npmjs.org/react-native-config/-/react-native-config-1.5.1.tgz" + integrity sha512-g1xNgt1tV95FCX+iWz6YJonxXkQX0GdD3fB8xQtR1GUBEqweB9zMROW77gi2TygmYmUkBI7LU4pES+zcTyK4HA== + react-native-gesture-handler@^2.14.0, "react-native-gesture-handler@>= 1.0.0": version "2.15.0" resolved "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.15.0.tgz" @@ -4961,7 +4966,7 @@ react-native-webp-format@^1.2.0: resolved "https://registry.npmjs.org/react-native-webp-format/-/react-native-webp-format-1.2.0.tgz" integrity sha512-tUL/AbM6QwUsxsGutJ1bN4RW8JdD2w5Mpj+An4DvYKkm0bKHbODj7U7gI1+8X68GqJWOy+Ps2cbVmgNpSDfRPQ== -react-native@*, "react-native@^0.0.0-0 || >=0.60 <1.0", react-native@^0.73, react-native@>=0.46, react-native@>=0.50.1, react-native@>=0.57, react-native@>=0.58, react-native@>=0.59, react-native@>=0.65.0: +react-native@*, "react-native@^0.0.0-0 || >=0.60 <1.0", react-native@>=0.46, react-native@>=0.50.1, react-native@>=0.57, react-native@>=0.58, react-native@>=0.59, react-native@>=0.65.0, react-native@0.73.2: version "0.73.2" resolved "https://registry.npmjs.org/react-native/-/react-native-0.73.2.tgz" integrity sha512-7zj9tcUYpJUBdOdXY6cM8RcXYWkyql4kMyGZflW99E5EuFPoC7Ti+ZQSl7LP9ZPzGD0vMfslwyDW0I4tPWUCFw==