expo-test-runner 0.0.10 → 0.0.13

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.
Files changed (98) hide show
  1. package/.eslintrc.js +2 -28
  2. package/build/BundlerController.js +7 -8
  3. package/build/BundlerController.js.map +1 -1
  4. package/build/ConfigReader.js +1 -1
  5. package/build/ConfigReader.js.map +1 -1
  6. package/build/Paths.js +1 -1
  7. package/build/Paths.js.map +1 -1
  8. package/build/TemplateEvaluator.js +6 -2
  9. package/build/TemplateEvaluator.js.map +1 -1
  10. package/build/TemplateFile.js +9 -5
  11. package/build/TemplateFile.js.map +1 -1
  12. package/build/TemplateProject.d.ts +25 -0
  13. package/build/TemplateProject.js +167 -0
  14. package/build/TemplateProject.js.map +1 -0
  15. package/build/Utils.js +4 -4
  16. package/build/Utils.js.map +1 -1
  17. package/build/commands/CreateProject.js +3 -3
  18. package/build/commands/CreateProject.js.map +1 -1
  19. package/build/commands/RunTest.js +8 -4
  20. package/build/commands/RunTest.js.map +1 -1
  21. package/build/index.js +1 -1
  22. package/build/index.js.map +1 -1
  23. package/build/registerCommand.js +6 -3
  24. package/build/registerCommand.js.map +1 -1
  25. package/package.json +26 -21
  26. package/src/BundlerController.ts +2 -2
  27. package/src/TemplateProject.ts +208 -0
  28. package/src/Utils.ts +2 -2
  29. package/src/commands/CreateProject.ts +2 -2
  30. package/src/commands/RunTest.ts +2 -2
  31. package/src/index.ts +1 -1
  32. package/src/registerCommand.ts +1 -1
  33. package/templates/detox/android/app/build.gradle +202 -24
  34. package/templates/detox/android/app/src/androidTest/java/com/testrunner/DetoxTest.java +79 -18
  35. package/templates/detox/android/app/src/main/java/com/testrunner/MainApplication.java +129 -0
  36. package/templates/detox/android/build.gradle +34 -17
  37. package/templates/detox/ios/devcliente2e/main.m +31 -0
  38. package/tsconfig.json +1 -1
  39. package/.prettierrc +0 -10
  40. package/build/Platform.ds.d.ts +0 -4
  41. package/build/Platform.ds.js +0 -9
  42. package/build/Platform.ds.js.map +0 -1
  43. package/build/ProjectFile.d.ts +0 -0
  44. package/build/ProjectFile.js +0 -2
  45. package/build/ProjectFile.js.map +0 -1
  46. package/build/TemplateParser.d.ts +0 -6
  47. package/build/TemplateParser.js +0 -37
  48. package/build/TemplateParser.js.map +0 -1
  49. package/build/commands/create-project.d.ts +0 -3
  50. package/build/commands/create-project.js +0 -12
  51. package/build/commands/create-project.js.map +0 -1
  52. package/build/presets/DetoxTemplate.d.ts +0 -13
  53. package/build/presets/DetoxTemplate.js +0 -79
  54. package/build/presets/DetoxTemplate.js.map +0 -1
  55. package/build/presets/PresetTemplate.d.ts +0 -25
  56. package/build/presets/PresetTemplate.js +0 -147
  57. package/build/presets/PresetTemplate.js.map +0 -1
  58. package/src/presets/DetoxTemplate.ts +0 -94
  59. package/src/presets/PresetTemplate.ts +0 -171
  60. package/templates/basic/android/app/BUCK +0 -55
  61. package/templates/basic/android/app/build.gradle +0 -188
  62. package/templates/basic/android/app/build_defs.bzl +0 -19
  63. package/templates/basic/android/app/debug.keystore +0 -0
  64. package/templates/basic/android/app/proguard-rules.pro +0 -10
  65. package/templates/basic/android/app/src/main/AndroidManifest.xml +0 -16
  66. package/templates/basic/android/app/src/main/java/com/testrunner/MainActivity.java +0 -28
  67. package/templates/basic/android/app/src/main/java/com/testrunner/MainApplication.java +0 -57
  68. package/templates/basic/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  69. package/templates/basic/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  70. package/templates/basic/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  71. package/templates/basic/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  72. package/templates/basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  73. package/templates/basic/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  74. package/templates/basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  75. package/templates/basic/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  76. package/templates/basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  77. package/templates/basic/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  78. package/templates/basic/android/app/src/main/res/values/styles.xml +0 -14
  79. package/templates/basic/android/build.gradle +0 -38
  80. package/templates/basic/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  81. package/templates/basic/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  82. package/templates/basic/android/gradle.properties +0 -26
  83. package/templates/basic/android/gradlew +0 -183
  84. package/templates/basic/android/gradlew.bat +0 -103
  85. package/templates/basic/android/settings.gradle +0 -10
  86. package/templates/basic/babel.config.js +0 -6
  87. package/templates/basic/ios/Podfile +0 -37
  88. package/templates/basic/ios/project.yml +0 -10
  89. package/templates/basic/ios/src/AppDelegate.h +0 -9
  90. package/templates/basic/ios/src/AppDelegate.m +0 -62
  91. package/templates/basic/ios/src/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  92. package/templates/basic/ios/src/Images.xcassets/Contents.json +0 -6
  93. package/templates/basic/ios/src/Info.plist +0 -55
  94. package/templates/basic/ios/src/LaunchScreen.storyboard +0 -47
  95. package/templates/basic/ios/src/dummy.swift +0 -0
  96. package/templates/basic/ios/src/main.m +0 -9
  97. package/templates/basic/package.json +0 -37
  98. package/templates/basic/tsconfig.json +0 -6
