@highbeek/create-rnstarterkit 1.0.2-beta.2 → 1.0.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/create-rnstarterkit.js +6 -0
- package/dist/src/generators/appGenerator.js +20 -94
- package/dist/templates/cli-base/.bundle/config +2 -0
- package/dist/templates/cli-base/.eslintrc.js +4 -0
- package/dist/templates/cli-base/.prettierrc.js +5 -0
- package/dist/templates/cli-base/.watchmanconfig +1 -0
- package/dist/templates/cli-base/App.tsx +45 -0
- package/dist/templates/cli-base/Gemfile +16 -0
- package/dist/templates/cli-base/Gemfile.lock +169 -0
- package/dist/templates/cli-base/README.md +97 -0
- package/dist/templates/cli-base/__tests__/App.test.tsx +13 -0
- package/dist/templates/cli-base/android/app/build.gradle +119 -0
- package/dist/templates/cli-base/android/app/debug.keystore +0 -0
- package/dist/templates/cli-base/android/app/proguard-rules.pro +10 -0
- package/dist/templates/cli-base/android/app/src/main/AndroidManifest.xml +27 -0
- package/dist/templates/cli-base/android/app/src/main/java/com/baseapp/MainActivity.kt +22 -0
- package/dist/templates/cli-base/android/app/src/main/java/com/baseapp/MainApplication.kt +27 -0
- package/dist/templates/cli-base/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/dist/templates/cli-base/android/app/src/main/res/values/strings.xml +3 -0
- package/dist/templates/cli-base/android/app/src/main/res/values/styles.xml +9 -0
- package/dist/templates/cli-base/android/build.gradle +21 -0
- package/dist/templates/cli-base/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/dist/templates/cli-base/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/dist/templates/cli-base/android/gradle.properties +44 -0
- package/dist/templates/cli-base/android/gradlew +251 -0
- package/dist/templates/cli-base/android/gradlew.bat +99 -0
- package/dist/templates/cli-base/android/settings.gradle +6 -0
- package/dist/templates/cli-base/app.json +4 -0
- package/dist/templates/cli-base/babel.config.js +3 -0
- package/dist/templates/cli-base/index.js +9 -0
- package/dist/templates/cli-base/ios/.xcode.env +11 -0
- package/dist/templates/cli-base/ios/BaseApp/AppDelegate.swift +48 -0
- package/dist/templates/cli-base/ios/BaseApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/dist/templates/cli-base/ios/BaseApp/Images.xcassets/Contents.json +6 -0
- package/dist/templates/cli-base/ios/BaseApp/Info.plist +60 -0
- package/dist/templates/cli-base/ios/BaseApp/LaunchScreen.storyboard +47 -0
- package/dist/templates/cli-base/ios/BaseApp/PrivacyInfo.xcprivacy +37 -0
- package/dist/templates/cli-base/ios/BaseApp.xcodeproj/project.pbxproj +494 -0
- package/dist/templates/cli-base/ios/BaseApp.xcodeproj/xcshareddata/xcschemes/BaseApp.xcscheme +88 -0
- package/dist/templates/cli-base/ios/BaseApp.xcworkspace/contents.xcworkspacedata +10 -0
- package/dist/templates/cli-base/ios/Podfile +34 -0
- package/dist/templates/cli-base/ios/Podfile.lock +2165 -0
- package/dist/templates/cli-base/jest.config.js +3 -0
- package/dist/templates/cli-base/metro.config.js +11 -0
- package/dist/templates/cli-base/package-lock.json +11859 -0
- package/dist/templates/cli-base/package.json +41 -0
- package/dist/templates/cli-base/tsconfig.json +8 -0
- package/dist/templates/expo-base/.vscode/extensions.json +1 -0
- package/dist/templates/expo-base/.vscode/settings.json +7 -0
- package/dist/templates/expo-base/README.md +50 -0
- package/dist/templates/expo-base/app/(tabs)/_layout.tsx +35 -0
- package/dist/templates/expo-base/app/(tabs)/explore.tsx +112 -0
- package/dist/templates/expo-base/app/(tabs)/index.tsx +98 -0
- package/dist/templates/expo-base/app/_layout.tsx +24 -0
- package/dist/templates/expo-base/app/modal.tsx +29 -0
- package/dist/templates/expo-base/app.json +48 -0
- package/dist/templates/expo-base/assets/images/android-icon-background.png +0 -0
- package/dist/templates/expo-base/assets/images/android-icon-foreground.png +0 -0
- package/dist/templates/expo-base/assets/images/android-icon-monochrome.png +0 -0
- package/dist/templates/expo-base/assets/images/favicon.png +0 -0
- package/dist/templates/expo-base/assets/images/icon.png +0 -0
- package/dist/templates/expo-base/assets/images/partial-react-logo.png +0 -0
- package/dist/templates/expo-base/assets/images/react-logo.png +0 -0
- package/dist/templates/expo-base/assets/images/react-logo@2x.png +0 -0
- package/dist/templates/expo-base/assets/images/react-logo@3x.png +0 -0
- package/dist/templates/expo-base/assets/images/splash-icon.png +0 -0
- package/dist/templates/expo-base/components/external-link.tsx +25 -0
- package/dist/templates/expo-base/components/haptic-tab.tsx +18 -0
- package/dist/templates/expo-base/components/hello-wave.tsx +19 -0
- package/dist/templates/expo-base/components/parallax-scroll-view.tsx +79 -0
- package/dist/templates/expo-base/components/themed-text.tsx +60 -0
- package/dist/templates/expo-base/components/themed-view.tsx +14 -0
- package/dist/templates/expo-base/components/ui/collapsible.tsx +45 -0
- package/dist/templates/expo-base/components/ui/icon-symbol.ios.tsx +32 -0
- package/dist/templates/expo-base/components/ui/icon-symbol.tsx +41 -0
- package/dist/templates/expo-base/constants/theme.ts +53 -0
- package/dist/templates/expo-base/eslint.config.js +10 -0
- package/dist/templates/expo-base/hooks/use-color-scheme.ts +1 -0
- package/dist/templates/expo-base/hooks/use-color-scheme.web.ts +21 -0
- package/dist/templates/expo-base/hooks/use-theme-color.ts +21 -0
- package/dist/templates/expo-base/package-lock.json +12916 -0
- package/dist/templates/expo-base/package.json +47 -0
- package/dist/templates/expo-base/scripts/reset-project.js +112 -0
- package/dist/templates/expo-base/tsconfig.json +17 -0
- package/dist/templates/optional/apiClient/api/client.axios.ts +124 -0
- package/dist/templates/optional/apiClient/api/client.ts +142 -0
- package/dist/templates/optional/apiClient/api/index.ts +1 -0
- package/dist/templates/optional/apiClient/config/env.cli.ts +5 -0
- package/dist/templates/optional/apiClient/config/env.expo.ts +4 -0
- package/dist/templates/optional/apiClient/config/env.ts +1 -0
- package/dist/templates/optional/apiClient/env.d.ts +3 -0
- package/dist/templates/optional/auth-context/api/authApi.ts +14 -0
- package/dist/templates/optional/auth-context/context/AuthContext.tsx +47 -0
- package/dist/templates/optional/auth-context/navigation/ProtectedStack.tsx +38 -0
- package/dist/templates/optional/auth-context/navigation/cli/BottomTabs.tsx +17 -0
- package/dist/templates/optional/auth-context/navigation/expo/BottomTabs.tsx +29 -0
- package/dist/templates/optional/auth-context/screens/HomeScreen.tsx +14 -0
- package/dist/templates/optional/auth-context/screens/LoginScreen.tsx +28 -0
- package/dist/templates/optional/auth-context/screens/ProfileScreen.tsx +10 -0
- package/dist/templates/optional/auth-context/screens/RegisterScreen.tsx +28 -0
- package/dist/templates/optional/auth-context/screens/SettingsScreen.tsx +10 -0
- package/dist/templates/optional/auth-context/utils/storage.ts +13 -0
- package/dist/templates/optional/auth-redux/api/authApi.ts +14 -0
- package/dist/templates/optional/auth-redux/navigation/ProtectedStack.tsx +30 -0
- package/dist/templates/optional/auth-redux/navigation/cli/BottomTabs.tsx +17 -0
- package/dist/templates/optional/auth-redux/navigation/expo/BottomTabs.tsx +31 -0
- package/dist/templates/optional/auth-redux/screens/HomeScreen.tsx +15 -0
- package/dist/templates/optional/auth-redux/screens/LoginScreen.tsx +29 -0
- package/dist/templates/optional/auth-redux/screens/ProfileScreen.tsx +14 -0
- package/dist/templates/optional/auth-redux/screens/RegisterScreen.tsx +14 -0
- package/dist/templates/optional/auth-redux/screens/SettingsScreen.tsx +14 -0
- package/dist/templates/optional/auth-redux/store/authSlice.ts +25 -0
- package/dist/templates/optional/auth-redux/store/store.ts +11 -0
- package/dist/templates/optional/auth-zustand/api/authApi.ts +14 -0
- package/dist/templates/optional/auth-zustand/navigation/BottomTabs.tsx +1 -0
- package/dist/templates/optional/auth-zustand/navigation/ProtectedStack.tsx +44 -0
- package/dist/templates/optional/auth-zustand/navigation/cli/BottomTabs.tsx +17 -0
- package/dist/templates/optional/auth-zustand/navigation/expo/BottomTabs.tsx +31 -0
- package/dist/templates/optional/auth-zustand/screens/HomeScreen.tsx +14 -0
- package/dist/templates/optional/auth-zustand/screens/LoginScreen.tsx +28 -0
- package/dist/templates/optional/auth-zustand/screens/ProfileScreen.tsx +10 -0
- package/dist/templates/optional/auth-zustand/screens/RegisterScreen.tsx +28 -0
- package/dist/templates/optional/auth-zustand/screens/SettingsScreen.tsx +10 -0
- package/dist/templates/optional/auth-zustand/store/authStore.ts +30 -0
- package/dist/templates/optional/auth-zustand/utils/storage.ts +13 -0
- package/package.json +2 -2
|
@@ -55,6 +55,12 @@ async function main() {
|
|
|
55
55
|
message: "Validation libraries?",
|
|
56
56
|
choices: ["Formik", "React Hook Form", "Yup"],
|
|
57
57
|
default: [],
|
|
58
|
+
validate: (selected) => {
|
|
59
|
+
if (selected.includes("Formik") && !selected.includes("Yup")) {
|
|
60
|
+
return "Formik requires Yup in this starter. Select Yup as well.";
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
},
|
|
58
64
|
},
|
|
59
65
|
{
|
|
60
66
|
type: "rawlist",
|
|
@@ -15,7 +15,7 @@ async function generateApp(options) {
|
|
|
15
15
|
const targetPath = path_1.default.join(process.cwd(), projectName);
|
|
16
16
|
console.log("📂 Creating project...");
|
|
17
17
|
await fs_extra_1.default.copy(templatePath, targetPath, {
|
|
18
|
-
filter: (src) => shouldCopyPath(src),
|
|
18
|
+
filter: (src) => shouldCopyPath(src, templatePath),
|
|
19
19
|
});
|
|
20
20
|
await replaceProjectName(targetPath, projectName);
|
|
21
21
|
await createStandardStructure(targetPath);
|
|
@@ -198,6 +198,7 @@ export const queryClient = new QueryClient();
|
|
|
198
198
|
}
|
|
199
199
|
async function configureApiClientTransport(targetPath, apiClient, apiClientType) {
|
|
200
200
|
if (apiClient && apiClientType === "Axios") {
|
|
201
|
+
const templateRoot = await resolveTemplateRoot();
|
|
201
202
|
await ensureDependencies(targetPath, {
|
|
202
203
|
dependencies: {
|
|
203
204
|
axios: "^1.12.2",
|
|
@@ -211,88 +212,9 @@ export const axiosClient = axios.create({
|
|
|
211
212
|
timeout: 15000,
|
|
212
213
|
});
|
|
213
214
|
`);
|
|
214
|
-
await fs_extra_1.default.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
export class ApiError extends Error {
|
|
218
|
-
status: number;
|
|
219
|
-
data: unknown;
|
|
220
|
-
|
|
221
|
-
constructor(status: number, message: string, data: unknown) {
|
|
222
|
-
super(message);
|
|
223
|
-
this.name = "ApiError";
|
|
224
|
-
this.status = status;
|
|
225
|
-
this.data = data;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
type RequestOptions = {
|
|
230
|
-
headers?: Record<string, string>;
|
|
231
|
-
query?: Record<string, string | number | boolean | undefined>;
|
|
232
|
-
token?: string | null;
|
|
233
|
-
signal?: AbortSignal;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const client = axios.create({
|
|
237
|
-
baseURL: API_BASE_URL,
|
|
238
|
-
timeout: 15000,
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
function resolveErrorMessage(data: unknown, status: number) {
|
|
242
|
-
if (
|
|
243
|
-
typeof data === "object" &&
|
|
244
|
-
data !== null &&
|
|
245
|
-
"message" in data &&
|
|
246
|
-
typeof (data as { message: unknown }).message === "string"
|
|
247
|
-
) {
|
|
248
|
-
return (data as { message: string }).message;
|
|
249
|
-
}
|
|
250
|
-
return \`Request failed with status \${status}\`;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
async function request<T>(
|
|
254
|
-
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE",
|
|
255
|
-
path: string,
|
|
256
|
-
body?: unknown,
|
|
257
|
-
options: RequestOptions = {},
|
|
258
|
-
): Promise<T> {
|
|
259
|
-
const { headers = {}, query, token, signal } = options;
|
|
260
|
-
try {
|
|
261
|
-
const response = await client.request<T>({
|
|
262
|
-
method,
|
|
263
|
-
url: path,
|
|
264
|
-
data: body,
|
|
265
|
-
params: query,
|
|
266
|
-
signal,
|
|
267
|
-
headers: {
|
|
268
|
-
...(token ? { Authorization: \`Bearer \${token}\` } : {}),
|
|
269
|
-
...headers,
|
|
270
|
-
},
|
|
271
|
-
});
|
|
272
|
-
return response.data;
|
|
273
|
-
} catch (error) {
|
|
274
|
-
if (axios.isAxiosError(error)) {
|
|
275
|
-
const status = error.response?.status ?? 500;
|
|
276
|
-
const data = error.response?.data ?? null;
|
|
277
|
-
throw new ApiError(status, resolveErrorMessage(data, status), data);
|
|
278
|
-
}
|
|
279
|
-
throw error;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export const apiClient = {
|
|
284
|
-
get: <T>(path: string, options?: RequestOptions) =>
|
|
285
|
-
request<T>("GET", path, undefined, options),
|
|
286
|
-
post: <T>(path: string, body?: unknown, options?: RequestOptions) =>
|
|
287
|
-
request<T>("POST", path, body, options),
|
|
288
|
-
put: <T>(path: string, body?: unknown, options?: RequestOptions) =>
|
|
289
|
-
request<T>("PUT", path, body, options),
|
|
290
|
-
patch: <T>(path: string, body?: unknown, options?: RequestOptions) =>
|
|
291
|
-
request<T>("PATCH", path, body, options),
|
|
292
|
-
delete: <T>(path: string, options?: RequestOptions) =>
|
|
293
|
-
request<T>("DELETE", path, undefined, options),
|
|
294
|
-
};
|
|
295
|
-
`, "utf8");
|
|
215
|
+
await fs_extra_1.default.copy(path_1.default.join(templateRoot, "optional/apiClient/api/client.axios.ts"), path_1.default.join(targetPath, "api/client.ts"), {
|
|
216
|
+
overwrite: true,
|
|
217
|
+
});
|
|
296
218
|
}
|
|
297
219
|
}
|
|
298
220
|
async function configureValidation(targetPath, validation) {
|
|
@@ -376,7 +298,9 @@ async function writeIfMissing(filePath, content) {
|
|
|
376
298
|
async function resolveTemplateRoot() {
|
|
377
299
|
const candidates = [
|
|
378
300
|
path_1.default.join(__dirname, "../templates"), // ts-node: src/generators -> src/templates
|
|
379
|
-
path_1.default.join(__dirname, "../../templates"), //
|
|
301
|
+
path_1.default.join(__dirname, "../../templates"), // dist/src/generators -> dist/templates
|
|
302
|
+
path_1.default.join(__dirname, "../../../src/templates"), // fallback for packaged source templates
|
|
303
|
+
path_1.default.join(process.cwd(), "src/templates"), // local fallback during development
|
|
380
304
|
];
|
|
381
305
|
for (const candidate of candidates) {
|
|
382
306
|
if (await fs_extra_1.default.pathExists(candidate))
|
|
@@ -384,18 +308,20 @@ async function resolveTemplateRoot() {
|
|
|
384
308
|
}
|
|
385
309
|
throw new Error("Template root not found.");
|
|
386
310
|
}
|
|
387
|
-
function shouldCopyPath(src) {
|
|
388
|
-
const
|
|
311
|
+
function shouldCopyPath(src, templatePath) {
|
|
312
|
+
const relative = path_1.default.relative(templatePath, src).replace(/\\/g, "/");
|
|
313
|
+
if (!relative || relative === ".")
|
|
314
|
+
return true;
|
|
389
315
|
const blockedSegments = [
|
|
390
|
-
"
|
|
391
|
-
"
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
"
|
|
316
|
+
".git",
|
|
317
|
+
"node_modules",
|
|
318
|
+
"ios/Pods",
|
|
319
|
+
"android/.gradle",
|
|
320
|
+
"vendor/bundle",
|
|
395
321
|
];
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
322
|
+
return !blockedSegments.some((segment) => relative === segment ||
|
|
323
|
+
relative.startsWith(`${segment}/`) ||
|
|
324
|
+
relative.includes(`/${segment}/`));
|
|
399
325
|
}
|
|
400
326
|
function isTextFile(filePath) {
|
|
401
327
|
const extension = path_1.default.extname(filePath).toLowerCase();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sample React Native App
|
|
3
|
+
* https://github.com/facebook/react-native
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { NewAppScreen } from '@react-native/new-app-screen';
|
|
9
|
+
import { StatusBar, StyleSheet, useColorScheme, View } from 'react-native';
|
|
10
|
+
import {
|
|
11
|
+
SafeAreaProvider,
|
|
12
|
+
useSafeAreaInsets,
|
|
13
|
+
} from 'react-native-safe-area-context';
|
|
14
|
+
|
|
15
|
+
function App() {
|
|
16
|
+
const isDarkMode = useColorScheme() === 'dark';
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<SafeAreaProvider>
|
|
20
|
+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
|
|
21
|
+
<AppContent />
|
|
22
|
+
</SafeAreaProvider>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function AppContent() {
|
|
27
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<View style={styles.container}>
|
|
31
|
+
<NewAppScreen
|
|
32
|
+
templateFileName="App.tsx"
|
|
33
|
+
safeAreaInsets={safeAreaInsets}
|
|
34
|
+
/>
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
container: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export default App;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
|
+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
+
gem 'xcodeproj', '< 1.26.0'
|
|
10
|
+
gem 'concurrent-ruby', '< 1.3.4'
|
|
11
|
+
|
|
12
|
+
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
13
|
+
gem 'bigdecimal'
|
|
14
|
+
gem 'logger'
|
|
15
|
+
gem 'benchmark'
|
|
16
|
+
gem 'mutex_m'
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
CFPropertyList (3.0.8)
|
|
5
|
+
activesupport (7.2.3)
|
|
6
|
+
base64
|
|
7
|
+
benchmark (>= 0.3)
|
|
8
|
+
bigdecimal
|
|
9
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
10
|
+
connection_pool (>= 2.2.5)
|
|
11
|
+
drb
|
|
12
|
+
i18n (>= 1.6, < 2)
|
|
13
|
+
logger (>= 1.4.2)
|
|
14
|
+
minitest (>= 5.1)
|
|
15
|
+
securerandom (>= 0.3)
|
|
16
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
17
|
+
addressable (2.8.8)
|
|
18
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
19
|
+
algoliasearch (1.27.5)
|
|
20
|
+
httpclient (~> 2.8, >= 2.8.3)
|
|
21
|
+
json (>= 1.5.1)
|
|
22
|
+
atomos (0.1.3)
|
|
23
|
+
base64 (0.3.0)
|
|
24
|
+
benchmark (0.5.0)
|
|
25
|
+
bigdecimal (4.0.1)
|
|
26
|
+
claide (1.1.0)
|
|
27
|
+
cocoapods (1.15.2)
|
|
28
|
+
addressable (~> 2.8)
|
|
29
|
+
claide (>= 1.0.2, < 2.0)
|
|
30
|
+
cocoapods-core (= 1.15.2)
|
|
31
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
32
|
+
cocoapods-downloader (>= 2.1, < 3.0)
|
|
33
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
34
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
35
|
+
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
36
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
37
|
+
colored2 (~> 3.1)
|
|
38
|
+
escape (~> 0.0.4)
|
|
39
|
+
fourflusher (>= 2.3.0, < 3.0)
|
|
40
|
+
gh_inspector (~> 1.0)
|
|
41
|
+
molinillo (~> 0.8.0)
|
|
42
|
+
nap (~> 1.0)
|
|
43
|
+
ruby-macho (>= 2.3.0, < 3.0)
|
|
44
|
+
xcodeproj (>= 1.23.0, < 2.0)
|
|
45
|
+
cocoapods-core (1.15.2)
|
|
46
|
+
activesupport (>= 5.0, < 8)
|
|
47
|
+
addressable (~> 2.8)
|
|
48
|
+
algoliasearch (~> 1.0)
|
|
49
|
+
concurrent-ruby (~> 1.1)
|
|
50
|
+
fuzzy_match (~> 2.0.4)
|
|
51
|
+
nap (~> 1.0)
|
|
52
|
+
netrc (~> 0.11)
|
|
53
|
+
public_suffix (~> 4.0)
|
|
54
|
+
typhoeus (~> 1.0)
|
|
55
|
+
cocoapods-deintegrate (1.0.5)
|
|
56
|
+
cocoapods-downloader (2.1)
|
|
57
|
+
cocoapods-plugins (1.0.0)
|
|
58
|
+
nap
|
|
59
|
+
cocoapods-search (1.0.1)
|
|
60
|
+
cocoapods-trunk (1.6.0)
|
|
61
|
+
nap (>= 0.8, < 2.0)
|
|
62
|
+
netrc (~> 0.11)
|
|
63
|
+
cocoapods-try (1.2.0)
|
|
64
|
+
colored2 (3.1.2)
|
|
65
|
+
concurrent-ruby (1.3.3)
|
|
66
|
+
connection_pool (3.0.2)
|
|
67
|
+
drb (2.2.3)
|
|
68
|
+
escape (0.0.4)
|
|
69
|
+
ethon (0.15.0)
|
|
70
|
+
ffi (>= 1.15.0)
|
|
71
|
+
ffi (1.17.3)
|
|
72
|
+
fourflusher (2.3.1)
|
|
73
|
+
fuzzy_match (2.0.4)
|
|
74
|
+
gh_inspector (1.1.3)
|
|
75
|
+
httpclient (2.9.0)
|
|
76
|
+
mutex_m
|
|
77
|
+
i18n (1.14.8)
|
|
78
|
+
concurrent-ruby (~> 1.0)
|
|
79
|
+
json (2.18.1)
|
|
80
|
+
logger (1.7.0)
|
|
81
|
+
minitest (6.0.1)
|
|
82
|
+
prism (~> 1.5)
|
|
83
|
+
molinillo (0.8.0)
|
|
84
|
+
mutex_m (0.3.0)
|
|
85
|
+
nanaimo (0.3.0)
|
|
86
|
+
nap (1.1.0)
|
|
87
|
+
netrc (0.11.0)
|
|
88
|
+
prism (1.9.0)
|
|
89
|
+
public_suffix (4.0.7)
|
|
90
|
+
rexml (3.4.4)
|
|
91
|
+
ruby-macho (2.5.1)
|
|
92
|
+
securerandom (0.4.1)
|
|
93
|
+
typhoeus (1.5.0)
|
|
94
|
+
ethon (>= 0.9.0, < 0.16.0)
|
|
95
|
+
tzinfo (2.0.6)
|
|
96
|
+
concurrent-ruby (~> 1.0)
|
|
97
|
+
xcodeproj (1.25.1)
|
|
98
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
|
99
|
+
atomos (~> 0.1.3)
|
|
100
|
+
claide (>= 1.0.2, < 2.0)
|
|
101
|
+
colored2 (~> 3.1)
|
|
102
|
+
nanaimo (~> 0.3.0)
|
|
103
|
+
rexml (>= 3.3.6, < 4.0)
|
|
104
|
+
|
|
105
|
+
PLATFORMS
|
|
106
|
+
ruby
|
|
107
|
+
|
|
108
|
+
DEPENDENCIES
|
|
109
|
+
activesupport (>= 6.1.7.5, != 7.1.0)
|
|
110
|
+
benchmark
|
|
111
|
+
bigdecimal
|
|
112
|
+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
|
|
113
|
+
concurrent-ruby (< 1.3.4)
|
|
114
|
+
logger
|
|
115
|
+
mutex_m
|
|
116
|
+
xcodeproj (< 1.26.0)
|
|
117
|
+
|
|
118
|
+
CHECKSUMS
|
|
119
|
+
CFPropertyList (3.0.8) sha256=2c99d0d980536d3d7ab252f7bd59ac8be50fbdd1ff487c98c949bb66bb114261
|
|
120
|
+
activesupport (7.2.3) sha256=5675c9770dac93e371412684249f9dc3c8cec104efd0624362a520ae685c7b10
|
|
121
|
+
addressable (2.8.8) sha256=7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057
|
|
122
|
+
algoliasearch (1.27.5) sha256=26c1cddf3c2ec4bd60c148389e42702c98fdac862881dc6b07a4c0b89ffec853
|
|
123
|
+
atomos (0.1.3) sha256=7d43b22f2454a36bace5532d30785b06de3711399cb1c6bf932573eda536789f
|
|
124
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
125
|
+
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
126
|
+
bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
|
|
127
|
+
claide (1.1.0) sha256=6d3c5c089dde904d96aa30e73306d0d4bd444b1accb9b3125ce14a3c0183f82e
|
|
128
|
+
cocoapods (1.15.2) sha256=f0f5153de8d028d133b96f423e04f37fb97a1da0d11dda581a9f46c0cba4090a
|
|
129
|
+
cocoapods-core (1.15.2) sha256=322650d97fe1ad4c0831a09669764b888bd91c6d79d0f6bb07281a17667a2136
|
|
130
|
+
cocoapods-deintegrate (1.0.5) sha256=517c2a448ef563afe99b6e7668704c27f5de9e02715a88ee9de6974dc1b3f6a2
|
|
131
|
+
cocoapods-downloader (2.1) sha256=bb6ebe1b3966dc4055de54f7a28b773485ac724fdf575d9bee2212d235e7b6d1
|
|
132
|
+
cocoapods-plugins (1.0.0) sha256=725d17ce90b52f862e73476623fd91441b4430b742d8a071000831efb440ca9a
|
|
133
|
+
cocoapods-search (1.0.1) sha256=1b133b0e6719ed439bd840e84a1828cca46425ab73a11eff5e096c3b2df05589
|
|
134
|
+
cocoapods-trunk (1.6.0) sha256=5f5bda8c172afead48fa2d43a718cf534b1313c367ba1194cebdeb9bfee9ed31
|
|
135
|
+
cocoapods-try (1.2.0) sha256=145b946c6e7747ed0301d975165157951153d27469e6b2763c83e25c84b9defe
|
|
136
|
+
colored2 (3.1.2) sha256=b13c2bd7eeae2cf7356a62501d398e72fde78780bd26aec6a979578293c28b4a
|
|
137
|
+
concurrent-ruby (1.3.3) sha256=4f9cd28965c4dcf83ffd3ea7304f9323277be8525819cb18a3b61edcb56a7c6a
|
|
138
|
+
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
139
|
+
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
140
|
+
escape (0.0.4) sha256=e49f44ae2b4f47c6a3abd544ae77fe4157802794e32f19b8e773cbc4dcec4169
|
|
141
|
+
ethon (0.15.0) sha256=0809805a035bc10f54162ca99f15ded49e428e0488bcfe1c08c821e18261a74d
|
|
142
|
+
ffi (1.17.3) sha256=0e9f39f7bb3934f77ad6feab49662be77e87eedcdeb2a3f5c0234c2938563d4c
|
|
143
|
+
fourflusher (2.3.1) sha256=1b3de61c7c791b6a4e64f31e3719eb25203d151746bb519a0292bff1065ccaa9
|
|
144
|
+
fuzzy_match (2.0.4) sha256=b5de4f95816589c5b5c3ad13770c0af539b75131c158135b3f3bbba75d0cfca5
|
|
145
|
+
gh_inspector (1.1.3) sha256=04cca7171b87164e053aa43147971d3b7f500fcb58177698886b48a9fc4a1939
|
|
146
|
+
httpclient (2.9.0) sha256=4b645958e494b2f86c2f8a2f304c959baa273a310e77a2931ddb986d83e498c8
|
|
147
|
+
i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
|
|
148
|
+
json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
|
|
149
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
150
|
+
minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
|
|
151
|
+
molinillo (0.8.0) sha256=efbff2716324e2a30bccd3eba1ff3a735f4d5d53ffddbc6a2f32c0ca9433045d
|
|
152
|
+
mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751
|
|
153
|
+
nanaimo (0.3.0) sha256=aaaedc60497070b864a7e220f7c4b4cad3a0daddda2c30055ba8dae306342376
|
|
154
|
+
nap (1.1.0) sha256=949691660f9d041d75be611bb2a8d2fd559c467537deac241f4097d9b5eea576
|
|
155
|
+
netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
|
|
156
|
+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
157
|
+
public_suffix (4.0.7) sha256=8be161e2421f8d45b0098c042c06486789731ea93dc3a896d30554ee38b573b8
|
|
158
|
+
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
|
159
|
+
ruby-macho (2.5.1) sha256=9075e52e0f9270b552a90b24fcc6219ad149b0d15eae1bc364ecd0ac8984f5c9
|
|
160
|
+
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
161
|
+
typhoeus (1.5.0) sha256=120b67ed1ef515e6c0e938176db880f15b0916f038e78ce2a66290f3f1de3e3b
|
|
162
|
+
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
163
|
+
xcodeproj (1.25.1) sha256=9a2310dccf6d717076e86f602b17c640046b6f1dfe64480044596f6f2f13dc84
|
|
164
|
+
|
|
165
|
+
RUBY VERSION
|
|
166
|
+
ruby 3.2.2
|
|
167
|
+
|
|
168
|
+
BUNDLED WITH
|
|
169
|
+
4.0.1
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
|
|
2
|
+
|
|
3
|
+
# Getting Started
|
|
4
|
+
|
|
5
|
+
> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
|
|
6
|
+
|
|
7
|
+
## Step 1: Start Metro
|
|
8
|
+
|
|
9
|
+
First, you will need to run **Metro**, the JavaScript build tool for React Native.
|
|
10
|
+
|
|
11
|
+
To start the Metro dev server, run the following command from the root of your React Native project:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
# Using npm
|
|
15
|
+
npm start
|
|
16
|
+
|
|
17
|
+
# OR using Yarn
|
|
18
|
+
yarn start
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Step 2: Build and run your app
|
|
22
|
+
|
|
23
|
+
With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:
|
|
24
|
+
|
|
25
|
+
### Android
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
# Using npm
|
|
29
|
+
npm run android
|
|
30
|
+
|
|
31
|
+
# OR using Yarn
|
|
32
|
+
yarn android
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### iOS
|
|
36
|
+
|
|
37
|
+
For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).
|
|
38
|
+
|
|
39
|
+
The first time you create a new project, run the Ruby bundler to install CocoaPods itself:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
bundle install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then, and every time you update your native dependencies, run:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
bundle exec pod install
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
# Using npm
|
|
55
|
+
npm run ios
|
|
56
|
+
|
|
57
|
+
# OR using Yarn
|
|
58
|
+
yarn ios
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.
|
|
62
|
+
|
|
63
|
+
This is one way to run your app — you can also build it directly from Android Studio or Xcode.
|
|
64
|
+
|
|
65
|
+
## Step 3: Modify your app
|
|
66
|
+
|
|
67
|
+
Now that you have successfully run the app, let's make changes!
|
|
68
|
+
|
|
69
|
+
Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).
|
|
70
|
+
|
|
71
|
+
When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:
|
|
72
|
+
|
|
73
|
+
- **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).
|
|
74
|
+
- **iOS**: Press <kbd>R</kbd> in iOS Simulator.
|
|
75
|
+
|
|
76
|
+
## Congratulations! :tada:
|
|
77
|
+
|
|
78
|
+
You've successfully run and modified your React Native App. :partying_face:
|
|
79
|
+
|
|
80
|
+
### Now what?
|
|
81
|
+
|
|
82
|
+
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
|
|
83
|
+
- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).
|
|
84
|
+
|
|
85
|
+
# Troubleshooting
|
|
86
|
+
|
|
87
|
+
If you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
|
|
88
|
+
|
|
89
|
+
# Learn More
|
|
90
|
+
|
|
91
|
+
To learn more about React Native, take a look at the following resources:
|
|
92
|
+
|
|
93
|
+
- [React Native Website](https://reactnative.dev) - learn more about React Native.
|
|
94
|
+
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
|
|
95
|
+
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
|
|
96
|
+
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
|
|
97
|
+
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @format
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import ReactTestRenderer from 'react-test-renderer';
|
|
7
|
+
import App from '../App';
|
|
8
|
+
|
|
9
|
+
test('renders correctly', async () => {
|
|
10
|
+
await ReactTestRenderer.act(() => {
|
|
11
|
+
ReactTestRenderer.create(<App />);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
apply plugin: "com.android.application"
|
|
2
|
+
apply plugin: "org.jetbrains.kotlin.android"
|
|
3
|
+
apply plugin: "com.facebook.react"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This is the configuration block to customize your React Native Android app.
|
|
7
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
8
|
+
*/
|
|
9
|
+
react {
|
|
10
|
+
/* Folders */
|
|
11
|
+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
|
12
|
+
// root = file("../../")
|
|
13
|
+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
|
14
|
+
// reactNativeDir = file("../../node_modules/react-native")
|
|
15
|
+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
|
16
|
+
// codegenDir = file("../../node_modules/@react-native/codegen")
|
|
17
|
+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
|
|
18
|
+
// cliFile = file("../../node_modules/react-native/cli.js")
|
|
19
|
+
|
|
20
|
+
/* Variants */
|
|
21
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
22
|
+
// skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
|
|
23
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
24
|
+
// debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]
|
|
25
|
+
|
|
26
|
+
/* Bundling */
|
|
27
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
28
|
+
// nodeExecutableAndArgs = ["node"]
|
|
29
|
+
//
|
|
30
|
+
// The command to run when bundling. By default is 'bundle'
|
|
31
|
+
// bundleCommand = "ram-bundle"
|
|
32
|
+
//
|
|
33
|
+
// The path to the CLI configuration file. Default is empty.
|
|
34
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
35
|
+
//
|
|
36
|
+
// The name of the generated asset file containing your JS bundle
|
|
37
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
38
|
+
//
|
|
39
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
40
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
41
|
+
//
|
|
42
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
43
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
44
|
+
// extraPackagerArgs = []
|
|
45
|
+
|
|
46
|
+
/* Hermes Commands */
|
|
47
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
48
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
49
|
+
//
|
|
50
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
51
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
52
|
+
|
|
53
|
+
/* Autolinking */
|
|
54
|
+
autolinkLibrariesWithApp()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
59
|
+
*/
|
|
60
|
+
def enableProguardInReleaseBuilds = false
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
64
|
+
*
|
|
65
|
+
* For example, to use the international variant, you can use:
|
|
66
|
+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
|
|
67
|
+
*
|
|
68
|
+
* The international variant includes ICU i18n library and necessary data
|
|
69
|
+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
70
|
+
* give correct results when using with locales other than en-US. Note that
|
|
71
|
+
* this variant is about 6MiB larger per architecture than default.
|
|
72
|
+
*/
|
|
73
|
+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
|
74
|
+
|
|
75
|
+
android {
|
|
76
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
77
|
+
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
78
|
+
compileSdk rootProject.ext.compileSdkVersion
|
|
79
|
+
|
|
80
|
+
namespace "com.baseapp"
|
|
81
|
+
defaultConfig {
|
|
82
|
+
applicationId "com.baseapp"
|
|
83
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
84
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
85
|
+
versionCode 1
|
|
86
|
+
versionName "1.0"
|
|
87
|
+
}
|
|
88
|
+
signingConfigs {
|
|
89
|
+
debug {
|
|
90
|
+
storeFile file('debug.keystore')
|
|
91
|
+
storePassword 'android'
|
|
92
|
+
keyAlias 'androiddebugkey'
|
|
93
|
+
keyPassword 'android'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
buildTypes {
|
|
97
|
+
debug {
|
|
98
|
+
signingConfig signingConfigs.debug
|
|
99
|
+
}
|
|
100
|
+
release {
|
|
101
|
+
// Caution! In production, you need to generate your own keystore file.
|
|
102
|
+
// see https://reactnative.dev/docs/signed-apk-android.
|
|
103
|
+
signingConfig signingConfigs.debug
|
|
104
|
+
minifyEnabled enableProguardInReleaseBuilds
|
|
105
|
+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
dependencies {
|
|
111
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
112
|
+
implementation("com.facebook.react:react-android")
|
|
113
|
+
|
|
114
|
+
if (hermesEnabled.toBoolean()) {
|
|
115
|
+
implementation("com.facebook.react:hermes-android")
|
|
116
|
+
} else {
|
|
117
|
+
implementation jscFlavor
|
|
118
|
+
}
|
|
119
|
+
}
|
|
Binary file
|
|
@@ -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:
|