Skip to content

Commit c37cbad

Browse files
finished navigation project 10
1 parent ce09d36 commit c37cbad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+17735
-0
lines changed

shopping10/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

shopping10/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

shopping10/.gitignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
ios/.xcode.env.local
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
36+
37+
# node.js
38+
#
39+
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# fastlane
44+
#
45+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46+
# screenshots whenever they are needed.
47+
# For more information about the recommended setup visit:
48+
# https://docs.fastlane.tools/best-practices/source-control/
49+
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# Ruby / CocoaPods
59+
/ios/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*

shopping10/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

shopping10/.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

shopping10/.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

shopping10/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.6.10'
5+
6+
gem 'cocoapods', '>= 1.11.3'

shopping10/Gemfile.lock

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.6)
5+
rexml
6+
activesupport (6.1.7.3)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
zeitwerk (~> 2.3)
12+
addressable (2.8.4)
13+
public_suffix (>= 2.0.2, < 6.0)
14+
algoliasearch (1.27.5)
15+
httpclient (~> 2.8, >= 2.8.3)
16+
json (>= 1.5.1)
17+
atomos (0.1.3)
18+
claide (1.1.0)
19+
cocoapods (1.12.0)
20+
addressable (~> 2.8)
21+
claide (>= 1.0.2, < 2.0)
22+
cocoapods-core (= 1.12.0)
23+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24+
cocoapods-downloader (>= 1.6.0, < 2.0)
25+
cocoapods-plugins (>= 1.0.0, < 2.0)
26+
cocoapods-search (>= 1.0.0, < 2.0)
27+
cocoapods-trunk (>= 1.6.0, < 2.0)
28+
cocoapods-try (>= 1.1.0, < 2.0)
29+
colored2 (~> 3.1)
30+
escape (~> 0.0.4)
31+
fourflusher (>= 2.3.0, < 3.0)
32+
gh_inspector (~> 1.0)
33+
molinillo (~> 0.8.0)
34+
nap (~> 1.0)
35+
ruby-macho (>= 2.3.0, < 3.0)
36+
xcodeproj (>= 1.21.0, < 2.0)
37+
cocoapods-core (1.12.0)
38+
activesupport (>= 5.0, < 8)
39+
addressable (~> 2.8)
40+
algoliasearch (~> 1.0)
41+
concurrent-ruby (~> 1.1)
42+
fuzzy_match (~> 2.0.4)
43+
nap (~> 1.0)
44+
netrc (~> 0.11)
45+
public_suffix (~> 4.0)
46+
typhoeus (~> 1.0)
47+
cocoapods-deintegrate (1.0.5)
48+
cocoapods-downloader (1.6.3)
49+
cocoapods-plugins (1.0.0)
50+
nap
51+
cocoapods-search (1.0.1)
52+
cocoapods-trunk (1.6.0)
53+
nap (>= 0.8, < 2.0)
54+
netrc (~> 0.11)
55+
cocoapods-try (1.2.0)
56+
colored2 (3.1.2)
57+
concurrent-ruby (1.2.2)
58+
escape (0.0.4)
59+
ethon (0.16.0)
60+
ffi (>= 1.15.0)
61+
ffi (1.15.5)
62+
fourflusher (2.3.1)
63+
fuzzy_match (2.0.4)
64+
gh_inspector (1.1.3)
65+
httpclient (2.8.3)
66+
i18n (1.12.0)
67+
concurrent-ruby (~> 1.0)
68+
json (2.6.3)
69+
minitest (5.18.0)
70+
molinillo (0.8.0)
71+
nanaimo (0.3.0)
72+
nap (1.1.0)
73+
netrc (0.11.0)
74+
public_suffix (4.0.7)
75+
rexml (3.2.5)
76+
ruby-macho (2.5.1)
77+
typhoeus (1.4.0)
78+
ethon (>= 0.9.0)
79+
tzinfo (2.0.6)
80+
concurrent-ruby (~> 1.0)
81+
xcodeproj (1.22.0)
82+
CFPropertyList (>= 2.3.3, < 4.0)
83+
atomos (~> 0.1.3)
84+
claide (>= 1.0.2, < 2.0)
85+
colored2 (~> 3.1)
86+
nanaimo (~> 0.3.0)
87+
rexml (~> 3.2.4)
88+
zeitwerk (2.6.7)
89+
90+
PLATFORMS
91+
ruby
92+
93+
DEPENDENCIES
94+
cocoapods (>= 1.11.3)
95+
96+
RUBY VERSION
97+
ruby 2.6.10p210
98+
99+
BUNDLED WITH
100+
1.17.2

