@24i/smartapps-bigscreen-rnv-build-engine 0.17.2-alpha.2162 → 0.17.2-alpha.2163
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/src/resolvers/resolveBuildFileExtension.js +1 -0
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +46 -7
- package/dist/src/tasks/task.rnv.build.js +1 -0
- package/dist/templates/platforms/androidtv/project/app/build.gradle +220 -9
- package/dist/templates/platforms/androidtv/project/build.gradle +1 -1
- package/package.json +1 -1
|
@@ -34,7 +34,13 @@ const sdk_webpack_1 = require("@rnv/sdk-webpack");
|
|
|
34
34
|
const sdk_webpack_2 = require("../sdk-webpack");
|
|
35
35
|
const sdk_utils_1 = require("../sdk-utils");
|
|
36
36
|
const services_1 = require("../sdk-utils/sdk-installer/services");
|
|
37
|
+
const resolvers_1 = require("../../resolvers");
|
|
37
38
|
const constants_1 = require("../../constants");
|
|
39
|
+
const flavourName = 'bigscreenAppstage';
|
|
40
|
+
const buildType = 'debug';
|
|
41
|
+
const capitalizeFirstLetter = (str) => {
|
|
42
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
43
|
+
};
|
|
38
44
|
const buildAndroidTVProject = async (c) => {
|
|
39
45
|
rnv_1.Logger.logTask('buildAndroidTVProject');
|
|
40
46
|
await (0, sdk_webpack_2.buildCoreWebpackProject)(c);
|
|
@@ -42,11 +48,13 @@ const buildAndroidTVProject = async (c) => {
|
|
|
42
48
|
const projectDir = rnv_1.Common.getPlatformProjectDir(c);
|
|
43
49
|
const projectParentDir = path.join(projectDir, '..');
|
|
44
50
|
const tOut = path.join(projectParentDir, 'output');
|
|
45
|
-
const flavourName = 'bigscreenAppstage';
|
|
46
51
|
const apkFileName = `app-${flavourName}-debug.apk`;
|
|
47
52
|
const apkFilePath = path.join(projectDir, `app/build/outputs/apk/${flavourName}/debug/${apkFileName}`);
|
|
48
53
|
const gradlew = './gradlew';
|
|
49
|
-
|
|
54
|
+
const taskBuildType = buildType === 'debug' ? 'Debug' : 'Release';
|
|
55
|
+
const taskFlavourName = capitalizeFirstLetter(flavourName);
|
|
56
|
+
const taskName = `assemble${taskFlavourName}${taskBuildType}`;
|
|
57
|
+
(0, child_process_1.execSync)(`cd ${projectDir} && ${gradlew} ${taskName}`);
|
|
50
58
|
if (!fs.existsSync(tOut)) {
|
|
51
59
|
fs.mkdirSync(tOut);
|
|
52
60
|
}
|
|
@@ -60,27 +68,58 @@ const configureProject = (c) => {
|
|
|
60
68
|
rnv_1.Logger.logTask('configureProject');
|
|
61
69
|
const buildGradleFileName = 'build.gradle';
|
|
62
70
|
const buildGradleFilePath = path.join(rnv_1.Common.getPlatformProjectDir(c), 'app', buildGradleFileName);
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
|
|
71
|
+
const version = semver.coerce(rnv_1.Common.getAppVersion(c, c.platform));
|
|
72
|
+
const semVerObj = semver.parse(version);
|
|
73
|
+
if (!semVerObj) {
|
|
74
|
+
throw new Error(`Failed to parse Application version: ${version}`);
|
|
75
|
+
}
|
|
76
|
+
const major = `${semVerObj.major}`.padStart(2, '0');
|
|
77
|
+
const minor = `${semVerObj.minor}`.padStart(2, '0');
|
|
78
|
+
const patch = `${semVerObj.patch}`.padStart(2, '0');
|
|
79
|
+
const versionCode = parseInt(`${major}${minor}${patch}00`, 10);
|
|
80
|
+
const appId = rnv_1.Common.getConfigProp(c, c.platform, 'id', '');
|
|
66
81
|
const injects = [{
|
|
67
82
|
pattern: '{{APP_VERSION_CODE}}',
|
|
68
83
|
override: versionCode,
|
|
69
84
|
}, {
|
|
70
85
|
pattern: '{{APP_VERSION_NAME}}',
|
|
71
|
-
override:
|
|
86
|
+
override: version,
|
|
87
|
+
}, {
|
|
88
|
+
pattern: '{{APP_ID}}',
|
|
89
|
+
override: appId,
|
|
72
90
|
}];
|
|
73
91
|
rnv_1.Common.addSystemInjects(c, injects);
|
|
74
92
|
rnv_1.FileUtils.writeCleanFile(buildGradleFilePath, buildGradleFilePath, injects, null, c);
|
|
75
93
|
};
|
|
94
|
+
const getHostedAppEntryUrl = (c) => {
|
|
95
|
+
const { platform, runtime } = c;
|
|
96
|
+
const baseUrl = (0, resolvers_1.resolveBaseUrl)({
|
|
97
|
+
platform,
|
|
98
|
+
scheme: runtime.scheme || '',
|
|
99
|
+
flavour: runtime.appId,
|
|
100
|
+
});
|
|
101
|
+
return `${baseUrl}/public/index.html`;
|
|
102
|
+
};
|
|
103
|
+
const configureEntryUrl = (c) => {
|
|
104
|
+
rnv_1.Logger.logTask('configureEntryUrl');
|
|
105
|
+
const entryUrl = getHostedAppEntryUrl(c);
|
|
106
|
+
const configFileName = 'configuration.json';
|
|
107
|
+
const injects = [{
|
|
108
|
+
pattern: '{{APP_URL}}',
|
|
109
|
+
override: entryUrl,
|
|
110
|
+
}];
|
|
111
|
+
const file = path.join(rnv_1.Common.getPlatformProjectDir(c), 'app/src', flavourName, 'res/raw', configFileName);
|
|
112
|
+
rnv_1.FileUtils.writeCleanFile(file, file, injects, null, c);
|
|
113
|
+
};
|
|
76
114
|
const configureAndroidTVProject = async (c) => {
|
|
77
115
|
rnv_1.Logger.logTask('configureAndroidTVProject');
|
|
78
116
|
c.runtime.platformBuildsProjectPath = rnv_1.Common.getPlatformProjectDir(c);
|
|
79
117
|
const platform = constants_1.Platforms.ANDROIDTV;
|
|
80
|
-
await rnv_1.ProjectManager.copyAssetsFolder(c, platform);
|
|
118
|
+
await rnv_1.ProjectManager.copyAssetsFolder(c, platform, `app/src/${flavourName}/res`);
|
|
81
119
|
await (0, sdk_webpack_1.configureCoreWebProject)(c);
|
|
82
120
|
await configureAndroidProperties(c);
|
|
83
121
|
configureProject(c);
|
|
122
|
+
configureEntryUrl(c);
|
|
84
123
|
const gradlew = path.join(rnv_1.Common.getPlatformProjectDir(c), 'gradlew');
|
|
85
124
|
fs.chmodSync(gradlew, '755');
|
|
86
125
|
await rnv_1.ProjectManager.copyBuildsFolder(c, platform);
|
|
@@ -70,22 +70,233 @@ android {
|
|
|
70
70
|
|
|
71
71
|
flavorDimensions "bridge"
|
|
72
72
|
productFlavors {
|
|
73
|
+
portal {
|
|
74
|
+
dimension "bridge"
|
|
75
|
+
versionCode 2003000
|
|
76
|
+
versionName "2.3"
|
|
77
|
+
resValue "string", "app_name", "24i Portal"
|
|
78
|
+
}
|
|
79
|
+
portalDrm {
|
|
80
|
+
dimension "bridge"
|
|
81
|
+
applicationIdSuffix ".drmCallback"
|
|
82
|
+
versionCode 1006000
|
|
83
|
+
versionName "1.6"
|
|
84
|
+
resValue "string", "app_name", "24i Portal DRM"
|
|
85
|
+
}
|
|
86
|
+
smartOTT {
|
|
87
|
+
dimension "bridge"
|
|
88
|
+
applicationIdSuffix ".smartOTT"
|
|
89
|
+
versionCode 1
|
|
90
|
+
versionName "1.0"
|
|
91
|
+
resValue "string", "app_name", "SmartOTT"
|
|
92
|
+
}
|
|
93
|
+
hummingbird {
|
|
94
|
+
dimension "bridge"
|
|
95
|
+
applicationIdSuffix ".hummingbird"
|
|
96
|
+
versionCode 1
|
|
97
|
+
versionName "1.0"
|
|
98
|
+
resValue "string", "app_name", "Hummingbird"
|
|
99
|
+
}
|
|
100
|
+
tennisChannel {
|
|
101
|
+
dimension "bridge"
|
|
102
|
+
applicationId "com.tennischannel.tceverywhere.amazon"
|
|
103
|
+
versionCode 46
|
|
104
|
+
versionName "1.1.1"
|
|
105
|
+
resValue "string", "app_name", "Tennis Channel Sinclair"
|
|
106
|
+
}
|
|
107
|
+
cineClick {
|
|
108
|
+
dimension "bridge"
|
|
109
|
+
applicationIdSuffix ".cineclick"
|
|
110
|
+
versionCode 1
|
|
111
|
+
versionName "1.0"
|
|
112
|
+
resValue "string", "app_name", "Cineclick"
|
|
113
|
+
}
|
|
114
|
+
hereMedia {
|
|
115
|
+
dimension "bridge"
|
|
116
|
+
applicationIdSuffix ".heretv"
|
|
117
|
+
versionCode 1
|
|
118
|
+
versionName "1.0"
|
|
119
|
+
resValue "string", "app_name", "Here TV"
|
|
120
|
+
}
|
|
121
|
+
fuboTV {
|
|
122
|
+
dimension "bridge"
|
|
123
|
+
applicationIdSuffix ".fuboTV"
|
|
124
|
+
versionCode 1
|
|
125
|
+
versionName "1.0"
|
|
126
|
+
resValue "string", "app_name", "[Fubo TV]"
|
|
127
|
+
}
|
|
128
|
+
sentai {
|
|
129
|
+
dimension "bridge"
|
|
130
|
+
applicationIdSuffix ".sentai"
|
|
131
|
+
versionCode 1007002
|
|
132
|
+
versionName "1.7.2"
|
|
133
|
+
resValue "string", "app_name", "HIDIVE"
|
|
134
|
+
// uncomment for signing testing builds
|
|
135
|
+
// signingConfig signingConfigs.hidiverelease
|
|
136
|
+
}
|
|
137
|
+
sentaiandroidtv {
|
|
138
|
+
dimension "bridge"
|
|
139
|
+
applicationId 'com.twentyfouri.androidtv.hidive'
|
|
140
|
+
versionCode 1010000
|
|
141
|
+
versionName "1.1.0"
|
|
142
|
+
resValue "string", "app_name", "HIDIVE"
|
|
143
|
+
// uncomment for signing testing builds
|
|
144
|
+
// signingConfig signingConfigs.hidiverelease
|
|
145
|
+
}
|
|
146
|
+
newsmax {
|
|
147
|
+
dimension "bridge"
|
|
148
|
+
//Android TV
|
|
149
|
+
applicationId "com.fli.android.newsmaxapp"
|
|
150
|
+
versionCode 1000300
|
|
151
|
+
versionName "1.0.2-androidTV"
|
|
152
|
+
resValue "string", "app_name", "Newsmax"
|
|
153
|
+
//FireTV
|
|
154
|
+
// applicationId "com.fli.googletv.newsmaxapp"
|
|
155
|
+
// versionCode 1411285562
|
|
156
|
+
// versionName "1.0.5-fireTV"
|
|
157
|
+
// resValue "string", "app_name", "Newsmax"
|
|
158
|
+
}
|
|
159
|
+
entel {
|
|
160
|
+
dimension "bridge"
|
|
161
|
+
applicationIdSuffix ".entel"
|
|
162
|
+
versionCode 1
|
|
163
|
+
versionName "1.0"
|
|
164
|
+
resValue "string", "app_name", "Entel"
|
|
165
|
+
}
|
|
166
|
+
youFone {
|
|
167
|
+
dimension "bridge"
|
|
168
|
+
applicationIdSuffix ".youfone"
|
|
169
|
+
versionCode 1
|
|
170
|
+
versionName "1.0"
|
|
171
|
+
resValue "string", "app_name", "YouFone"
|
|
172
|
+
}
|
|
173
|
+
bbg {
|
|
174
|
+
dimension "bridge"
|
|
175
|
+
applicationIdSuffix ".bbg"
|
|
176
|
+
versionCode 10
|
|
177
|
+
versionName "1.8"
|
|
178
|
+
resValue "string", "app_name", "BBG"
|
|
179
|
+
}
|
|
180
|
+
kijk {
|
|
181
|
+
dimension "bridge"
|
|
182
|
+
applicationIdSuffix ".kijk"
|
|
183
|
+
versionCode 2
|
|
184
|
+
versionName "1.01"
|
|
185
|
+
resValue "string", "app_name", "KIJK"
|
|
186
|
+
}
|
|
187
|
+
rte {
|
|
188
|
+
dimension "bridge"
|
|
189
|
+
applicationIdSuffix ".rte"
|
|
190
|
+
versionCode 5
|
|
191
|
+
versionName "1.0.2"
|
|
192
|
+
resValue "string", "app_name", "RTE"
|
|
193
|
+
}
|
|
194
|
+
alhurra {
|
|
195
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
196
|
+
dimension "bridge"
|
|
197
|
+
applicationIdSuffix ".alhurra"
|
|
198
|
+
versionCode 1000800
|
|
199
|
+
versionName "1.0.8"
|
|
200
|
+
resValue "string", "app_name", "Alhurra"
|
|
201
|
+
}
|
|
202
|
+
marti {
|
|
203
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
204
|
+
dimension "bridge"
|
|
205
|
+
applicationIdSuffix ".marti"
|
|
206
|
+
versionCode 1000800
|
|
207
|
+
versionName "1.0.8"
|
|
208
|
+
resValue "string", "app_name", "Marti"
|
|
209
|
+
}
|
|
210
|
+
voa {
|
|
211
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
212
|
+
dimension "bridge"
|
|
213
|
+
applicationIdSuffix ".voa"
|
|
214
|
+
versionCode 1000800
|
|
215
|
+
versionName "1.0.8"
|
|
216
|
+
resValue "string", "app_name", "VOA"
|
|
217
|
+
}
|
|
218
|
+
voa365 {
|
|
219
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
220
|
+
dimension "bridge"
|
|
221
|
+
applicationIdSuffix ".voa365"
|
|
222
|
+
versionCode 1000300
|
|
223
|
+
versionName "1.0.3"
|
|
224
|
+
resValue "string", "app_name", "VOA 365"
|
|
225
|
+
}
|
|
226
|
+
rfe {
|
|
227
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
228
|
+
dimension "bridge"
|
|
229
|
+
applicationIdSuffix ".rfe"
|
|
230
|
+
versionCode 1000100
|
|
231
|
+
versionName "1.0.1"
|
|
232
|
+
resValue "string", "app_name", "RFE"
|
|
233
|
+
}
|
|
73
234
|
bigscreenAppstage {
|
|
74
235
|
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
75
236
|
dimension "bridge"
|
|
76
237
|
versionCode {{APP_VERSION_CODE}}
|
|
77
238
|
versionName "{{APP_VERSION_NAME}}"
|
|
78
|
-
applicationId "{{
|
|
239
|
+
applicationId "{{APP_ID}}"
|
|
79
240
|
resValue "string", "app_name", "{{configProps.appName}}"
|
|
80
241
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
242
|
+
pureflix {
|
|
243
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
244
|
+
dimension "bridge"
|
|
245
|
+
versionCode 5000900
|
|
246
|
+
versionName "5.0.9"
|
|
247
|
+
// Android TV
|
|
248
|
+
applicationId "com.pureflix"
|
|
249
|
+
resValue "string", "app_name", "PureFlix (Android TV)"
|
|
250
|
+
// Fire TV
|
|
251
|
+
// applicationId "com.rollingstorm.pureflixFTV"
|
|
252
|
+
// resValue "string", "app_name", "PureFlix"
|
|
253
|
+
}
|
|
254
|
+
rfa {
|
|
255
|
+
// X.Y.Z XXYYZZUU -> version 1.2.3 will be 01020300, 5th update of 1.2.3 will be 01020305
|
|
256
|
+
dimension "bridge"
|
|
257
|
+
applicationIdSuffix ".rfa"
|
|
258
|
+
versionCode 1000300
|
|
259
|
+
versionName "1.0.3"
|
|
260
|
+
resValue "string", "app_name", "RFA"
|
|
261
|
+
}
|
|
262
|
+
fuse {
|
|
263
|
+
dimension "bridge"
|
|
264
|
+
applicationIdSuffix ".fuse"
|
|
265
|
+
versionCode 3
|
|
266
|
+
versionName "1.0.2"
|
|
267
|
+
resValue "string", "app_name", "Fuse"
|
|
268
|
+
}
|
|
269
|
+
gsn {
|
|
270
|
+
dimension "bridge"
|
|
271
|
+
applicationId "com.gsn.apptv" // production
|
|
272
|
+
// applicationId "com.gsn.test.apptv" // staging
|
|
273
|
+
versionCode 1000900
|
|
274
|
+
versionName "1.0.9"
|
|
275
|
+
resValue "string", "app_name", "GSN"
|
|
276
|
+
}
|
|
277
|
+
topic {
|
|
278
|
+
dimension "bridge"
|
|
279
|
+
applicationId "com.flm.topictv" // production
|
|
280
|
+
// applicationId "com.twentyfouri.tvbridge.topic" // staging
|
|
281
|
+
versionCode 1010000
|
|
282
|
+
versionName "1.1.0"
|
|
283
|
+
resValue "string", "app_name", "Topic"
|
|
284
|
+
}
|
|
285
|
+
broadwayhd {
|
|
286
|
+
dimension "bridge"
|
|
287
|
+
applicationId "com.broadwayhd.apptv" // production
|
|
288
|
+
// applicationId "com.twentyfouri.tvbridge.broadwayhd" // staging
|
|
289
|
+
versionCode 1000700
|
|
290
|
+
versionName "1.0.7"
|
|
291
|
+
resValue "string", "app_name", "BroadwayHD"
|
|
292
|
+
}
|
|
293
|
+
kpn {
|
|
294
|
+
dimension "bridge"
|
|
295
|
+
applicationId "com.twentyfouri.kpnandroidtv"
|
|
296
|
+
versionCode 2
|
|
297
|
+
versionName "0.0.2"
|
|
298
|
+
resValue "string", "app_name", "KPN iTV"
|
|
299
|
+
}
|
|
89
300
|
}
|
|
90
301
|
|
|
91
302
|
sourceSets {
|
|
@@ -24,7 +24,7 @@ buildscript {
|
|
|
24
24
|
ext {
|
|
25
25
|
mavenRepositoryUrl = 'https://maven.pkg.github.com/24i/*'
|
|
26
26
|
mavenRepositoryUsername = findProperty('github_username') ?: "24i"
|
|
27
|
-
mavenRepositoryPassword = findProperty('github_token') ?: System.getenv("GH_TOKEN")
|
|
27
|
+
mavenRepositoryPassword = findProperty('github_token') ?: System.getenv("GH_TOKEN") ?: System.getenv("GITHUB_TOKEN")
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
allprojects {
|
package/package.json
CHANGED