@@ -1,171 +0,0 @@
1
- import spawnAsync from '@expo/spawn-async';
2
- import { Definitions } from 'dot';
3
- import * as fs from 'fs-extra';
4
- import { join } from 'path';
5
-
6
- import { Application, Dependency, Test } from '../Config';
7
- import { SelfPath } from '../Paths';
8
- import { Platform } from '../Platform';
9
- import TemplateEvaluator from '../TemplateEvaluator';
10
- import { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';
11
- import { yarnInstall } from '../Utils';
12
-
13
- export default class PresetTemplate {
14
- constructor(
15
- protected config: Application,
16
- protected name: string,
17
- protected platform: Platform,
18
- protected configFilePath: string
19
- ) {}
20
-
21
- async createApplicationAsync(projectPath: string) {
22
- if (!fs.existsSync(projectPath)) {
23
- await fs.mkdir(projectPath, { recursive: true });
24
- }
25
-
26
- const templateFiles = Object.fromEntries(
27
- Object.entries(this.getTemplateFiles()).filter(
28
- ([_, info]) => (info.platform & this.platform) > 0
29
- )
30
- );
31
-
32
- await this.copyFilesAsync(projectPath, templateFiles);
33
- await this.evaluateFiles(projectPath, templateFiles);
34
-
35
- yarnInstall(projectPath);
36
-
37
- if ((this.platform & Platform.iOS) > 0) {
38
- await spawnAsync(
39
- 'yarn',
40
- [
41
- '--silent',
42
- 'run',
43
- 'xcodegen',
44
- '--quiet',
45
- '--spec',
46
- join(projectPath, 'ios', 'project.yml'),
47
- ],
48
- {
49
- cwd: SelfPath,
50
- stdio: 'inherit',
51
- }
52
- );
53
-
54
- await spawnAsync('pod', ['install'], { cwd: join(projectPath, 'ios'), stdio: 'inherit' });
55
- }
56
- }
57
-
58
- protected getDefinitions(): Definitions {
59
- return {
60
- ...this.config,
61
- name: this.name,
62
- dependencies: this.getDependencies(),
63
- devDependencies: this.getDevDependencies(),
64
- };
65
- }
66
-
67
- protected getDependencies(): Dependency[] {
68
- return this.resolveDependencies();
69
- }
70
-
71
- protected getDevDependencies(): Dependency[] {
72
- return [];
73
- }
74
-
75
- protected async build(projectPath: string, test: Test) {}
76
-
77
- protected async run(projectPath: string, test: Test) {}
78
-
79
- protected getTemplateFiles(): { [path: string]: ProjectFile } {
80
- const tff = new TemplateFilesFactory('basic');
81
-
82
- const overrides: { [path: string]: ProjectFile } = {};
83
- if (this.config.android?.mainActivity) {
84
- overrides['android/app/src/main/java/com/testrunner/MainActivity.java'] = new UserFile(
85
- this.userFilePath(this.config.android.mainActivity),
86
- Platform.Android
87
- );
88
- }
89
-
90
- if (this.config.android?.mainApplication) {
91
- overrides['android/app/src/main/java/com/testrunner/MainApplication.java'] = new UserFile(
92
- this.userFilePath(this.config.android.mainApplication),
93
- Platform.Android
94
- );
95
- }
96
-
97
- if (this.config.ios?.appDelegateHeader) {
98
- overrides['ios/src/AppDelegate.h'] = new UserFile(
99
- this.userFilePath(this.config.ios.appDelegateHeader),
100
- Platform.iOS
101
- );
102
- }
103
-
104
- if (this.config.ios?.appDelegate) {
105
- overrides['ios/src/AppDelegate.m'] = new UserFile(
106
- this.userFilePath(this.config.ios.appDelegate),
107
- Platform.iOS
108
- );
109
- }
110
-
111
- return {
112
- 'babel.config.js': tff.file(),
113
- 'tsconfig.json': tff.file(),
114
- 'package.json': tff.file(true),
115
- 'android/build.gradle': tff.androidFile(),
116
- 'android/gradle.properties': tff.androidFile(),
117
- 'android/gradlew': tff.androidFile(),
118
- 'android/gradlew.bat': tff.androidFile(),
119
- 'android/settings.gradle': tff.androidFile(true),
120
- 'android/gradle/': tff.androidFile(),
121
- 'android/app/build_defs.bzl': tff.androidFile(),
122
- 'android/app/build.gradle': tff.androidFile(),
123
- 'android/app/debug.keystore': tff.androidFile(),
124
- 'android/app/proguard-rules.pro': tff.androidFile(),
125
- 'android/app/src/main/java/com/testrunner/MainActivity.java': tff.androidFile(),
126
- 'android/app/src/main/java/com/testrunner/MainApplication.java': tff.androidFile(),
127
- 'android/app/src/main/AndroidManifest.xml': tff.androidFile(true),
128
- 'android/app/src/main/res/': tff.androidFile(),
129
- 'ios/src/Images.xcassets': tff.iosFile(),
130
- 'ios/src/AppDelegate.h': tff.iosFile(),
131
- 'ios/src/AppDelegate.m': tff.iosFile(),
132
- 'ios/src/Info.plist': tff.iosFile(true),
133
- 'ios/src/LaunchScreen.storyboard': tff.iosFile(true),
134
- 'ios/src/main.m': tff.iosFile(),
135
- 'ios/project.yml': tff.iosFile(true),
136
- 'ios/Podfile': tff.iosFile(true),
137
- 'ios/src/dummy.swift': tff.iosFile(),
138
- ...overrides,
139
- };
140
- }
141
-
142
- protected userFilePath(relativePath: string): string {
143
- return join(this.configFilePath, '..', relativePath);
144
- }
145
-
146
- private resolveDependencies(): Dependency[] {
147
- return (
148
- this.config.dependencies?.map(dependency => ({
149
- ...dependency,
150
- path: this.resolvePath(dependency.path),
151
- })) ?? []
152
- );
153
- }
154
-
155
- private async copyFilesAsync(projectPath: string, files: { [path: string]: ProjectFile }) {
156
- await Promise.all(Object.entries(files).map(([path, file]) => file.copy(projectPath, path)));
157
- }
158
-
159
- private async evaluateFiles(projectPath: string, files: { [path: string]: ProjectFile }) {
160
- const templateEvaluator = new TemplateEvaluator(this.getDefinitions());
161
- await Promise.all(
162
- Object.entries(files).map(([path, file]) =>
163
- file.evaluate(projectPath, path, templateEvaluator)
164
- )
165
- );
166
- }
167
-
168
- private resolvePath(relativePath: string): string {
169
- return 'file://' + fs.realpathSync(join(this.configFilePath, '..', relativePath));
170
- }
171
- }
@@ -1,55 +0,0 @@
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.gen",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.gen",
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
- )
@@ -1,188 +0,0 @@
1
- apply plugin: "com.android.application"
2
-
3
- import com.android.build.OutputFile
4
-
5
- /**
6
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
- * and bundleReleaseJsAndAssets).
8
- * These basically call `react-native bundle` with the correct arguments during the Android build
9
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
- * bundle directly from the development server. Below you can see all the possible configurations
11
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
- *
14
- * project.ext.react = [
15
- * // the name of the generated asset file containing your JS bundle
16
- * bundleAssetName: "index.android.bundle",
17
- *
18
- * // the entry file for bundle generation. If none specified and
19
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20
- * // default. Can be overridden with ENTRY_FILE environment variable.
21
- * entryFile: "index.android.js",
22
- *
23
- * // https://reactnative.dev/docs/performance#enable-the-ram-format
24
- * bundleCommand: "ram-bundle",
25
- *
26
- * // whether to bundle JS and assets in debug mode
27
- * bundleInDebug: false,
28
- *
29
- * // whether to bundle JS and assets in release mode
30
- * bundleInRelease: true,
31
- *
32
- * // whether to bundle JS and assets in another build variant (if configured).
33
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34
- * // The configuration property can be in the following formats
35
- * // 'bundleIn${productFlavor}${buildType}'
36
- * // 'bundleIn${buildType}'
37
- * // bundleInFreeDebug: true,
38
- * // bundleInPaidRelease: true,
39
- * // bundleInBeta: true,
40
- *
41
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
42
- * // for example: to disable dev mode in the staging build type (if configured)
43
- * devDisabledInStaging: true,
44
- * // The configuration property can be in the following formats
45
- * // 'devDisabledIn${productFlavor}${buildType}'
46
- * // 'devDisabledIn${buildType}'
47
- *
48
- * // the root of your project, i.e. where "package.json" lives
49
- * root: "../../",
50
- *
51
- * // where to put the JS bundle asset in debug mode
52
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53
- *
54
- * // where to put the JS bundle asset in release mode
55
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56
- *
57
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
58
- * // require('./image.png')), in debug mode
59
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60
- *
61
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
62
- * // require('./image.png')), in release mode
63
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64
- *
65
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69
- * // for example, you might want to remove it from here.
70
- * inputExcludes: ["android/**", "ios/**"],
71
- *
72
- * // override which node gets called and with what additional arguments
73
- * nodeExecutableAndArgs: ["node"],
74
- *
75
- * // supply additional arguments to the packager
76
- * extraPackagerArgs: []
77
- * ]
78
- */
79
-
80
- apply from: "../../node_modules/react-native/react.gradle"
81
-
82
- /**
83
- * Set this to true to create two separate APKs instead of one:
84
- * - An APK that only works on ARM devices
85
- * - An APK that only works on x86 devices
86
- * The advantage is the size of the APK is reduced by about 4MB.
87
- * Upload all the APKs to the Play Store and people will download
88
- * the correct one based on the CPU architecture of their device.
89
- */
90
- def enableSeparateBuildPerCPUArchitecture = false
91
-
92
- /**
93
- * Run Proguard to shrink the Java bytecode in release builds.
94
- */
95
- def enableProguardInReleaseBuilds = false
96
-
97
- /**
98
- * The preferred build flavor of JavaScriptCore.
99
- *
100
- * For example, to use the international variant, you can use:
101
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
102
- *
103
- * The international variant includes ICU i18n library and necessary data
104
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
105
- * give correct results when using with locales other than en-US. Note that
106
- * this variant is about 6MiB larger per architecture than default.
107
- */
108
- def jscFlavor = 'org.webkit:android-jsc:+'
109
-
110
-
111
- android {
112
- compileSdkVersion rootProject.ext.compileSdkVersion
113
-
114
- compileOptions {
115
- sourceCompatibility JavaVersion.VERSION_1_8
116
- targetCompatibility JavaVersion.VERSION_1_8
117
- }
118
-
119
- defaultConfig {
120
- applicationId "com.gen"
121
- minSdkVersion rootProject.ext.minSdkVersion
122
- targetSdkVersion rootProject.ext.targetSdkVersion
123
- versionCode 1
124
- versionName "1.0"
125
- }
126
- splits {
127
- abi {
128
- reset()
129
- enable enableSeparateBuildPerCPUArchitecture
130
- universalApk false // If true, also generate a universal APK
131
- include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
132
- }
133
- }
134
- signingConfigs {
135
- debug {
136
- storeFile file('debug.keystore')
137
- storePassword 'android'
138
- keyAlias 'androiddebugkey'
139
- keyPassword 'android'
140
- }
141
- }
142
- buildTypes {
143
- debug {
144
- signingConfig signingConfigs.debug
145
- }
146
- release {
147
- // Caution! In production, you need to generate your own keystore file.
148
- // see https://reactnative.dev/docs/signed-apk-android.
149
- signingConfig signingConfigs.debug
150
- minifyEnabled enableProguardInReleaseBuilds
151
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
152
- }
153
- }
154
-
155
- // applicationVariants are e.g. debug, release
156
- applicationVariants.all { variant ->
157
- variant.outputs.each { output ->
158
- // For each separate APK per architecture, set a unique version code as described here:
159
- // https://developer.android.com/studio/build/configure-apk-splits.html
160
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
161
- def abi = output.getFilter(OutputFile.ABI)
162
- if (abi != null) { // null for the universal-debug, universal-release variants
163
- output.versionCodeOverride =
164
- versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
165
- }
166
-
167
- }
168
- }
169
- }
170
-
171
- dependencies {
172
- implementation fileTree(dir: "libs", include: ["*.jar"])
173
-
174
- //noinspection GradleDynamicVersion
175
- implementation "com.facebook.react:react-native:+" // From node_modules
176
- implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
177
-
178
- implementation jscFlavor
179
- }
180
-
181
- // Run this once to be able to run the application with BUCK
182
- // puts all compile dependencies into folder libs for BUCK to use
183
- task copyDownloadableDepsToLibs(type: Copy) {
184
- from configurations.compile
185
- into 'libs'
186
- }
187
-
188
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
@@ -1,19 +0,0 @@
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
- )
@@ -1,10 +0,0 @@
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:
@@ -1,16 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.testrunner">
2
- <uses-permission android:name="android.permission.INTERNET"/>
3
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
4
- <uses-permission android:name="android.permission.VIBRATE"/>
5
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
6
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
7
- <application android:name=".MainApplication" android:label="{{= it.name }}" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
8
- <activity android:name=".MainActivity" android:label="{{= it.name }}" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.AppCompat.Light.NoActionBar">
9
- <intent-filter>
10
- <action android:name="android.intent.action.MAIN"/>
11
- <category android:name="android.intent.category.LAUNCHER"/>
12
- </intent-filter>
13
- </activity>
14
- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
15
- </application>
16
- </manifest>
@@ -1,28 +0,0 @@
1
- package com.testrunner;
2
-
3
- import com.facebook.react.ReactActivity;
4
- import com.facebook.react.ReactActivityDelegate;
5
-
6
- import expo.modules.adapters.react.ReactActivityDelegateWrapper;
7
-
8
- public class MainActivity extends ReactActivity {
9
- /**
10
- * Returns the name of the main component registered from JavaScript.
11
- * This is used to schedule rendering of the component.
12
- */
13
- @Override
14
- protected String getMainComponentName() {
15
- return "main";
16
- }
17
-
18
- @Override
19
- protected ReactActivityDelegate createReactActivityDelegate() {
20
- return new ReactActivityDelegateWrapper(
21
- this,
22
- new ReactActivityDelegate(
23
- this,
24
- getMainComponentName()
25
- )
26
- );
27
- }
28
- }
@@ -1,57 +0,0 @@
1
- package com.testrunner;
2
-
3
- import android.app.Application;
4
- import android.content.res.Configuration;
5
-
6
- import androidx.annotation.NonNull;
7
-
8
- import com.facebook.react.PackageList;
9
- import com.facebook.react.ReactApplication;
10
- import com.facebook.react.ReactNativeHost;
11
- import com.facebook.react.ReactPackage;
12
- import com.facebook.soloader.SoLoader;
13
-
14
- import expo.modules.ApplicationLifecycleDispatcher;
15
- import expo.modules.ReactNativeHostWrapper;
16
-
17
- import java.util.List;
18
-
19
- public class MainApplication extends Application implements ReactApplication {
20
- private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(
21
- this,
22
- new ReactNativeHost(this) {
23
- @Override
24
- public boolean getUseDeveloperSupport() {
25
- return BuildConfig.DEBUG;
26
- }
27
-
28
- @Override
29
- protected List<ReactPackage> getPackages() {
30
- return new PackageList(this).getPackages();
31
- }
32
-
33
- @Override
34
- protected String getJSMainModuleName() {
35
- return "index";
36
- }
37
- });
38
-
39
- @Override
40
- public ReactNativeHost getReactNativeHost() {
41
- return mReactNativeHost;
42
- }
43
-
44
- @Override
45
- public void onCreate() {
46
- super.onCreate();
47
- SoLoader.init(this, /* native exopackage */ false);
48
-
49
- ApplicationLifecycleDispatcher.onApplicationCreate(this);
50
- }
51
-
52
- @Override
53
- public void onConfigurationChanged(@NonNull Configuration newConfig) {
54
- super.onConfigurationChanged(newConfig);
55
- ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
56
- }
57
- }
@@ -1,14 +0,0 @@
1
- <resources>
2
- <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
3
- <item name="android:textColor">@android:color/black</item>
4
- <item name="android:editTextStyle">@style/ResetEditText</item>
5
- </style>
6
- <style name="ResetEditText" parent="@android:style/Widget.EditText">
7
- <item name="android:padding">0dp</item>
8
- <item name="android:textColorHint">#c8c8c8</item>
9
- <item name="android:textColor">@android:color/black</item>
10
- </style>
11
- <style name="Widget.AppCompat.TextView" parent="android:Widget">
12
- @null
13
- </style>
14
- </resources>
@@ -1,38 +0,0 @@
1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
- buildscript {
4
- ext {
5
- buildToolsVersion = "29.0.3"
6
- minSdkVersion = 21
7
- compileSdkVersion = 30
8
- targetSdkVersion = 30
9
- }
10
- repositories {
11
- google()
12
- jcenter()
13
- }
14
- dependencies {
15
- classpath("com.android.tools.build:gradle:4.1.0")
16
-
17
- // NOTE: Do not place your application dependencies here; they belong
18
- // in the individual module build.gradle files
19
- }
20
- }
21
-
22
- allprojects {
23
- repositories {
24
- mavenLocal()
25
- maven {
26
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27
- url("$rootDir/../node_modules/react-native/android")
28
- }
29
- maven {
30
- // Android JSC is installed from npm
31
- url("$rootDir/../node_modules/jsc-android/dist")
32
- }
33
-
34
- google()
35
- jcenter()
36
- maven { url 'https://www.jitpack.io' }
37
- }
38
- }
@@ -1,5 +0,0 @@
1
- distributionBase=GRADLE_USER_HOME
2
- distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
4
- zipStoreBase=GRADLE_USER_HOME
5
- zipStorePath=wrapper/dists
@@ -1,26 +0,0 @@
1
- # Project-wide Gradle settings.
2
-
3
- # IDE (e.g. Android Studio) users:
4
- # Gradle settings configured through the IDE *will override*
5
- # any settings specified in this file.
6
-
7
- # For more details on how to configure your build environment visit
8
- # http://www.gradle.org/docs/current/userguide/build_environment.html
9
-
10
- # Specifies the JVM arguments used for the daemon process.
11
- # The setting is particularly useful for tweaking memory settings.
12
- # Default value: -Xmx10248m -XX:MaxPermSize=256m
13
- org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
-
15
- # When configured, Gradle will run in incubating parallel mode.
16
- # This option should only be used with decoupled projects. More details, visit
17
- # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
- # org.gradle.parallel=true
19
-
20
- # AndroidX package structure to make it clearer which packages are bundled with the
21
- # Android operating system, and which are packaged with your app's APK
22
- # https://developer.android.com/topic/libraries/support-library/androidx-rn
23
- android.useAndroidX=true
24
-
25
- # Automatically convert third-party libraries to use AndroidX
26
- android.enableJetifier=true