create-sitecore-jss 22.8.0 → 22.9.0-canary.2

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 (131) hide show
  1. package/LICENSE.MD +202 -202
  2. package/README.md +10 -10
  3. package/dist/templates/angular/src/assets/images/sc_logo.svg +52 -52
  4. package/dist/templates/angular-sxp/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  5. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  6. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  7. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  8. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  9. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  10. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  11. package/dist/templates/angular-sxp/data/dictionary/en.yml +4 -4
  12. package/dist/templates/angular-sxp/data/dictionary/{{language}}.yml +4 -4
  13. package/dist/templates/angular-sxp/data/routes/en.yml +61 -61
  14. package/dist/templates/angular-sxp/data/routes/graphql/en.yml +27 -27
  15. package/dist/templates/angular-sxp/data/routes/graphql/sample-1/en.yml +9 -9
  16. package/dist/templates/angular-sxp/data/routes/graphql/sample-2/en.yml +9 -9
  17. package/dist/templates/angular-sxp/data/routes/styleguide/custom-route-type/en.yml +12 -12
  18. package/dist/templates/angular-sxp/data/routes/styleguide/en.yml +271 -271
  19. package/dist/templates/angular-sxp/data/routes/styleguide/{{language}}.yml +25 -25
  20. package/dist/templates/angular-sxp/data/routes/{{language}}.yml +4 -4
  21. package/dist/templates/angular-sxp/sitecore/config/{{appName}}.config +90 -90
  22. package/dist/templates/angular-sxp/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +71 -71
  23. package/dist/templates/angular-sxp/sitecore/gitignore +2 -2
  24. package/dist/templates/nextjs/public/sc_logo.svg +52 -52
  25. package/dist/templates/nextjs-styleguide/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  26. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  27. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  28. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  29. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  30. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  31. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  32. package/dist/templates/nextjs-styleguide/data/dictionary/en.yml +4 -4
  33. package/dist/templates/nextjs-styleguide/data/dictionary/{{language}}.yml +4 -4
  34. package/dist/templates/nextjs-styleguide/data/routes/en.yml +63 -63
  35. package/dist/templates/nextjs-styleguide/data/routes/graphql/en.yml +27 -27
  36. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-1/en.yml +9 -9
  37. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-2/en.yml +9 -9
  38. package/dist/templates/nextjs-styleguide/data/routes/styleguide/custom-route-type/en.yml +12 -12
  39. package/dist/templates/nextjs-styleguide/data/routes/styleguide/en.yml +259 -259
  40. package/dist/templates/nextjs-styleguide/data/routes/styleguide/{{language}}.yml +25 -25
  41. package/dist/templates/nextjs-styleguide/data/routes/{{language}}.yml +4 -4
  42. package/dist/templates/nextjs-styleguide-tracking/data/dictionary/en.yml +5 -5
  43. package/dist/templates/nextjs-styleguide-tracking/data/routes/tracking/en.yml +8 -8
  44. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +14 -14
  45. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +42 -42
  46. package/dist/templates/react/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  47. package/dist/templates/react/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  48. package/dist/templates/react/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  49. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  50. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  51. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  52. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  53. package/dist/templates/react/data/dictionary/en.yml +4 -4
  54. package/dist/templates/react/data/dictionary/{{language}}.yml +4 -4
  55. package/dist/templates/react/data/routes/en.yml +61 -61
  56. package/dist/templates/react/data/routes/graphql/en.yml +27 -27
  57. package/dist/templates/react/data/routes/graphql/sample-1/en.yml +9 -9
  58. package/dist/templates/react/data/routes/graphql/sample-2/en.yml +9 -9
  59. package/dist/templates/react/data/routes/styleguide/custom-route-type/en.yml +12 -12
  60. package/dist/templates/react/data/routes/styleguide/en.yml +263 -263
  61. package/dist/templates/react/data/routes/styleguide/{{language}}.yml +26 -26
  62. package/dist/templates/react/data/routes/{{language}}.yml +4 -4
  63. package/dist/templates/react-native/.buckconfig +6 -6
  64. package/dist/templates/react-native/.eslintrc +74 -74
  65. package/dist/templates/react-native/.gitattributes +1 -1
  66. package/dist/templates/react-native/.prettierrc +9 -9
  67. package/dist/templates/react-native/.vscode/launch.json +42 -42
  68. package/dist/templates/react-native/.vscode/settings.json +1 -1
  69. package/dist/templates/react-native/LICENSE.txt +202 -202
  70. package/dist/templates/react-native/README.MD +115 -115
  71. package/dist/templates/react-native/android/app/BUCK +55 -55
  72. package/dist/templates/react-native/android/app/build.gradle +201 -201
  73. package/dist/templates/react-native/android/app/build_defs.bzl +19 -19
  74. package/dist/templates/react-native/android/app/proguard-rules.pro +10 -10
  75. package/dist/templates/react-native/android/app/src/debug/AndroidManifest.xml +8 -8
  76. package/dist/templates/react-native/android/app/src/main/AndroidManifest.xml +26 -26
  77. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainActivity.java +15 -15
  78. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainApplication.java +74 -74
  79. package/dist/templates/react-native/android/app/src/main/res/values/strings.xml +3 -3
  80. package/dist/templates/react-native/android/app/src/main/res/values/styles.xml +9 -9
  81. package/dist/templates/react-native/android/build.gradle +38 -38
  82. package/dist/templates/react-native/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  83. package/dist/templates/react-native/android/gradle.properties +21 -21
  84. package/dist/templates/react-native/android/gradlew +188 -188
  85. package/dist/templates/react-native/android/gradlew.bat +100 -100
  86. package/dist/templates/react-native/android/settings.gradle +3 -3
  87. package/dist/templates/react-native/app.json +3 -3
  88. package/dist/templates/react-native/assets/img/sc_logo.svg +52 -52
  89. package/dist/templates/react-native/data/content/Styleguide/ItemLinkField/Item1/en.json +10 -10
  90. package/dist/templates/react-native/data/routes/en.json +22 -22
  91. package/dist/templates/react-native/data/routes/styleguide/en.json +227 -227
  92. package/dist/templates/react-native/data/routes/styleguide/{{language}}.json +31 -31
  93. package/dist/templates/react-native/data/routes/{{language}}.json +7 -7
  94. package/dist/templates/react-native/gitignore +60 -60
  95. package/dist/templates/react-native/ios/Podfile +53 -53
  96. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.h +15 -15
  97. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.m +42 -42
  98. package/dist/templates/react-native/ios/{{appName}}/Base.lproj/LaunchScreen.xib +42 -42
  99. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/AppIcon.appiconset/Contents.json +38 -38
  100. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/Contents.json +6 -6
  101. package/dist/templates/react-native/ios/{{appName}}/Info.plist +57 -57
  102. package/dist/templates/react-native/ios/{{appName}}/main.m +16 -16
  103. package/dist/templates/react-native/ios/{{appName}}-tvOS/Info.plist +53 -53
  104. package/dist/templates/react-native/ios/{{appName}}-tvOSTests/Info.plist +24 -24
  105. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative-tvOS.xcscheme +129 -129
  106. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative.xcscheme +129 -129
  107. package/dist/templates/react-native/ios/{{appName}}Tests/BasicSampleReactNativeTests.m +72 -72
  108. package/dist/templates/react-native/ios/{{appName}}Tests/Info.plist +24 -24
  109. package/dist/templates/react-native/package.json +78 -78
  110. package/dist/templates/react-native/sitecore/config/{{appName}}.config +47 -47
  111. package/dist/templates/react-native/sitecore/gitignore +2 -2
  112. package/dist/templates/vue/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  113. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  114. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  115. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  116. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  117. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  118. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  119. package/dist/templates/vue/data/dictionary/en.yml +7 -7
  120. package/dist/templates/vue/data/dictionary/{{language}}.yml +7 -7
  121. package/dist/templates/vue/data/routes/en.yml +63 -63
  122. package/dist/templates/vue/data/routes/graphql/en.yml +34 -34
  123. package/dist/templates/vue/data/routes/graphql/sample-1/en.yml +9 -9
  124. package/dist/templates/vue/data/routes/graphql/sample-2/en.yml +9 -9
  125. package/dist/templates/vue/data/routes/styleguide/custom-route-type/en.yml +12 -12
  126. package/dist/templates/vue/data/routes/styleguide/en.yml +264 -264
  127. package/dist/templates/vue/data/routes/styleguide/{{language}}.yml +26 -26
  128. package/dist/templates/vue/data/routes/{{language}}.yml +4 -4
  129. package/dist/templates/vue/public/img/icons/safari-pinned-tab.svg +75 -75
  130. package/dist/templates/vue/src/assets/sc_logo.svg +52 -52
  131. package/package.json +2 -2