shopping10/__tests__/App-test.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
});
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
apply plugin: "com.android.application"
2+
apply plugin: "com.facebook.react"
3+
4+
import com.android.build.OutputFile
5+
6+
/**
7+
* This is the configuration block to customize your React Native Android app.
8+
* By default you don't need to apply any configuration, just uncomment the lines you need.
9+
*/
10+
react {
11+
/* Folders */
12+
// The root of your project, i.e. where "package.json" lives. Default is '..'
13+
// root = file("../")
14+
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
15+
// reactNativeDir = file("../node_modules/react-native")
16+
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
17+
// codegenDir = file("../node_modules/react-native-codegen")
18+
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
19+
// cliFile = file("../node_modules/react-native/cli.js")
20+
21+
/* Variants */
22+
// The list of variants to that are debuggable. For those we're going to
23+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
24+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
25+
// debuggableVariants = ["liteDebug", "prodDebug"]
26+
27+
/* Bundling */
28+
// A list containing the node command and its flags. Default is just 'node'.
29+
// nodeExecutableAndArgs = ["node"]
30+
//
31+
// The command to run when bundling. By default is 'bundle'
32+
// bundleCommand = "ram-bundle"
33+
//
34+
// The path to the CLI configuration file. Default is empty.
35+
// bundleConfig = file(../rn-cli.config.js)
36+
//
37+
// The name of the generated asset file containing your JS bundle
38+
// bundleAssetName = "MyApplication.android.bundle"
39+
//
40+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
41+
// entryFile = file("../js/MyApplication.android.js")
42+
//
43+
// A list of extra flags to pass to the 'bundle' commands.
44+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
45+
// extraPackagerArgs = []
46+
47+
/* Hermes Commands */
48+
// The hermes compiler command to run. By default it is 'hermesc'
49+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
50+
//
51+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
52+
// hermesFlags = ["-O", "-output-source-map"]
53+
}
54+
55+
/**
56+
* Set this to true to create four separate APKs instead of one,
57+
* one for each native architecture. This is useful if you don't
58+
* use App Bundles (https://developer.android.com/guide/app-bundle/)
59+
* and want to have separate APKs to upload to the Play Store.
60+
*/
61+
def enableSeparateBuildPerCPUArchitecture = false
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 = 'org.webkit:android-jsc-intl:+'`
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 = 'org.webkit:android-jsc:+'
80+
81+
/**
82+
* Private function to get the list of Native Architectures you want to build.
83+
* This reads the value from reactNativeArchitectures in your gradle.properties
84+
* file and works together with the --active-arch-only flag of react-native run-android.
85+
*/
86+
def reactNativeArchitectures() {
87+
def value = project.getProperties().get("reactNativeArchitectures")
88+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
89+
}
90+
91+
android {
92+
ndkVersion rootProject.ext.ndkVersion
93+
94+
compileSdkVersion rootProject.ext.compileSdkVersion
95+
96+
namespace "com.shopping10"
97+
defaultConfig {
98+
applicationId "com.shopping10"
99+
minSdkVersion rootProject.ext.minSdkVersion
100+
targetSdkVersion rootProject.ext.targetSdkVersion
101+
versionCode 1
102+
versionName "1.0"
103+
}
104+
105+
splits {
106+
abi {
107+
reset()
108+
enable enableSeparateBuildPerCPUArchitecture
109+
universalApk false // If true, also generate a universal APK
110+
include (*reactNativeArchitectures())
111+
}
112+
}
113+
signingConfigs {
114+
debug {
115+
storeFile file('debug.keystore')
116+
storePassword 'android'
117+
keyAlias 'androiddebugkey'
118+
keyPassword 'android'
119+
}
120+
}
121+
buildTypes {
122+
debug {
123+
signingConfig signingConfigs.debug
124+
}
125+
release {
126+
// Caution! In production, you need to generate your own keystore file.
127+
// see https://reactnative.dev/docs/signed-apk-android.
128+
signingConfig signingConfigs.debug
129+
minifyEnabled enableProguardInReleaseBuilds
130+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
131+
}
132+
}
133+
134+
// applicationVariants are e.g. debug, release
135+
applicationVariants.all { variant ->
136+
variant.outputs.each { output ->
137+
// For each separate APK per architecture, set a unique version code as described here:
138+
// https://developer.android.com/studio/build/configure-apk-splits.html
139+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
140+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
141+
def abi = output.getFilter(OutputFile.ABI)
142+
if (abi != null) { // null for the universal-debug, universal-release variants
143+
output.versionCodeOverride =
144+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
145+
}
146+
147+
}
148+
}
149+
}
150+
151+
dependencies {
152+
// The version of react-native is set by the React Native Gradle Plugin
153+
implementation("com.facebook.react:react-android")
154+
155+
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156+
157+
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
158+
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
159+
exclude group:'com.squareup.okhttp3', module:'okhttp'
160+
}
161+
162+
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
163+
if (hermesEnabled.toBoolean()) {
164+
implementation("com.facebook.react:hermes-android")
165+
} else {
166+
implementation jscFlavor
167+
}
168+
}
169+
170+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

0 commit comments

Comments
 (0)