@hedia/recommendation-screen 1.0.0 → 1.0.1

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 (86) hide show
  1. package/Changelog.md +8 -4
  2. package/README.md +3 -3
  3. package/android/app/BUCK +55 -55
  4. package/android/app/build.gradle +225 -225
  5. package/android/app/build_defs.bzl +19 -19
  6. package/android/app/proguard-rules.pro +10 -10
  7. package/android/app/src/debug/AndroidManifest.xml +8 -8
  8. package/android/app/src/debug/java/com/hediarecommendationscreen/ReactNativeFlipper.java +72 -72
  9. package/android/app/src/main/AndroidManifest.xml +27 -27
  10. package/android/app/src/main/java/com/hediarecommendationscreen/MainActivity.java +15 -15
  11. package/android/app/src/main/java/com/hediarecommendationscreen/MainApplication.java +80 -80
  12. package/android/app/src/main/res/values/strings.xml +3 -3
  13. package/android/app/src/main/res/values/styles.xml +9 -9
  14. package/android/build.gradle +38 -38
  15. package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  16. package/android/gradle.properties +28 -28
  17. package/android/gradlew +188 -188
  18. package/android/settings.gradle +3 -3
  19. package/index.d.ts +5 -5
  20. package/index.js +16 -16
  21. package/ios/HediaRecommendationScreen/AppDelegate.h +8 -8
  22. package/ios/HediaRecommendationScreen/AppDelegate.m +58 -58
  23. package/ios/HediaRecommendationScreen/Base.lproj/LaunchScreen.xib +42 -42
  24. package/ios/HediaRecommendationScreen/Images.xcassets/AppIcon.appiconset/Contents.json +37 -37
  25. package/ios/HediaRecommendationScreen/Images.xcassets/Contents.json +6 -6
  26. package/ios/HediaRecommendationScreen/Info.plist +57 -57
  27. package/ios/HediaRecommendationScreen/main.m +9 -9
  28. package/ios/HediaRecommendationScreen-tvOS/Info.plist +53 -53
  29. package/ios/HediaRecommendationScreen-tvOSTests/Info.plist +24 -24
  30. package/ios/HediaRecommendationScreen.xcodeproj/project.pbxproj +807 -807
  31. package/ios/HediaRecommendationScreen.xcodeproj/xcshareddata/xcschemes/HediaRecommendationScreen-tvOS.xcscheme +88 -88
  32. package/ios/HediaRecommendationScreen.xcodeproj/xcshareddata/xcschemes/HediaRecommendationScreen.xcscheme +88 -88
  33. package/ios/HediaRecommendationScreenTests/HediaRecommendationScreenTests.m +65 -65
  34. package/ios/HediaRecommendationScreenTests/Info.plist +24 -24
  35. package/ios/Podfile +104 -104
  36. package/package.json +1 -3
  37. package/src/RecommendationScreen.d.ts +42 -42
  38. package/src/RecommendationScreen.js +126 -127
  39. package/src/RecommendationScreen.tsx +3 -4
  40. package/src/components/Emotion.d.ts +14 -14
  41. package/src/components/Emotion.js +50 -51
  42. package/src/components/Emotion.tsx +1 -2
  43. package/src/components/Header.d.ts +52 -52
  44. package/src/components/Header.js +63 -64
  45. package/src/components/Header.tsx +1 -2
  46. package/src/components/Icon.js +41 -41
  47. package/src/components/InfoBars.d.ts +67 -67
  48. package/src/components/InfoBars.js +71 -71
  49. package/src/components/InvisibleNumberInput.d.ts +24 -24
  50. package/src/components/InvisibleNumberInput.js +64 -64
  51. package/src/components/MoodIcon.d.ts +14 -14
  52. package/src/components/MoodIcon.js +51 -51
  53. package/src/components/RecentInsulin.d.ts +9 -9
  54. package/src/components/RecentInsulin.js +75 -76
  55. package/src/components/RecentInsulin.tsx +4 -5
  56. package/src/components/RecommendedCarbs.d.ts +30 -30
  57. package/src/components/RecommendedCarbs.js +146 -147
  58. package/src/components/RecommendedCarbs.tsx +8 -9
  59. package/src/components/RecommendedInsulin.d.ts +22 -22
  60. package/src/components/RecommendedInsulin.js +93 -94
  61. package/src/components/RecommendedInsulin.tsx +2 -3
  62. package/src/components/Remeasure.d.ts +13 -13
  63. package/src/components/Remeasure.js +76 -77
  64. package/src/components/Remeasure.tsx +3 -4
  65. package/src/components/TransferToLogbook.d.ts +14 -14
  66. package/src/components/TransferToLogbook.js +75 -76
  67. package/src/components/TransferToLogbook.tsx +2 -3
  68. package/src/locale/da/messages.js +1 -1
  69. package/src/locale/da/messages.po +31 -29
  70. package/src/locale/en/messages.js +1 -1
  71. package/src/locale/en/messages.po +32 -30
  72. package/src/locale/i18nUtils.d.ts +5 -5
  73. package/src/locale/i18nUtils.js +22 -22
  74. package/src/types/enum.d.ts +26 -26
  75. package/src/types/enum.js +34 -34
  76. package/src/types/types.d.ts +21 -21
  77. package/src/types/types.js +2 -2
  78. package/src/utils/Constants.d.ts +3 -3
  79. package/src/utils/Constants.js +6 -6
  80. package/src/utils/RecommendationError.d.ts +9 -9
  81. package/src/utils/RecommendationError.js +16 -17
  82. package/src/utils/RecommendationError.ts +4 -6
  83. package/src/utils/Utils.d.ts +5 -5
  84. package/src/utils/Utils.js +24 -24
  85. package/.prettierignore +0 -2
  86. package/index-git.sh +0 -5
