moonyeju
2023-11-14
[FEAT] fogapp
@e97f5a476c7d18c48c8d6994625efd29d1677f64
+++ .buckconfig
... | ... | @@ -0,0 +1,6 @@ |
1 | + | |
2 | +[android] | |
3 | + target = Google Inc.:Google APIs:23 | |
4 | + | |
5 | +[maven_repositories] | |
6 | + central = https://repo1.maven.org/maven2 |
+++ .bundle/config
... | ... | @@ -0,0 +1,2 @@ |
1 | +BUNDLE_PATH: "vendor/bundle" | |
2 | +BUNDLE_FORCE_RUBY_PLATFORM: 1 |
+++ .eslintrc.js
... | ... | @@ -0,0 +1,7 @@ |
1 | +module.exports = { | |
2 | + root: true, | |
3 | + extends: '@react-native', | |
4 | + parser: '@babel/eslint-parser', | |
5 | + parserOptions: {requireConfigFile: 'false'}, | |
6 | + babelOptions: {configFile: './.babelrc'}, | |
7 | +}; |
+++ .flowconfig
... | ... | @@ -0,0 +1,66 @@ |
1 | +[ignore] | |
2 | +; We fork some components by platform | |
3 | +.*/*[.]android.js | |
4 | + | |
5 | +; Ignore "BUCK" generated dirs | |
6 | +<PROJECT_ROOT>/\.buckd/ | |
7 | + | |
8 | +; Ignore polyfills | |
9 | +node_modules/react-native/Libraries/polyfills/.* | |
10 | + | |
11 | +; Flow doesn't support platforms | |
12 | +.*/Libraries/Utilities/LoadingView.js | |
13 | + | |
14 | +.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ | |
15 | + | |
16 | +[untyped] | |
17 | +.*/node_modules/@react-native-community/cli/.*/.* | |
18 | + | |
19 | +[include] | |
20 | + | |
21 | +[libs] | |
22 | +node_modules/react-native/interface.js | |
23 | +node_modules/react-native/flow/ | |
24 | + | |
25 | +[options] | |
26 | +emoji=true | |
27 | + | |
28 | +exact_by_default=true | |
29 | + | |
30 | +format.bracket_spacing=false | |
31 | + | |
32 | +module.file_ext=.js | |
33 | +module.file_ext=.json | |
34 | +module.file_ext=.ios.js | |
35 | + | |
36 | +munge_underscores=true | |
37 | + | |
38 | +module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1' | |
39 | +module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub' | |
40 | + | |
41 | +suppress_type=$FlowIssue | |
42 | +suppress_type=$FlowFixMe | |
43 | +suppress_type=$FlowFixMeProps | |
44 | +suppress_type=$FlowFixMeState | |
45 | + | |
46 | +[lints] | |
47 | +sketchy-null-number=warn | |
48 | +sketchy-null-mixed=warn | |
49 | +sketchy-number=warn | |
50 | +untyped-type-import=warn | |
51 | +nonstrict-import=warn | |
52 | +deprecated-type=warn | |
53 | +unsafe-getters-setters=warn | |
54 | +unnecessary-invariant=warn | |
55 | + | |
56 | +[strict] | |
57 | +deprecated-type | |
58 | +nonstrict-import | |
59 | +sketchy-null | |
60 | +unclear-type | |
61 | +unsafe-getters-setters | |
62 | +untyped-import | |
63 | +untyped-type-import | |
64 | + | |
65 | +[version] | |
66 | +^0.182.0 |
+++ .gitignore
... | ... | @@ -0,0 +1,66 @@ |
1 | +src/url.js | |
2 | +# OSX | |
3 | +# | |
4 | +.DS_Store | |
5 | + | |
6 | +# Xcode | |
7 | +# | |
8 | +build/ | |
9 | +*.pbxuser | |
10 | +!default.pbxuser | |
11 | +*.mode1v3 | |
12 | +!default.mode1v3 | |
13 | +*.mode2v3 | |
14 | +!default.mode2v3 | |
15 | +*.perspectivev3 | |
16 | +!default.perspectivev3 | |
17 | +xcuserdata | |
18 | +*.xccheckout | |
19 | +*.moved-aside | |
20 | +DerivedData | |
21 | +*.hmap | |
22 | +*.ipa | |
23 | +*.xcuserstate | |
24 | +ios/.xcode.env.local | |
25 | + | |
26 | +# Android/IntelliJ | |
27 | +# | |
28 | +build/ | |
29 | +.idea | |
30 | +.gradle | |
31 | +local.properties | |
32 | +*.iml | |
33 | +*.hprof | |
34 | +.cxx/ | |
35 | + | |
36 | +# node.js | |
37 | +# | |
38 | +node_modules/ | |
39 | +npm-debug.log | |
40 | +yarn-error.log | |
41 | + | |
42 | +# BUCK | |
43 | +buck-out/ | |
44 | +\.buckd/ | |
45 | +*.keystore | |
46 | +!debug.keystore | |
47 | + | |
48 | +# fastlane | |
49 | +# | |
50 | +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | |
51 | +# screenshots whenever they are needed. | |
52 | +# For more information about the recommended setup visit: | |
53 | +# https://docs.fastlane.tools/best-practices/source-control/ | |
54 | + | |
55 | +**/fastlane/report.xml | |
56 | +**/fastlane/Preview.html | |
57 | +**/fastlane/screenshots | |
58 | +**/fastlane/test_output | |
59 | + | |
60 | +# Bundle artifact | |
61 | +*.jsbundle | |
62 | + | |
63 | +# Ruby / CocoaPods | |
64 | +/ios/Pods/ | |
65 | +/vendor/bundle/ | |
66 | +.vscode/(파일 끝에 줄바꿈 문자 없음) |
+++ .node-version
... | ... | @@ -0,0 +1,1 @@ |
1 | +16 |
+++ .prettierrc.js
... | ... | @@ -0,0 +1,7 @@ |
1 | +module.exports = { | |
2 | + arrowParens: 'avoid', | |
3 | + bracketSameLine: true, | |
4 | + bracketSpacing: false, | |
5 | + singleQuote: true, | |
6 | + trailingComma: 'all', | |
7 | +}; |
+++ .ruby-version
... | ... | @@ -0,0 +1,1 @@ |
1 | +2.7.5 |
+++ .watchmanconfig
... | ... | @@ -0,0 +1,1 @@ |
1 | +{}(파일 끝에 줄바꿈 문자 없음) |
+++ App.js
... | ... | @@ -0,0 +1,18 @@ |
1 | +import React from 'react'; | |
2 | +// import {PermissionsAndroid} from 'react-native'; | |
3 | +import {GestureHandlerRootView} from 'react-native-gesture-handler'; | |
4 | +import AuthProvider from './src/context/AuthContext'; | |
5 | +import MapProvider from './src/context/MapContext'; | |
6 | +import AppNav from './src/navigator/AppNav'; | |
7 | + | |
8 | +export default function App() { | |
9 | + return ( | |
10 | + <AuthProvider> | |
11 | + <MapProvider> | |
12 | + <GestureHandlerRootView style={{flex: 1}}> | |
13 | + <AppNav /> | |
14 | + </GestureHandlerRootView> | |
15 | + </MapProvider> | |
16 | + </AuthProvider> | |
17 | + ); | |
18 | +} |
+++ Gemfile
... | ... | @@ -0,0 +1,6 @@ |
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.7.5' | |
5 | + | |
6 | +gem 'cocoapods', '~> 1.11', '>= 1.11.2' |
+++ __tests__/App-test.js
... | ... | @@ -0,0 +1,14 @@ |
1 | +/** | |
2 | + * @format | |
3 | + */ | |
4 | + | |
5 | +import 'react-native'; | |
6 | +import React from 'react'; | |
7 | +import App from '../App'; | |
8 | + | |
9 | +// Note: test renderer must be required after react-native. | |
10 | +import renderer from 'react-test-renderer'; | |
11 | + | |
12 | +it('renders correctly', () => { | |
13 | + renderer.create(<App />); | |
14 | +}); |
+++ android/app/_BUCK
... | ... | @@ -0,0 +1,55 @@ |
1 | +# To learn about Buck see [Docs](https://buckbuild.com/). | |
2 | +# To run your application with Buck: | |
3 | +# - install Buck | |
4 | +# - `npm start` - to start the packager | |
5 | +# - `cd android` | |
6 | +# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` | |
7 | +# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | |
8 | +# - `buck install -r android/app` - compile, install and run application | |
9 | +# | |
10 | + | |
11 | +load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") | |
12 | + | |
13 | +lib_deps = [] | |
14 | + | |
15 | +create_aar_targets(glob(["libs/*.aar"])) | |
16 | + | |
17 | +create_jar_targets(glob(["libs/*.jar"])) | |
18 | + | |
19 | +android_library( | |
20 | + name = "all-libs", | |
21 | + exported_deps = lib_deps, | |
22 | +) | |
23 | + | |
24 | +android_library( | |
25 | + name = "app-code", | |
26 | + srcs = glob([ | |
27 | + "src/main/java/**/*.java", | |
28 | + ]), | |
29 | + deps = [ | |
30 | + ":all-libs", | |
31 | + ":build_config", | |
32 | + ":res", | |
33 | + ], | |
34 | +) | |
35 | + | |
36 | +android_build_config( | |
37 | + name = "build_config", | |
38 | + package = "com.aitron", | |
39 | +) | |
40 | + | |
41 | +android_resource( | |
42 | + name = "res", | |
43 | + package = "com.aitron", | |
44 | + res = "src/main/res", | |
45 | +) | |
46 | + | |
47 | +android_binary( | |
48 | + name = "app", | |
49 | + keystore = "//android/keystores:debug", | |
50 | + manifest = "src/main/AndroidManifest.xml", | |
51 | + package_type = "debug", | |
52 | + deps = [ | |
53 | + ":app-code", | |
54 | + ], | |
55 | +) |
+++ android/app/build.gradle
... | ... | @@ -0,0 +1,322 @@ |
1 | +apply plugin: "com.android.application" | |
2 | +apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" | |
3 | + | |
4 | +import com.android.build.OutputFile | |
5 | +import org.apache.tools.ant.taskdefs.condition.Os | |
6 | + | |
7 | +/** | |
8 | + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets | |
9 | + * and bundleReleaseJsAndAssets). | |
10 | + * These basically call `react-native bundle` with the correct arguments during the Android build | |
11 | + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the | |
12 | + * bundle directly from the development server. Below you can see all the possible configurations | |
13 | + * and their defaults. If you decide to add a configuration block, make sure to add it before the | |
14 | + * `apply from: "../../node_modules/react-native/react.gradle"` line. | |
15 | + * | |
16 | + * project.ext.react = [ | |
17 | + * // the name of the generated asset file containing your JS bundle | |
18 | + * bundleAssetName: "index.android.bundle", | |
19 | + * | |
20 | + * // the entry file for bundle generation. If none specified and | |
21 | + * // "index.android.js" exists, it will be used. Otherwise "index.js" is | |
22 | + * // default. Can be overridden with ENTRY_FILE environment variable. | |
23 | + * entryFile: "index.android.js", | |
24 | + * | |
25 | + * // https://reactnative.dev/docs/performance#enable-the-ram-format | |
26 | + * bundleCommand: "ram-bundle", | |
27 | + * | |
28 | + * // whether to bundle JS and assets in debug mode | |
29 | + * bundleInDebug: false, | |
30 | + * | |
31 | + * // whether to bundle JS and assets in release mode | |
32 | + * bundleInRelease: true, | |
33 | + * | |
34 | + * // whether to bundle JS and assets in another build variant (if configured). | |
35 | + * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants | |
36 | + * // The configuration property can be in the following formats | |
37 | + * // 'bundleIn${productFlavor}${buildType}' | |
38 | + * // 'bundleIn${buildType}' | |
39 | + * // bundleInFreeDebug: true, | |
40 | + * // bundleInPaidRelease: true, | |
41 | + * // bundleInBeta: true, | |
42 | + * | |
43 | + * // whether to disable dev mode in custom build variants (by default only disabled in release) | |
44 | + * // for example: to disable dev mode in the staging build type (if configured) | |
45 | + * devDisabledInStaging: true, | |
46 | + * // The configuration property can be in the following formats | |
47 | + * // 'devDisabledIn${productFlavor}${buildType}' | |
48 | + * // 'devDisabledIn${buildType}' | |
49 | + * | |
50 | + * // the root of your project, i.e. where "package.json" lives | |
51 | + * root: "../../", | |
52 | + * | |
53 | + * // where to put the JS bundle asset in debug mode | |
54 | + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", | |
55 | + * | |
56 | + * // where to put the JS bundle asset in release mode | |
57 | + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", | |
58 | + * | |
59 | + * // where to put drawable resources / React Native assets, e.g. the ones you use via | |
60 | + * // require('./image.png')), in debug mode | |
61 | + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", | |
62 | + * | |
63 | + * // where to put drawable resources / React Native assets, e.g. the ones you use via | |
64 | + * // require('./image.png')), in release mode | |
65 | + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", | |
66 | + * | |
67 | + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means | |
68 | + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to | |
69 | + * // date; if you have any other folders that you want to ignore for performance reasons (gradle | |
70 | + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ | |
71 | + * // for example, you might want to remove it from here. | |
72 | + * inputExcludes: ["android/**", "ios/**"], | |
73 | + * | |
74 | + * // override which node gets called and with what additional arguments | |
75 | + * nodeExecutableAndArgs: ["node"], | |
76 | + * | |
77 | + * // supply additional arguments to the packager | |
78 | + * extraPackagerArgs: [] | |
79 | + * ] | |
80 | + */ | |
81 | + | |
82 | +project.ext.react = [ | |
83 | + enableHermes: true, // clean and rebuild if changing | |
84 | +] | |
85 | + | |
86 | +apply from: "../../node_modules/react-native/react.gradle" | |
87 | + | |
88 | +/** | |
89 | + * Set this to true to create two separate APKs instead of one: | |
90 | + * - An APK that only works on ARM devices | |
91 | + * - An APK that only works on x86 devices | |
92 | + * The advantage is the size of the APK is reduced by about 4MB. | |
93 | + * Upload all the APKs to the Play Store and people will download | |
94 | + * the correct one based on the CPU architecture of their device. | |
95 | + */ | |
96 | +def enableSeparateBuildPerCPUArchitecture = false | |
97 | + | |
98 | +/** | |
99 | + * Run Proguard to shrink the Java bytecode in release builds. | |
100 | + */ | |
101 | +def enableProguardInReleaseBuilds = false | |
102 | + | |
103 | +/** | |
104 | + * The preferred build flavor of JavaScriptCore. | |
105 | + * | |
106 | + * For example, to use the international variant, you can use: | |
107 | + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` | |
108 | + * | |
109 | + * The international variant includes ICU i18n library and necessary data | |
110 | + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that | |
111 | + * give correct results when using with locales other than en-US. Note that | |
112 | + * this variant is about 6MiB larger per architecture than default. | |
113 | + */ | |
114 | +def jscFlavor = 'org.webkit:android-jsc:+' | |
115 | + | |
116 | +/** | |
117 | + * Whether to enable the Hermes VM. | |
118 | + * | |
119 | + * This should be set on project.ext.react and that value will be read here. If it is not set | |
120 | + * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode | |
121 | + * and the benefits of using Hermes will therefore be sharply reduced. | |
122 | + */ | |
123 | +def enableHermes = project.ext.react.get("enableHermes", false); | |
124 | + | |
125 | +/** | |
126 | + * Architectures to build native code for. | |
127 | + */ | |
128 | +def reactNativeArchitectures() { | |
129 | + def value = project.getProperties().get("reactNativeArchitectures") | |
130 | + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] | |
131 | +} | |
132 | + | |
133 | +android { | |
134 | + ndkVersion rootProject.ext.ndkVersion | |
135 | + | |
136 | + compileSdkVersion rootProject.ext.compileSdkVersion | |
137 | + | |
138 | + defaultConfig { | |
139 | + applicationId "com.aitron" | |
140 | + minSdkVersion rootProject.ext.minSdkVersion | |
141 | + targetSdkVersion rootProject.ext.targetSdkVersion | |
142 | + versionCode 1 | |
143 | + versionName "1.0" | |
144 | + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() | |
145 | + missingDimensionStrategy 'react-native-camera', 'general' | |
146 | + | |
147 | + if (isNewArchitectureEnabled()) { | |
148 | + // We configure the CMake build only if you decide to opt-in for the New Architecture. | |
149 | + externalNativeBuild { | |
150 | + cmake { | |
151 | + arguments "-DPROJECT_BUILD_DIR=$buildDir", | |
152 | + "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", | |
153 | + "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", | |
154 | + "-DNODE_MODULES_DIR=$rootDir/../node_modules", | |
155 | + "-DANDROID_STL=c++_shared" | |
156 | + } | |
157 | + } | |
158 | + if (!enableSeparateBuildPerCPUArchitecture) { | |
159 | + ndk { | |
160 | + abiFilters (*reactNativeArchitectures()) | |
161 | + } | |
162 | + } | |
163 | + } | |
164 | + } | |
165 | + | |
166 | + if (isNewArchitectureEnabled()) { | |
167 | + // We configure the NDK build only if you decide to opt-in for the New Architecture. | |
168 | + externalNativeBuild { | |
169 | + cmake { | |
170 | + path "$projectDir/src/main/jni/CMakeLists.txt" | |
171 | + } | |
172 | + } | |
173 | + def reactAndroidProjectDir = project(':ReactAndroid').projectDir | |
174 | + def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { | |
175 | + dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") | |
176 | + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") | |
177 | + into("$buildDir/react-ndk/exported") | |
178 | + } | |
179 | + def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { | |
180 | + dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") | |
181 | + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") | |
182 | + into("$buildDir/react-ndk/exported") | |
183 | + } | |
184 | + afterEvaluate { | |
185 | + // If you wish to add a custom TurboModule or component locally, | |
186 | + // you should uncomment this line. | |
187 | + // preBuild.dependsOn("generateCodegenArtifactsFromSchema") | |
188 | + preDebugBuild.dependsOn(packageReactNdkDebugLibs) | |
189 | + preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) | |
190 | + | |
191 | + // Due to a bug inside AGP, we have to explicitly set a dependency | |
192 | + // between configureCMakeDebug* tasks and the preBuild tasks. | |
193 | + // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 | |
194 | + configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) | |
195 | + configureCMakeDebug.dependsOn(preDebugBuild) | |
196 | + reactNativeArchitectures().each { architecture -> | |
197 | + tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { | |
198 | + dependsOn("preDebugBuild") | |
199 | + } | |
200 | + tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { | |
201 | + dependsOn("preReleaseBuild") | |
202 | + } | |
203 | + } | |
204 | + } | |
205 | + } | |
206 | + | |
207 | + splits { | |
208 | + abi { | |
209 | + reset() | |
210 | + enable enableSeparateBuildPerCPUArchitecture | |
211 | + universalApk false // If true, also generate a universal APK | |
212 | + include (*reactNativeArchitectures()) | |
213 | + } | |
214 | + } | |
215 | + signingConfigs { | |
216 | + debug { | |
217 | + storeFile file('debug.keystore') | |
218 | + storePassword 'android' | |
219 | + keyAlias 'androiddebugkey' | |
220 | + keyPassword 'android' | |
221 | + } | |
222 | + } | |
223 | + buildTypes { | |
224 | + debug { | |
225 | + signingConfig signingConfigs.debug | |
226 | + } | |
227 | + release { | |
228 | + // Caution! In production, you need to generate your own keystore file. | |
229 | + // see https://reactnative.dev/docs/signed-apk-android. | |
230 | + signingConfig signingConfigs.debug | |
231 | + minifyEnabled enableProguardInReleaseBuilds | |
232 | + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | |
233 | + } | |
234 | + } | |
235 | + | |
236 | + // applicationVariants are e.g. debug, release | |
237 | + applicationVariants.all { variant -> | |
238 | + variant.outputs.each { output -> | |
239 | + // For each separate APK per architecture, set a unique version code as described here: | |
240 | + // https://developer.android.com/studio/build/configure-apk-splits.html | |
241 | + // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. | |
242 | + def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] | |
243 | + def abi = output.getFilter(OutputFile.ABI) | |
244 | + if (abi != null) { // null for the universal-debug, universal-release variants | |
245 | + output.versionCodeOverride = | |
246 | + defaultConfig.versionCode * 1000 + versionCodes.get(abi) | |
247 | + } | |
248 | + | |
249 | + } | |
250 | + } | |
251 | +} | |
252 | + | |
253 | +dependencies { | |
254 | + implementation fileTree(dir: "libs", include: ["*.jar"]) | |
255 | + | |
256 | + //noinspection GradleDynamicVersion | |
257 | + implementation "com.facebook.react:react-native:+" // From node_modules | |
258 | + | |
259 | + implementation project(':react-native-pure-jwt') | |
260 | + | |
261 | + implementation project(':react-native-restart') | |
262 | + | |
263 | + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | |
264 | + | |
265 | + implementation project(':react-native-fs') | |
266 | + | |
267 | + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | |
268 | + exclude group:'com.facebook.fbjni' | |
269 | + } | |
270 | + | |
271 | + | |
272 | + debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { | |
273 | + exclude group:'com.facebook.flipper' | |
274 | + exclude group:'com.squareup.okhttp3', module:'okhttp' | |
275 | + } | |
276 | + | |
277 | + debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { | |
278 | + exclude group:'com.facebook.flipper' | |
279 | + } | |
280 | + | |
281 | + if (enableHermes) { | |
282 | + //noinspection GradleDynamicVersion | |
283 | + implementation("com.facebook.react:hermes-engine:+") { // From node_modules | |
284 | + exclude group:'com.facebook.fbjni' | |
285 | + } | |
286 | + } else { | |
287 | + implementation jscFlavor | |
288 | + } | |
289 | +} | |
290 | + | |
291 | +if (isNewArchitectureEnabled()) { | |
292 | + // If new architecture is enabled, we let you build RN from source | |
293 | + // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. | |
294 | + // This will be applied to all the imported transtitive dependency. | |
295 | + configurations.all { | |
296 | + resolutionStrategy.dependencySubstitution { | |
297 | + substitute(module("com.facebook.react:react-native")) | |
298 | + .using(project(":ReactAndroid")) | |
299 | + .because("On New Architecture we're building React Native from source") | |
300 | + substitute(module("com.facebook.react:hermes-engine")) | |
301 | + .using(project(":ReactAndroid:hermes-engine")) | |
302 | + .because("On New Architecture we're building Hermes from source") | |
303 | + } | |
304 | + } | |
305 | +} | |
306 | + | |
307 | +// Run this once to be able to run the application with BUCK | |
308 | +// puts all compile dependencies into folder libs for BUCK to use | |
309 | +task copyDownloadableDepsToLibs(type: Copy) { | |
310 | + from configurations.implementation | |
311 | + into 'libs' | |
312 | +} | |
313 | + | |
314 | +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) | |
315 | + | |
316 | +def isNewArchitectureEnabled() { | |
317 | + // To opt-in for the New Architecture, you can either: | |
318 | + // - Set `newArchEnabled` to true inside the `gradle.properties` file | |
319 | + // - Invoke gradle with `-newArchEnabled=true` | |
320 | + // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` | |
321 | + return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" | |
322 | +} |
+++ android/app/build_defs.bzl
... | ... | @@ -0,0 +1,19 @@ |
1 | +"""Helper definitions to glob .aar and .jar targets""" | |
2 | + | |
3 | +def create_aar_targets(aarfiles): | |
4 | + for aarfile in aarfiles: | |
5 | + name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] | |
6 | + lib_deps.append(":" + name) | |
7 | + android_prebuilt_aar( | |
8 | + name = name, | |
9 | + aar = aarfile, | |
10 | + ) | |
11 | + | |
12 | +def create_jar_targets(jarfiles): | |
13 | + for jarfile in jarfiles: | |
14 | + name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] | |
15 | + lib_deps.append(":" + name) | |
16 | + prebuilt_jar( | |
17 | + name = name, | |
18 | + binary_jar = jarfile, | |
19 | + ) |
+++ android/app/debug.keystore
Binary file is not shown |
+++ android/app/proguard-rules.pro
... | ... | @@ -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: |
+++ android/app/src/debug/AndroidManifest.xml
... | ... | @@ -0,0 +1,13 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + xmlns:tools="http://schemas.android.com/tools"> | |
4 | + | |
5 | + <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | |
6 | + <uses-permission android:name="android.permission.CAMERA" /> | |
7 | + <!-- android:usesCleartextTraffic="true" --> | |
8 | + <application | |
9 | + tools:targetApi="28" | |
10 | + tools:ignore="GoogleAppIndexingWarning"> | |
11 | + <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" /> | |
12 | + </application> | |
13 | +</manifest> |
+++ android/app/src/debug/java/com/trafficagent2/ReactNativeFlipper.java
... | ... | @@ -0,0 +1,73 @@ |
1 | +/** | |
2 | + * Copyright (c) Meta Platforms, Inc. and affiliates. | |
3 | + * | |
4 | + * <p>This source code is licensed under the MIT license found in the LICENSE file in the root | |
5 | + * directory of this source tree. | |
6 | + */ | |
7 | +package com.aitron; | |
8 | + | |
9 | +import android.content.Context; | |
10 | +import com.facebook.flipper.android.AndroidFlipperClient; | |
11 | +import com.facebook.flipper.android.utils.FlipperUtils; | |
12 | +import com.facebook.flipper.core.FlipperClient; | |
13 | +import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; | |
14 | +import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; | |
15 | +import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; | |
16 | +import com.facebook.flipper.plugins.inspector.DescriptorMapping; | |
17 | +import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; | |
18 | +import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; | |
19 | +import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; | |
20 | +import com.facebook.flipper.plugins.react.ReactFlipperPlugin; | |
21 | +import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; | |
22 | +import com.facebook.react.ReactInstanceEventListener; | |
23 | +import com.facebook.react.ReactInstanceManager; | |
24 | +import com.facebook.react.bridge.ReactContext; | |
25 | +import com.facebook.react.modules.network.NetworkingModule; | |
26 | +import okhttp3.OkHttpClient; | |
27 | + | |
28 | +public class ReactNativeFlipper { | |
29 | + public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { | |
30 | + if (FlipperUtils.shouldEnableFlipper(context)) { | |
31 | + final FlipperClient client = AndroidFlipperClient.getInstance(context); | |
32 | + | |
33 | + client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); | |
34 | + client.addPlugin(new ReactFlipperPlugin()); | |
35 | + client.addPlugin(new DatabasesFlipperPlugin(context)); | |
36 | + client.addPlugin(new SharedPreferencesFlipperPlugin(context)); | |
37 | + client.addPlugin(CrashReporterPlugin.getInstance()); | |
38 | + | |
39 | + NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); | |
40 | + NetworkingModule.setCustomClientBuilder( | |
41 | + new NetworkingModule.CustomClientBuilder() { | |
42 | + @Override | |
43 | + public void apply(OkHttpClient.Builder builder) { | |
44 | + // builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); | |
45 | + } | |
46 | + }); | |
47 | + client.addPlugin(networkFlipperPlugin); | |
48 | + client.start(); | |
49 | + | |
50 | + // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized | |
51 | + // Hence we run if after all native modules have been initialized | |
52 | + ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); | |
53 | + if (reactContext == null) { | |
54 | + reactInstanceManager.addReactInstanceEventListener( | |
55 | + new ReactInstanceEventListener() { | |
56 | + @Override | |
57 | + public void onReactContextInitialized(ReactContext reactContext) { | |
58 | + reactInstanceManager.removeReactInstanceEventListener(this); | |
59 | + reactContext.runOnNativeModulesQueueThread( | |
60 | + new Runnable() { | |
61 | + @Override | |
62 | + public void run() { | |
63 | + client.addPlugin(new FrescoFlipperPlugin()); | |
64 | + } | |
65 | + }); | |
66 | + } | |
67 | + }); | |
68 | + } else { | |
69 | + client.addPlugin(new FrescoFlipperPlugin()); | |
70 | + } | |
71 | + } | |
72 | + } | |
73 | +} |
+++ android/app/src/main/AndroidManifest.xml
... | ... | @@ -0,0 +1,41 @@ |
1 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | + package="com.aitron"> | |
3 | + | |
4 | + <uses-permission android:name="android.permission.INTERNET" /> | |
5 | + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
6 | + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
7 | + <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> | |
8 | + <uses-permission android:name="android.permission.CAMERA" /> | |
9 | + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
10 | + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
11 | + <uses-permission android:name="android.permission.RECORD_AUDIO"/> | |
12 | + | |
13 | + <application | |
14 | + android:name=".MainApplication" | |
15 | + android:label="@string/app_name" | |
16 | + android:icon="@mipmap/ic_launcher" | |
17 | + android:roundIcon="@mipmap/ic_launcher_round" | |
18 | + android:allowBackup="false" | |
19 | + android:usesCleartextTraffic="true" | |
20 | + android.networkSecurityConfig="@xml/network_security_config" | |
21 | + android:theme="@style/AppTheme"> | |
22 | + <meta-data | |
23 | + android:name="com.google.android.geo.API_KEY" | |
24 | + android:value="AIzaSyASJSJyYRgXN-z1_6aWMtpiaSvP8PdZ4DE"/> | |
25 | + | |
26 | +<!-- You will also only need to add this uses-libray tag --> | |
27 | +<uses-library android:name="org.apache.http.legacy" android:required="false"/> | |
28 | + <activity | |
29 | + android:name=".MainActivity" | |
30 | + android:label="@string/app_name" | |
31 | + android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" | |
32 | + android:launchMode="singleTask" | |
33 | + android:windowSoftInputMode="adjustResize" | |
34 | + android:exported="true"> | |
35 | + <intent-filter> | |
36 | + <action android:name="android.intent.action.MAIN" /> | |
37 | + <category android:name="android.intent.category.LAUNCHER" /> | |
38 | + </intent-filter> | |
39 | + </activity> | |
40 | + </application> | |
41 | +</manifest> |
+++ android/app/src/main/assets/index.android.bundle
This file is too big to display. |
+++ android/app/src/main/java/com/aitron/MainActivity.java
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/java/com/aitron/MainApplication.java
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/java/com/aitron/newarchitecture/MainApplicationReactNativeHost.java
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/java/com/aitron/newarchitecture/components/MainComponentsRegistry.java
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/java/com/aitron/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/CMakeLists.txt
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainApplicationModuleProvider.cpp
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainApplicationModuleProvider.h
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainComponentsRegistry.cpp
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/MainComponentsRegistry.h
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/jni/OnLoad.cpp
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/res/drawable-mdpi/node_modules_reactnativepaper_src_assets_backchevron.png
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_current_location.png
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_end_point.png
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_fog_marker.png
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_frsg_loading.jpg
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map.jpg
Binary file is not shown |
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map2.jpg
Binary file is not shown |
+++ android/app/src/main/res/drawable/rn_edit_text_material.xml
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file is not shown |
+++ android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary file is not shown |
+++ android/app/src/main/res/values/strings.xml
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/res/values/styles.xml
This diff is skipped because there are too many other diffs. |
+++ android/app/src/main/res/xml/network_security_config.xml
This diff is skipped because there are too many other diffs. |
+++ android/build.gradle
This diff is skipped because there are too many other diffs. |
+++ android/gradle.properties
This diff is skipped because there are too many other diffs. |
+++ android/gradle/wrapper/gradle-wrapper.jar
Binary file is not shown |
+++ android/gradle/wrapper/gradle-wrapper.properties
This diff is skipped because there are too many other diffs. |
+++ android/gradlew
This diff is skipped because there are too many other diffs. |
+++ android/gradlew.bat
This diff is skipped because there are too many other diffs. |
+++ android/settings.gradle
This diff is skipped because there are too many other diffs. |
+++ app.json
This diff is skipped because there are too many other diffs. |
+++ babel.config.js
This diff is skipped because there are too many other diffs. |
+++ index.js
This diff is skipped because there are too many other diffs. |
+++ ios/.xcode.env
This diff is skipped because there are too many other diffs. |
+++ ios/Podfile
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2.xcodeproj/project.pbxproj
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/AppDelegate.h
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/AppDelegate.mm
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/Images.xcassets/AppIcon.appiconset/Contents.json
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/Images.xcassets/Contents.json
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/Info.plist
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/LaunchScreen.storyboard
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2/main.m
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2Tests/Info.plist
This diff is skipped because there are too many other diffs. |
+++ ios/TrafficAgent2Tests/TrafficAgent2Tests.m
This diff is skipped because there are too many other diffs. |
+++ metro.config.js
This diff is skipped because there are too many other diffs. |
+++ package-lock.json
This diff is skipped because there are too many other diffs. |
+++ package.json
This diff is skipped because there are too many other diffs. |
+++ src/component/Action.js
This diff is skipped because there are too many other diffs. |
+++ src/component/BottomDrop.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Button.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Checkbox.js
This diff is skipped because there are too many other diffs. |
+++ src/component/CustomDrawer.js
This diff is skipped because there are too many other diffs. |
+++ src/component/DriveStatus.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Input.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Logo.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Map.js
This diff is skipped because there are too many other diffs. |
+++ src/component/Photo.js
This diff is skipped because there are too many other diffs. |
+++ src/context/AuthContext.js
This diff is skipped because there are too many other diffs. |
+++ src/context/MapContext.js
This diff is skipped because there are too many other diffs. |
+++ src/resoureces/files/images/css_loading.jpg
Binary file is not shown |
+++ src/resoureces/files/images/current_location.png
Binary file is not shown |
+++ src/resoureces/files/images/end_point.png
Binary file is not shown |
+++ src/resoureces/files/images/fog_marker.png
Binary file is not shown |
+++ src/resoureces/files/images/frsg_loading.png
Binary file is not shown |
+++ src/resoureces/files/images/frsg_loading_1.jpg
Binary file is not shown |
+++ src/resoureces/files/images/login_logo_1.png
Binary file is not shown |
+++ src/resoureces/files/images/login_logo_2.png
Binary file is not shown |
+++ src/resoureces/files/images/splash_logo_1.png
Binary file is not shown |
+++ src/resoureces/files/images/splash_logo_2.png
Binary file is not shown |
+++ src/resoureces/styles/GlobalStyles.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/Login.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/Main.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/Rain.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/Setting.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/StartLoading.js
This diff is skipped because there are too many other diffs. |
+++ src/screens/UserInformation.js
This diff is skipped because there are too many other diffs. |
+++ test.json
This diff is skipped because there are too many other diffs. |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?