@@ -1,201 +1,201 @@
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
19
- * entryFile: "index.android.js",
20
- *
21
- * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22
- * bundleCommand: "ram-bundle",
23
- *
24
- * // whether to bundle JS and assets in debug mode
25
- * bundleInDebug: false,
26
- *
27
- * // whether to bundle JS and assets in release mode
28
- * bundleInRelease: true,
29
- *
30
- * // whether to bundle JS and assets in another build variant (if configured).
31
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32
- * // The configuration property can be in the following formats
33
- * // 'bundleIn${productFlavor}${buildType}'
34
- * // 'bundleIn${buildType}'
35
- * // bundleInFreeDebug: true,
36
- * // bundleInPaidRelease: true,
37
- * // bundleInBeta: true,
38
- *
39
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
40
- * // for example: to disable dev mode in the staging build type (if configured)
41
- * devDisabledInStaging: true,
42
- * // The configuration property can be in the following formats
43
- * // 'devDisabledIn${productFlavor}${buildType}'
44
- * // 'devDisabledIn${buildType}'
45
- *
46
- * // the root of your project, i.e. where "package.json" lives
47
- * root: "../../",
48
- *
49
- * // where to put the JS bundle asset in debug mode
50
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51
- *
52
- * // where to put the JS bundle asset in release mode
53
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54
- *
55
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
56
- * // require('./image.png')), in debug mode
57
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58
- *
59
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
60
- * // require('./image.png')), in release mode
61
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62
- *
63
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67
- * // for example, you might want to remove it from here.
68
- * inputExcludes: ["android/**", "ios/**"],
69
- *
70
- * // override which node gets called and with what additional arguments
71
- * nodeExecutableAndArgs: ["node"],
72
- *
73
- * // supply additional arguments to the packager
74
- * extraPackagerArgs: []
75
- * ]
76
- */
77
-
78
- project.ext.react = [
79
- entryFile: "index.js",
80
- enableHermes: false, // clean and rebuild if changing
81
- ]
82
-
83
- apply from: "../../node_modules/react-native/react.gradle"
84
-
85
- /**
86
- * Set this to true to create two separate APKs instead of one:
87
- * - An APK that only works on ARM devices
88
- * - An APK that only works on x86 devices
89
- * The advantage is the size of the APK is reduced by about 4MB.
90
- * Upload all the APKs to the Play Store and people will download
91
- * the correct one based on the CPU architecture of their device.
92
- */
93
- def enableSeparateBuildPerCPUArchitecture = false
94
-
95
- /**
96
- * Run Proguard to shrink the Java bytecode in release builds.
97
- */
98
- def enableProguardInReleaseBuilds = false
99
-
100
- /**
101
- * The preferred build flavor of JavaScriptCore.
102
- *
103
- * For example, to use the international variant, you can use:
104
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
105
- *
106
- * The international variant includes ICU i18n library and necessary data
107
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
108
- * give correct results when using with locales other than en-US. Note that
109
- * this variant is about 6MiB larger per architecture than default.
110
- */
111
- def jscFlavor = 'org.webkit:android-jsc:+'
112
-
113
- /**
114
- * Whether to enable the Hermes VM.
115
- *
116
- * This should be set on project.ext.react and mirrored here. If it is not set
117
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
118
- * and the benefits of using Hermes will therefore be sharply reduced.
119
- */
120
- def enableHermes = project.ext.react.get("enableHermes", false);
121
-
122
- android {
123
- compileSdkVersion rootProject.ext.compileSdkVersion
124
-
125
- compileOptions {
126
- sourceCompatibility JavaVersion.VERSION_1_8
127
- targetCompatibility JavaVersion.VERSION_1_8
128
- }
129
-
130
- defaultConfig {
131
- applicationId "com.<%- appName %>"
132
- minSdkVersion rootProject.ext.minSdkVersion
133
- targetSdkVersion rootProject.ext.targetSdkVersion
134
- versionCode 1
135
- versionName "1.0"
136
- }
137
- splits {
138
- abi {
139
- reset()
140
- enable enableSeparateBuildPerCPUArchitecture
141
- universalApk false // If true, also generate a universal APK
142
- include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
143
- }
144
- }
145
- signingConfigs {
146
- debug {
147
- storeFile file('debug.keystore')
148
- storePassword 'android'
149
- keyAlias 'androiddebugkey'
150
- keyPassword 'android'
151
- }
152
- }
153
- buildTypes {
154
- debug {
155
- signingConfig signingConfigs.debug
156
- }
157
- release {
158
- // Caution! In production, you need to generate your own keystore file.
159
- // see https://facebook.github.io/react-native/docs/signed-apk-android.
160
- signingConfig signingConfigs.debug
161
- minifyEnabled enableProguardInReleaseBuilds
162
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
163
- }
164
- }
165
- // applicationVariants are e.g. debug, release
166
- applicationVariants.all { variant ->
167
- variant.outputs.each { output ->
168
- // For each separate APK per architecture, set a unique version code as described here:
169
- // https://developer.android.com/studio/build/configure-apk-splits.html
170
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
171
- def abi = output.getFilter(OutputFile.ABI)
172
- if (abi != null) { // null for the universal-debug, universal-release variants
173
- output.versionCodeOverride =
174
- versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
175
- }
176
-
177
- }
178
- }
179
- }
180
-
181
- dependencies {
182
- implementation fileTree(dir: "libs", include: ["*.jar"])
183
- implementation "com.facebook.react:react-native:+" // From node_modules
184
-
185
- if (enableHermes) {
186
- def hermesPath = "../../node_modules/hermes-engine/android/";
187
- debugImplementation files(hermesPath + "hermes-debug.aar")
188
- releaseImplementation files(hermesPath + "hermes-release.aar")
189
- } else {
190
- implementation jscFlavor
191
- }
192
- }
193
-
194
- // Run this once to be able to run the application with BUCK
195
- // puts all compile dependencies into folder libs for BUCK to use
196
- task copyDownloadableDepsToLibs(type: Copy) {
197
- from configurations.compile
198
- into 'libs'
199
- }
200
-
201
- 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
19
+ * entryFile: "index.android.js",
20
+ *
21
+ * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22
+ * bundleCommand: "ram-bundle",
23
+ *
24
+ * // whether to bundle JS and assets in debug mode
25
+ * bundleInDebug: false,
26
+ *
27
+ * // whether to bundle JS and assets in release mode
28
+ * bundleInRelease: true,
29
+ *
30
+ * // whether to bundle JS and assets in another build variant (if configured).
31
+ * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32
+ * // The configuration property can be in the following formats
33
+ * // 'bundleIn${productFlavor}${buildType}'
34
+ * // 'bundleIn${buildType}'
35
+ * // bundleInFreeDebug: true,
36
+ * // bundleInPaidRelease: true,
37
+ * // bundleInBeta: true,
38
+ *
39
+ * // whether to disable dev mode in custom build variants (by default only disabled in release)
40
+ * // for example: to disable dev mode in the staging build type (if configured)
41
+ * devDisabledInStaging: true,
42
+ * // The configuration property can be in the following formats
43
+ * // 'devDisabledIn${productFlavor}${buildType}'
44
+ * // 'devDisabledIn${buildType}'
45
+ *
46
+ * // the root of your project, i.e. where "package.json" lives
47
+ * root: "../../",
48
+ *
49
+ * // where to put the JS bundle asset in debug mode
50
+ * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51
+ *
52
+ * // where to put the JS bundle asset in release mode
53
+ * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54
+ *
55
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
56
+ * // require('./image.png')), in debug mode
57
+ * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58
+ *
59
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
60
+ * // require('./image.png')), in release mode
61
+ * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62
+ *
63
+ * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64
+ * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65
+ * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66
+ * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67
+ * // for example, you might want to remove it from here.
68
+ * inputExcludes: ["android/**", "ios/**"],
69
+ *
70
+ * // override which node gets called and with what additional arguments
71
+ * nodeExecutableAndArgs: ["node"],
72
+ *
73
+ * // supply additional arguments to the packager
74
+ * extraPackagerArgs: []
75
+ * ]
76
+ */
77
+
78
+ project.ext.react = [
79
+ entryFile: "index.js",
80
+ enableHermes: false, // clean and rebuild if changing
81
+ ]
82
+
83
+ apply from: "../../node_modules/react-native/react.gradle"
84
+
85
+ /**
86
+ * Set this to true to create two separate APKs instead of one:
87
+ * - An APK that only works on ARM devices
88
+ * - An APK that only works on x86 devices
89
+ * The advantage is the size of the APK is reduced by about 4MB.
90
+ * Upload all the APKs to the Play Store and people will download
91
+ * the correct one based on the CPU architecture of their device.
92
+ */
93
+ def enableSeparateBuildPerCPUArchitecture = false
94
+
95
+ /**
96
+ * Run Proguard to shrink the Java bytecode in release builds.
97
+ */
98
+ def enableProguardInReleaseBuilds = false
99
+
100
+ /**
101
+ * The preferred build flavor of JavaScriptCore.
102
+ *
103
+ * For example, to use the international variant, you can use:
104
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
105
+ *
106
+ * The international variant includes ICU i18n library and necessary data
107
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
108
+ * give correct results when using with locales other than en-US. Note that
109
+ * this variant is about 6MiB larger per architecture than default.
110
+ */
111
+ def jscFlavor = 'org.webkit:android-jsc:+'
112
+
113
+ /**
114
+ * Whether to enable the Hermes VM.
115
+ *
116
+ * This should be set on project.ext.react and mirrored here. If it is not set
117
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
118
+ * and the benefits of using Hermes will therefore be sharply reduced.
119
+ */
120
+ def enableHermes = project.ext.react.get("enableHermes", false);
121
+
122
+ android {
123
+ compileSdkVersion rootProject.ext.compileSdkVersion
124
+
125
+ compileOptions {
126
+ sourceCompatibility JavaVersion.VERSION_1_8
127
+ targetCompatibility JavaVersion.VERSION_1_8
128
+ }
129
+
130
+ defaultConfig {
131
+ applicationId "com.<%- appName %>"
132
+ minSdkVersion rootProject.ext.minSdkVersion
133
+ targetSdkVersion rootProject.ext.targetSdkVersion
134
+ versionCode 1
135
+ versionName "1.0"
136
+ }
137
+ splits {
138
+ abi {
139
+ reset()
140
+ enable enableSeparateBuildPerCPUArchitecture
141
+ universalApk false // If true, also generate a universal APK
142
+ include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
143
+ }
144
+ }
145
+ signingConfigs {
146
+ debug {
147
+ storeFile file('debug.keystore')
148
+ storePassword 'android'
149
+ keyAlias 'androiddebugkey'
150
+ keyPassword 'android'
151
+ }
152
+ }
153
+ buildTypes {
154
+ debug {
155
+ signingConfig signingConfigs.debug
156
+ }
157
+ release {
158
+ // Caution! In production, you need to generate your own keystore file.
159
+ // see https://facebook.github.io/react-native/docs/signed-apk-android.
160
+ signingConfig signingConfigs.debug
161
+ minifyEnabled enableProguardInReleaseBuilds
162
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
163
+ }
164
+ }
165
+ // applicationVariants are e.g. debug, release
166
+ applicationVariants.all { variant ->
167
+ variant.outputs.each { output ->
168
+ // For each separate APK per architecture, set a unique version code as described here:
169
+ // https://developer.android.com/studio/build/configure-apk-splits.html
170
+ def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
171
+ def abi = output.getFilter(OutputFile.ABI)
172
+ if (abi != null) { // null for the universal-debug, universal-release variants
173
+ output.versionCodeOverride =
174
+ versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
175
+ }
176
+
177
+ }
178
+ }
179
+ }
180
+
181
+ dependencies {
182
+ implementation fileTree(dir: "libs", include: ["*.jar"])
183
+ implementation "com.facebook.react:react-native:+" // From node_modules
184
+
185
+ if (enableHermes) {
186
+ def hermesPath = "../../node_modules/hermes-engine/android/";
187
+ debugImplementation files(hermesPath + "hermes-debug.aar")
188
+ releaseImplementation files(hermesPath + "hermes-release.aar")
189
+ } else {
190
+ implementation jscFlavor
191
+ }
192
+ }
193
+
194
+ // Run this once to be able to run the application with BUCK
195
+ // puts all compile dependencies into folder libs for BUCK to use
196
+ task copyDownloadableDepsToLibs(type: Copy) {
197
+ from configurations.compile
198
+ into 'libs'
199
+ }
200
+
201
+ apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
@@ -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:
@@ -1,8 +1,8 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
4
-
5
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
-
7
- <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8
- </manifest>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:tools="http://schemas.android.com/tools">
4
+
5
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
+
7
+ <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8
+ </manifest>
@@ -1,26 +1,26 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.<%- appName %>">
3
-
4
- <uses-permission android:name="android.permission.INTERNET" />
5
-
6
- <application
7
- android:name=".MainApplication"
8
- android:label="@string/app_name"
9
- android:icon="@mipmap/ic_launcher"
10
- android:roundIcon="@mipmap/ic_launcher_round"
11
- android:allowBackup="false"
12
- android:theme="@style/AppTheme">
13
- <activity
14
- android:name=".MainActivity"
15
- android:label="@string/app_name"
16
- android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
17
- android:windowSoftInputMode="adjustResize">
18
- <intent-filter>
19
- <action android:name="android.intent.action.MAIN" />
20
- <category android:name="android.intent.category.LAUNCHER" />
21
- </intent-filter>
22
- </activity>
23
- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
24
- </application>
25
-
26
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.<%- appName %>">
3
+
4
+ <uses-permission android:name="android.permission.INTERNET" />
5
+
6
+ <application
7
+ android:name=".MainApplication"
8
+ android:label="@string/app_name"
9
+ android:icon="@mipmap/ic_launcher"
10
+ android:roundIcon="@mipmap/ic_launcher_round"
11
+ android:allowBackup="false"
12
+ android:theme="@style/AppTheme">
13
+ <activity
14
+ android:name=".MainActivity"
15
+ android:label="@string/app_name"
16
+ android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
17
+ android:windowSoftInputMode="adjustResize">
18
+ <intent-filter>
19
+ <action android:name="android.intent.action.MAIN" />
20
+ <category android:name="android.intent.category.LAUNCHER" />
21
+ </intent-filter>
22
+ </activity>
23
+ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
24
+ </application>
25
+
26
+ </manifest>
@@ -1,15 +1,15 @@
1
- package com.<%- appName %>;
2
-
3
- import com.facebook.react.ReactActivity;
4
-
5
- public class MainActivity extends ReactActivity {
6
-
7
- /**
8
- * Returns the name of the main component registered from JavaScript. This is used to schedule
9
- * rendering of the component.
10
- */
11
- @Override
12
- protected String getMainComponentName() {
13
- return "<%- helper.getPascalCaseName(appName) %>";
14
- }
15
- }
1
+ package com.<%- appName %>;
2
+
3
+ import com.facebook.react.ReactActivity;
4
+
5
+ public class MainActivity extends ReactActivity {
6
+
7
+ /**
8
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
9
+ * rendering of the component.
10
+ */
11
+ @Override
12
+ protected String getMainComponentName() {
13
+ return "<%- helper.getPascalCaseName(appName) %>";
14
+ }
15
+ }