package/Changelog.md CHANGED
@@ -1,5 +1,9 @@
1
- # Changelog
2
-
3
- ### V1.0.0
4
-
1
+ # Changelog
2
+
3
+ ### V1.0.1
4
+
5
+ - Fixed Lingui by removing @lingui/macro
6
+
7
+ ### V1.0.0
8
+
5
9
  - Initial release
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # **Recommendation Screen**
2
-
3
- ### **Usage**
1
+ # **Recommendation Screen**
2
+
3
+ ### **Usage**
package/android/app/BUCK CHANGED
@@ -1,55 +1,55 @@
1
- # To learn about Buck see [Docs](https://buckbuild.com/).
2
- # To run your application with Buck:
3
- # - install Buck
4
- # - `npm start` - to start the packager
5
- # - `cd android`
6
- # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
- # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
- # - `buck install -r android/app` - compile, install and run application
9
- #
10
-
11
- load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
- lib_deps = []
14
-
15
- create_aar_targets(glob(["libs/*.aar"]))
16
-
17
- create_jar_targets(glob(["libs/*.jar"]))
18
-
19
- android_library(
20
- name = "all-libs",
21
- exported_deps = lib_deps,
22
- )
23
-
24
- android_library(
25
- name = "app-code",
26
- srcs = glob([
27
- "src/main/java/**/*.java",
28
- ]),
29
- deps = [
30
- ":all-libs",
31
- ":build_config",
32
- ":res",
33
- ],
34
- )
35
-
36
- android_build_config(
37
- name = "build_config",
38
- package = "com.hediarecommendationscreen",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.hediarecommendationscreen",
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
+ # 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.hediarecommendationscreen",
39
+ )
40
+
41
+ android_resource(
42
+ name = "res",
43
+ package = "com.hediarecommendationscreen",
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,226 +1,226 @@
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://facebook.github.io/react-native/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
- project.ext.react = [
81
- enableHermes: false, // clean and rebuild if changing
82
- ]
83
-
84
- apply from: "../../node_modules/react-native/react.gradle"
85
-
86
- /**
87
- * Set this to true to create two separate APKs instead of one:
88
- * - An APK that only works on ARM devices
89
- * - An APK that only works on x86 devices
90
- * The advantage is the size of the APK is reduced by about 4MB.
91
- * Upload all the APKs to the Play Store and people will download
92
- * the correct one based on the CPU architecture of their device.
93
- */
94
- def enableSeparateBuildPerCPUArchitecture = false
95
-
96
- /**
97
- * Run Proguard to shrink the Java bytecode in release builds.
98
- */
99
- def enableProguardInReleaseBuilds = false
100
-
101
- /**
102
- * The preferred build flavor of JavaScriptCore.
103
- *
104
- * For example, to use the international variant, you can use:
105
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106
- *
107
- * The international variant includes ICU i18n library and necessary data
108
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109
- * give correct results when using with locales other than en-US. Note that
110
- * this variant is about 6MiB larger per architecture than default.
111
- */
112
- def jscFlavor = 'org.webkit:android-jsc:+'
113
-
114
- /**
115
- * Whether to enable the Hermes VM.
116
- *
117
- * This should be set on project.ext.react and mirrored here. If it is not set
118
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119
- * and the benefits of using Hermes will therefore be sharply reduced.
120
- */
121
- def enableHermes = project.ext.react.get("enableHermes", false);
122
-
123
- android {
124
- compileSdkVersion rootProject.ext.compileSdkVersion
125
-
126
- compileOptions {
127
- sourceCompatibility JavaVersion.VERSION_1_8
128
- targetCompatibility JavaVersion.VERSION_1_8
129
- }
130
-
131
- defaultConfig {
132
- applicationId "com.hediarecommendationscreen"
133
- minSdkVersion rootProject.ext.minSdkVersion
134
- targetSdkVersion rootProject.ext.targetSdkVersion
135
- versionCode 1
136
- versionName "1.0"
137
- }
138
- splits {
139
- abi {
140
- reset()
141
- enable enableSeparateBuildPerCPUArchitecture
142
- universalApk false // If true, also generate a universal APK
143
- include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
144
- }
145
- }
146
- signingConfigs {
147
- debug {
148
- storeFile file('debug.keystore')
149
- storePassword 'android'
150
- keyAlias 'androiddebugkey'
151
- keyPassword 'android'
152
- }
153
- }
154
- buildTypes {
155
- debug {
156
- signingConfig signingConfigs.debug
157
- }
158
- release {
159
- // Caution! In production, you need to generate your own keystore file.
160
- // see https://facebook.github.io/react-native/docs/signed-apk-android.
161
- signingConfig signingConfigs.debug
162
- minifyEnabled enableProguardInReleaseBuilds
163
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164
- }
165
- }
166
-
167
- packagingOptions {
168
- pickFirst "lib/armeabi-v7a/libc++_shared.so"
169
- pickFirst "lib/arm64-v8a/libc++_shared.so"
170
- pickFirst "lib/x86/libc++_shared.so"
171
- pickFirst "lib/x86_64/libc++_shared.so"
172
- }
173
-
174
- // applicationVariants are e.g. debug, release
175
- applicationVariants.all { variant ->
176
- variant.outputs.each { output ->
177
- // For each separate APK per architecture, set a unique version code as described here:
178
- // https://developer.android.com/studio/build/configure-apk-splits.html
179
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
180
- def abi = output.getFilter(OutputFile.ABI)
181
- if (abi != null) { // null for the universal-debug, universal-release variants
182
- output.versionCodeOverride =
183
- versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
184
- }
185
-
186
- }
187
- }
188
- }
189
-
190
- dependencies {
191
- implementation fileTree(dir: "libs", include: ["*.jar"])
192
- //noinspection GradleDynamicVersion
193
- implementation "com.facebook.react:react-native:+" // From node_modules
194
-
195
- implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
196
-
197
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
198
- exclude group:'com.facebook.fbjni'
199
- }
200
-
201
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
202
- exclude group:'com.facebook.flipper'
203
- }
204
-
205
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
206
- exclude group:'com.facebook.flipper'
207
- }
208
-
209
- if (enableHermes) {
210
- def hermesPath = "../../node_modules/hermes-engine/android/";
211
- debugImplementation files(hermesPath + "hermes-debug.aar")
212
- releaseImplementation files(hermesPath + "hermes-release.aar")
213
- } else {
214
- implementation jscFlavor
215
- }
216
- }
217
-
218
- // Run this once to be able to run the application with BUCK
219
- // puts all compile dependencies into folder libs for BUCK to use
220
- task copyDownloadableDepsToLibs(type: Copy) {
221
- from configurations.compile
222
- into 'libs'
223
- }
224
-
225
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
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://facebook.github.io/react-native/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
+ project.ext.react = [
81
+ enableHermes: false, // clean and rebuild if changing
82
+ ]
83
+
84
+ apply from: "../../node_modules/react-native/react.gradle"
85
+
86
+ /**
87
+ * Set this to true to create two separate APKs instead of one:
88
+ * - An APK that only works on ARM devices
89
+ * - An APK that only works on x86 devices
90
+ * The advantage is the size of the APK is reduced by about 4MB.
91
+ * Upload all the APKs to the Play Store and people will download
92
+ * the correct one based on the CPU architecture of their device.
93
+ */
94
+ def enableSeparateBuildPerCPUArchitecture = false
95
+
96
+ /**
97
+ * Run Proguard to shrink the Java bytecode in release builds.
98
+ */
99
+ def enableProguardInReleaseBuilds = false
100
+
101
+ /**
102
+ * The preferred build flavor of JavaScriptCore.
103
+ *
104
+ * For example, to use the international variant, you can use:
105
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106
+ *
107
+ * The international variant includes ICU i18n library and necessary data
108
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109
+ * give correct results when using with locales other than en-US. Note that
110
+ * this variant is about 6MiB larger per architecture than default.
111
+ */
112
+ def jscFlavor = 'org.webkit:android-jsc:+'
113
+
114
+ /**
115
+ * Whether to enable the Hermes VM.
116
+ *
117
+ * This should be set on project.ext.react and mirrored here. If it is not set
118
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119
+ * and the benefits of using Hermes will therefore be sharply reduced.
120
+ */
121
+ def enableHermes = project.ext.react.get("enableHermes", false);
122
+
123
+ android {
124
+ compileSdkVersion rootProject.ext.compileSdkVersion
125
+
126
+ compileOptions {
127
+ sourceCompatibility JavaVersion.VERSION_1_8
128
+ targetCompatibility JavaVersion.VERSION_1_8
129
+ }
130
+
131
+ defaultConfig {
132
+ applicationId "com.hediarecommendationscreen"
133
+ minSdkVersion rootProject.ext.minSdkVersion
134
+ targetSdkVersion rootProject.ext.targetSdkVersion
135
+ versionCode 1
136
+ versionName "1.0"
137
+ }
138
+ splits {
139
+ abi {
140
+ reset()
141
+ enable enableSeparateBuildPerCPUArchitecture
142
+ universalApk false // If true, also generate a universal APK
143
+ include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
144
+ }
145
+ }
146
+ signingConfigs {
147
+ debug {
148
+ storeFile file('debug.keystore')
149
+ storePassword 'android'
150
+ keyAlias 'androiddebugkey'
151
+ keyPassword 'android'
152
+ }
153
+ }
154
+ buildTypes {
155
+ debug {
156
+ signingConfig signingConfigs.debug
157
+ }
158
+ release {
159
+ // Caution! In production, you need to generate your own keystore file.
160
+ // see https://facebook.github.io/react-native/docs/signed-apk-android.
161
+ signingConfig signingConfigs.debug
162
+ minifyEnabled enableProguardInReleaseBuilds
163
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164
+ }
165
+ }
166
+
167
+ packagingOptions {
168
+ pickFirst "lib/armeabi-v7a/libc++_shared.so"
169
+ pickFirst "lib/arm64-v8a/libc++_shared.so"
170
+ pickFirst "lib/x86/libc++_shared.so"
171
+ pickFirst "lib/x86_64/libc++_shared.so"
172
+ }
173
+
174
+ // applicationVariants are e.g. debug, release
175
+ applicationVariants.all { variant ->
176
+ variant.outputs.each { output ->
177
+ // For each separate APK per architecture, set a unique version code as described here:
178
+ // https://developer.android.com/studio/build/configure-apk-splits.html
179
+ def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
180
+ def abi = output.getFilter(OutputFile.ABI)
181
+ if (abi != null) { // null for the universal-debug, universal-release variants
182
+ output.versionCodeOverride =
183
+ versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
184
+ }
185
+
186
+ }
187
+ }
188
+ }
189
+
190
+ dependencies {
191
+ implementation fileTree(dir: "libs", include: ["*.jar"])
192
+ //noinspection GradleDynamicVersion
193
+ implementation "com.facebook.react:react-native:+" // From node_modules
194
+
195
+ implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
196
+
197
+ debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
198
+ exclude group:'com.facebook.fbjni'
199
+ }
200
+
201
+ debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
202
+ exclude group:'com.facebook.flipper'
203
+ }
204
+
205
+ debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
206
+ exclude group:'com.facebook.flipper'
207
+ }
208
+
209
+ if (enableHermes) {
210
+ def hermesPath = "../../node_modules/hermes-engine/android/";
211
+ debugImplementation files(hermesPath + "hermes-debug.aar")
212
+ releaseImplementation files(hermesPath + "hermes-release.aar")
213
+ } else {
214
+ implementation jscFlavor
215
+ }
216
+ }
217
+
218
+ // Run this once to be able to run the application with BUCK
219
+ // puts all compile dependencies into folder libs for BUCK to use
220
+ task copyDownloadableDepsToLibs(type: Copy) {
221
+ from configurations.compile
222
+ into 'libs'
223
+ }
224
+
225
+ apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
226
226
  apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
@@ -1,19 +1,19 @@
1
- """Helper definitions to glob .aar and .jar targets"""
2
-
3
- def create_aar_targets(aarfiles):
4
- for aarfile in aarfiles:
5
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
- lib_deps.append(":" + name)
7
- android_prebuilt_aar(
8
- name = name,
9
- aar = aarfile,
10
- )
11
-
12
- def create_jar_targets(jarfiles):
13
- for jarfile in jarfiles:
14
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
- lib_deps.append(":" + name)
16
- prebuilt_jar(
17
- name = name,
18
- binary_jar = jarfile,
19
- )
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 +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:
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: