Skip to content

Commit df17f9d

Browse files
Merge pull request #7 from codebuilderinc/chore/cleanup-vscode-settings
2 parents 039552d + fbbf4f2 commit df17f9d

File tree

97 files changed

+6817
-1102
lines changed

Some content is hidden

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

97 files changed

+6817
-1102
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@ yarn-error.*
3838

3939
# Ignore the android google services config
4040
google-services.json
41+
google-services.auto.json
42+
google-services.env.json
4143

4244
# Ignore the iOS Google Services config
4345
GoogleService-Info.plist
4446

4547
# You can also ignore any .env files or other secrets
4648
*.env
4749

48-
# Android / ioS Build Folders
50+
# VS Code settings with sensitive data
51+
.vscode/settings.json
52+
53+
# Android / iOS Build Folders
4954
android/
5055
ios/
5156
web-build/

android/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Android/IntelliJ
6+
#
7+
build/
8+
.idea
9+
.gradle
10+
local.properties
11+
*.iml
12+
*.hprof
13+
.cxx/
14+
15+
# Bundle artifacts
16+
*.jsbundle

android/app/build.gradle

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
3+
apply plugin: "com.facebook.react"
4+
5+
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
6+
7+
/**
8+
* This is the configuration block to customize your React Native Android app.
9+
* By default you don't need to apply any configuration, just uncomment the lines you need.
10+
*/
11+
react {
12+
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
13+
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
14+
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
15+
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
16+
17+
// Use Expo CLI to bundle the app, this ensures the Metro config
18+
// works correctly with Expo projects.
19+
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
20+
bundleCommand = "export:embed"
21+
22+
/* Folders */
23+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
24+
// root = file("../../")
25+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
26+
// reactNativeDir = file("../../node_modules/react-native")
27+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
28+
// codegenDir = file("../../node_modules/@react-native/codegen")
29+
30+
/* Variants */
31+
// The list of variants to that are debuggable. For those we're going to
32+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
33+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
34+
// debuggableVariants = ["liteDebug", "prodDebug"]
35+
36+
/* Bundling */
37+
// A list containing the node command and its flags. Default is just 'node'.
38+
// nodeExecutableAndArgs = ["node"]
39+
40+
//
41+
// The path to the CLI configuration file. Default is empty.
42+
// bundleConfig = file(../rn-cli.config.js)
43+
//
44+
// The name of the generated asset file containing your JS bundle
45+
// bundleAssetName = "MyApplication.android.bundle"
46+
//
47+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
48+
// entryFile = file("../js/MyApplication.android.js")
49+
//
50+
// A list of extra flags to pass to the 'bundle' commands.
51+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
52+
// extraPackagerArgs = []
53+
54+
/* Hermes Commands */
55+
// The hermes compiler command to run. By default it is 'hermesc'
56+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
57+
//
58+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
59+
// hermesFlags = ["-O", "-output-source-map"]
60+
61+
/* Autolinking */
62+
autolinkLibrariesWithApp()
63+
}
64+
65+
/**
66+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
67+
*/
68+
def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean()
69+
70+
/**
71+
* The preferred build flavor of JavaScriptCore (JSC)
72+
*
73+
* For example, to use the international variant, you can use:
74+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
75+
*
76+
* The international variant includes ICU i18n library and necessary data
77+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
78+
* give correct results when using with locales other than en-US. Note that
79+
* this variant is about 6MiB larger per architecture than default.
80+
*/
81+
def jscFlavor = 'org.webkit:android-jsc:+'
82+
83+
android {
84+
ndkVersion rootProject.ext.ndkVersion
85+
86+
buildToolsVersion rootProject.ext.buildToolsVersion
87+
compileSdk rootProject.ext.compileSdkVersion
88+
89+
namespace 'com.digitalnomad91.codebuilderadmin'
90+
defaultConfig {
91+
applicationId 'com.digitalnomad91.codebuilderadmin'
92+
minSdkVersion rootProject.ext.minSdkVersion
93+
targetSdkVersion rootProject.ext.targetSdkVersion
94+
versionCode 1
95+
versionName "1.1.0"
96+
}
97+
signingConfigs {
98+
debug {
99+
storeFile file('debug.keystore')
100+
storePassword 'android'
101+
keyAlias 'androiddebugkey'
102+
keyPassword 'android'
103+
}
104+
release {
105+
// The path to your keystore file (adjust if needed):
106+
storeFile file('../../keystore.jks')
107+
108+
// Hardcode your passwords/alias (NOT recommended for production),
109+
// or see "Using gradle.properties" below for a more secure approach.
110+
storePassword "YOUR_KEYSTORE_PASSWORD"
111+
keyAlias "YOUR_KEY_ALIAS"
112+
keyPassword "YOUR_KEY_PASSWORD"
113+
}
114+
}
115+
buildTypes {
116+
debug {
117+
signingConfig signingConfigs.debug
118+
}
119+
release {
120+
// Use the "release" signing config here
121+
signingConfig signingConfigs.release
122+
123+
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
124+
minifyEnabled (findProperty('android.enableProguardInReleaseBuilds')?.toBoolean() ?: false)
125+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
126+
crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true)
127+
}
128+
// release {
129+
// // Caution! In production, you need to generate your own keystore file.
130+
// // see https://reactnative.dev/docs/signed-apk-android.
131+
// signingConfig signingConfigs.debug
132+
// shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
133+
// minifyEnabled enableProguardInReleaseBuilds
134+
// proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
135+
// crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true)
136+
// }
137+
}
138+
packagingOptions {
139+
jniLibs {
140+
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
141+
}
142+
}
143+
androidResources {
144+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
145+
}
146+
}
147+
148+
// Apply static values from `gradle.properties` to the `android.packagingOptions`
149+
// Accepts values in comma delimited lists, example:
150+
// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
151+
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
152+
// Split option: 'foo,bar' -> ['foo', 'bar']
153+
def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
154+
// Trim all elements in place.
155+
for (i in 0..<options.size()) options[i] = options[i].trim();
156+
// `[] - ""` is essentially `[""].filter(Boolean)` removing all empty strings.
157+
options -= ""
158+
159+
if (options.length > 0) {
160+
println "android.packagingOptions.$prop += $options ($options.length)"
161+
// Ex: android.packagingOptions.pickFirsts += '**/SCCS/**'
162+
options.each {
163+
android.packagingOptions[prop] += it
164+
}
165+
}
166+
}
167+
168+
dependencies {
169+
// The version of react-native is set by the React Native Gradle Plugin
170+
implementation("com.facebook.react:react-android")
171+
172+
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
173+
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
174+
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
175+
176+
if (isGifEnabled) {
177+
// For animated gif support
178+
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
179+
}
180+
181+
if (isWebpEnabled) {
182+
// For webp support
183+
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
184+
if (isWebpAnimatedEnabled) {
185+
// Animated webp support
186+
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
187+
}
188+
}
189+
190+
if (hermesEnabled.toBoolean()) {
191+
implementation("com.facebook.react:hermes-android")
192+
} else {
193+
implementation jscFlavor
194+
}
195+
}
196+
197+
apply plugin: 'com.google.gms.google-services'

android/app/debug.keystore

2.2 KB
Binary file not shown.

android/app/google-services.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"project_info": {
3+
"project_number": "982053776531",
4+
"project_id": "code-c4af1",
5+
"storage_bucket": "code-c4af1.firebasestorage.app"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:982053776531:android:a7095fc6737fc235e3b166",
11+
"android_client_info": {
12+
"package_name": "com.digitalnomad91.codebuilderadmin"
13+
}
14+
},
15+
"oauth_client": [],
16+
"api_key": [
17+
{
18+
"current_key": "AIzaSyDdDNSdl2ukCEpTy2tZ2IHz1lD3UiftQFo"
19+
}
20+
],
21+
"services": {
22+
"appinvite_service": {
23+
"other_platform_oauth_client": []
24+
}
25+
}
26+
}
27+
],
28+
"configuration_version": "1"
29+
}

android/app/proguard-rules.pro

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
# react-native-reanimated
11+
-keep class com.swmansion.reanimated.** { *; }
12+
-keep class com.facebook.react.turbomodule.** { *; }
13+
14+
# Add any project specific keep options here:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools">
3+
4+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5+
6+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
7+
</manifest>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
2+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
3+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
<uses-permission android:name="android.permission.NOTIFICATIONS"/>
6+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
7+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
8+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
9+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
10+
<uses-permission android:name="android.permission.VIBRATE"/>
11+
<uses-permission android:name="android.permission.WAKE_LOCK"/>
12+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
13+
<queries>
14+
<intent>
15+
<action android:name="android.intent.action.VIEW"/>
16+
<category android:name="android.intent.category.BROWSABLE"/>
17+
<data android:scheme="https"/>
18+
</intent>
19+
</queries>
20+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true">
21+
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyAQzBGrbyNIFxyDsto8zVxbW31W5cyobxo"/>
22+
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color" tools:replace="android:resource"/>
23+
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>
24+
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
25+
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
26+
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
27+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
28+
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
29+
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
30+
<intent-filter>
31+
<action android:name="android.intent.action.MAIN"/>
32+
<category android:name="android.intent.category.LAUNCHER"/>
33+
</intent-filter>
34+
<intent-filter>
35+
<action android:name="android.intent.action.VIEW"/>
36+
<category android:name="android.intent.category.DEFAULT"/>
37+
<category android:name="android.intent.category.BROWSABLE"/>
38+
<data android:scheme="myapp"/>
39+
<data android:scheme="com.digitalnomad91.codebuilderadmin"/>
40+
<data android:scheme="exp+codebuilder"/>
41+
</intent-filter>
42+
</activity>
43+
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
44+
</application>
45+
</manifest>

0 commit comments

Comments
 (0)