@24i/smartapps-bigscreen-rnv-build-engine 0.17.6-alpha.18 → 0.17.6-alpha.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.
- package/README.md +12 -16
- package/dist/src/constants/delopyLivePlatforms.js +1 -2
- package/dist/src/constants/platforms.js +0 -2
- package/dist/src/engine.js +0 -10
- package/dist/src/resolvers/index.js +1 -8
- package/dist/src/resolvers/resolveBaseUrl.js +25 -16
- package/dist/src/resolvers/resolveDeployLocations.js +6 -3
- package/dist/src/resolvers/resolveGenericRnvConfig.js +2 -9
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +1 -25
- package/dist/src/scripts/deployLiveAll.js +2 -2
- package/dist/src/scripts/deployLivePlatform.js +5 -9
- package/dist/src/scripts/release/{appCenter/deployToAppCenter.js → deployToAppCenter.js} +17 -6
- package/dist/src/scripts/release/notifySlack/notifySlack.js +8 -11
- package/dist/src/scripts/release/sentryRelease.js +5 -11
- package/dist/src/scripts/release/urlsMarkdown.js +0 -2
- package/dist/src/scripts/releaseAllWithScheme.js +4 -4
- package/dist/src/sdks/index.js +0 -1
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +13 -35
- package/dist/src/sdks/sdk-tizen/sdkTizen.js +0 -2
- package/dist/src/sdks/sdk-webos/sdkWebos.js +0 -2
- package/dist/src/sdks/sdk-webpack/sdkWebpack.js +1 -10
- package/dist/src/tasks/deploy/aswS3/deployS3.js +11 -9
- package/dist/src/tasks/deploy/aswS3/distToLiveS3.js +5 -4
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +1 -7
- package/dist/src/tasks/task.rnv.build.js +7 -26
- package/dist/src/tasks/task.rnv.configure.js +0 -2
- package/dist/src/tasks/task.rnv.deploy.js +1 -12
- package/dist/src/tasks/task.rnv.platform.configure.js +1 -33
- package/dist/src/tasks/task.rnv.start.js +0 -2
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +7 -24
- package/dist/src/utils/zipBuildsByPlatforms.js +5 -8
- package/dist/templates/platforms/_shared/webpack.base.js +2 -2
- package/dist/templates/platforms/androidtv/project/amazoniap/build.gradle +2 -2
- package/dist/templates/platforms/androidtv/project/app/build.gradle +21 -17
- package/dist/templates/platforms/androidtv/project/app/proguard-rules.pro +0 -15
- package/dist/templates/platforms/androidtv/project/app/src/bigscreenAppstage/res/raw/configuration.json +2 -1
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/bridge/BridgeFromJavaScript.kt +58 -4
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/bridge/BridgeToJavaScript.kt +0 -15
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/configuration/BridgeConfig.kt +1 -2
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ActivityModule.kt +3 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/ApplicationModule.kt +2 -2
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/di/PerActivity.kt +0 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryExoPlayerCustomized.kt +1 -7
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/SourceDrmOverridden.kt +0 -42
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/jump/JumpAnalytics.kt +211 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/model/MediaEventType.kt +0 -3
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/ContentModelParser.kt +16 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/DeviceInfoParser.kt +22 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/Mainview.kt +3 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/PlayerCache.kt +2 -2
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/view/WebViewActivity.kt +83 -24
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/viewmodel/WebViewModel.kt +111 -48
- package/dist/templates/platforms/androidtv/project/app/src/main/res/layout/activity_web_view.xml +71 -23
- package/dist/templates/platforms/androidtv/project/common/build.gradle +2 -2
- package/dist/templates/platforms/androidtv/project/googleiap/build.gradle +2 -2
- package/package.json +1 -3
- package/renative.engine.json +0 -2
- package/dist/src/constants/buildProductionPackages.js +0 -10
- package/dist/src/resolvers/resolveProductionZipFileRelativePath.js +0 -35
- package/dist/src/resolvers/resolveS3BucketAppPath.js +0 -15
- package/dist/src/resolvers/resolveSupportedFlavoursForPlatform.js +0 -8
- package/dist/src/resolvers/shared/constructFullUrl.js +0 -25
- package/dist/src/scripts/buildAllWithSchemes.js +0 -88
- package/dist/src/scripts/buildProductionPackagesAll.js +0 -75
- package/dist/src/scripts/release/appCenter/appCenter.js +0 -17
- package/dist/src/scripts/release/appCenter/deployProductionPackagesToAppCenter.js +0 -127
- package/dist/src/scripts/releaseAllWithSchemes.js +0 -158
- package/dist/src/scripts/releaseProductionPackagesAll.js +0 -13
- package/dist/src/utils/copyTheoPlayerLibs.js +0 -47
- package/dist/src/utils/getSafeSchemeString.js +0 -7
- package/dist/src/utils/zipStagingProdBuildsByPlatforms.js +0 -114
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryConfigured.kt +0 -33
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryTheoPlayerCustomized.kt +0 -14
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryVersion.kt +0 -27
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/webview/parser/SourceParser.kt +0 -89
|
@@ -8,8 +8,6 @@ const path_1 = __importDefault(require("path"));
|
|
|
8
8
|
const ip_1 = __importDefault(require("ip"));
|
|
9
9
|
const rnv_1 = require("rnv");
|
|
10
10
|
const sdk_webpack_1 = require("@rnv/sdk-webpack");
|
|
11
|
-
const resolvers_1 = require("../../resolvers");
|
|
12
|
-
const copyTheoPlayerLibs_1 = require("../../utils/copyTheoPlayerLibs");
|
|
13
11
|
const copyEnvironmentFolder_1 = require("../../utils/copyEnvironmentFolder");
|
|
14
12
|
const configureWebProject = async (c) => {
|
|
15
13
|
rnv_1.Logger.logTask('configureWebProject');
|
|
@@ -22,7 +20,6 @@ const configureWebProject = async (c) => {
|
|
|
22
20
|
await (0, sdk_webpack_1.configureCoreWebProject)(c);
|
|
23
21
|
await rnv_1.ProjectManager.copyBuildsFolder(c, platform);
|
|
24
22
|
(0, copyEnvironmentFolder_1.copyEnvFolderInPublicConfig)(c);
|
|
25
|
-
(0, copyTheoPlayerLibs_1.copyTheoPlayerLibs)(c);
|
|
26
23
|
};
|
|
27
24
|
exports.configureWebProject = configureWebProject;
|
|
28
25
|
const getWebpackPath = () => {
|
|
@@ -54,13 +51,7 @@ const buildCoreWebpackProject = async (c) => {
|
|
|
54
51
|
if (wp === '') {
|
|
55
52
|
rnv_1.Logger.logWarning('Webpack not found. Will try to use globally installed one');
|
|
56
53
|
}
|
|
57
|
-
|
|
58
|
-
if (c.program.productionPackagesHostedUrl) {
|
|
59
|
-
hostedUrlVariable = `HOSTED_URL=${(0, resolvers_1.resolveProductionPackagesBaseUrl)(c)}`;
|
|
60
|
-
}
|
|
61
|
-
const envVars = [
|
|
62
|
-
`PLATFORM=${platform}`, `NODE_ENV=${environment}`, debugVariables, hostedUrlVariable,
|
|
63
|
-
].filter(Boolean).join(' ');
|
|
54
|
+
const envVars = `PLATFORM=${platform} NODE_ENV=${environment} ${debugVariables}`;
|
|
64
55
|
const wpConfigPath = `./platformBuilds/${appId}_${platform}/webpack.config.${configName}.js`;
|
|
65
56
|
const wpCmd = `node ${wp} build --mode production --config ${wpConfigPath}`;
|
|
66
57
|
await rnv_1.Exec.executeAsync(c, `npx cross-env ${envVars} ${wpCmd}`);
|
|
@@ -23,42 +23,44 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.deployToS3 = void 0;
|
|
26
|
+
exports.deployToS3 = exports.urlToS3Protocol = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const rnv_1 = require("rnv");
|
|
29
29
|
const aws = __importStar(require("./aws"));
|
|
30
30
|
const constants_1 = require("../../../constants");
|
|
31
31
|
const resolvers_1 = require("../../../resolvers");
|
|
32
|
-
const getSafeSchemeString_1 = require("../../../utils/getSafeSchemeString");
|
|
33
32
|
const { getConfigProp } = rnv_1.Common;
|
|
34
33
|
const uploadPackage = (c, sourcePath, uploadPath) => {
|
|
35
34
|
const packageOutputDirPath = `${sourcePath}/output`;
|
|
36
35
|
const packageFileName = (0, resolvers_1.resolveBuildFileName)(c);
|
|
37
36
|
const packageLocalPath = `"${packageOutputDirPath}/${packageFileName}"`;
|
|
38
37
|
const packageRemotePath = `"${uploadPath}/build/${packageFileName}"`;
|
|
39
|
-
rnv_1.Logger.logDebug(`uploadPackage: src: ${packageLocalPath}, dest: ${packageRemotePath}`);
|
|
40
38
|
aws.cp(packageLocalPath, packageRemotePath);
|
|
41
39
|
};
|
|
42
40
|
const uploadPublicDir = (sourcePath, uploadPath) => {
|
|
43
41
|
const publicDirLocalPath = path.join(sourcePath, 'project', 'public');
|
|
44
42
|
const publicDirRemotePath = `${uploadPath}/public`;
|
|
45
|
-
rnv_1.Logger.logDebug(`uploadPublicDir: src: ${publicDirLocalPath}, dest: ${publicDirRemotePath}`);
|
|
46
43
|
aws.cp(publicDirLocalPath, publicDirRemotePath);
|
|
47
44
|
};
|
|
45
|
+
const urlToS3Protocol = (url) => {
|
|
46
|
+
const hostWithPath = url.split('://')[1];
|
|
47
|
+
const bucketHostnameAwsPostfix = '.s3.amazonaws.com';
|
|
48
|
+
return hostWithPath.replace(bucketHostnameAwsPostfix, '');
|
|
49
|
+
};
|
|
50
|
+
exports.urlToS3Protocol = urlToS3Protocol;
|
|
48
51
|
const deployToS3 = async (c) => {
|
|
49
|
-
rnv_1.Logger.logTask(`deployToS3`);
|
|
50
52
|
const { platform, runtime } = c;
|
|
51
|
-
const
|
|
52
|
-
const sourcePath = path.join(c.paths.project.builds.dir, schemeDirName, `${runtime.appId}_${platform}`);
|
|
53
|
+
const sourcePath = runtime.appDir;
|
|
53
54
|
const { isBuildHosted } = getConfigProp(c, platform, 'webpackConfig', {});
|
|
54
|
-
const
|
|
55
|
+
const baseUrl = (0, resolvers_1.resolveBaseUrl)({
|
|
55
56
|
platform,
|
|
56
57
|
scheme: runtime.scheme || '',
|
|
57
58
|
flavour: runtime.appId,
|
|
58
59
|
});
|
|
59
|
-
if (!
|
|
60
|
+
if (!baseUrl) {
|
|
60
61
|
return false;
|
|
61
62
|
}
|
|
63
|
+
const uploadPath = urlToS3Protocol(baseUrl);
|
|
62
64
|
aws.rm(`${uploadPath}/`);
|
|
63
65
|
uploadPackage(c, sourcePath, uploadPath);
|
|
64
66
|
if (platform === constants_1.Platforms.HBBTV) {
|
|
@@ -24,16 +24,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.checkAWSAuth = exports.checkDistVersionAvailability = exports.distToLiveS3 = void 0;
|
|
27
|
-
const
|
|
27
|
+
const resolveBaseUrl_1 = require("../../../resolvers/resolveBaseUrl");
|
|
28
28
|
const resolveGenericRnvConfig_1 = require("../../../resolvers/resolveGenericRnvConfig");
|
|
29
|
+
const deployS3_1 = require("./deployS3");
|
|
29
30
|
const aws = __importStar(require("./aws"));
|
|
30
31
|
const getUploadPath = (options, version) => {
|
|
31
32
|
const { packageVersion } = (0, resolveGenericRnvConfig_1.getBaseConfig)().buildConfig?.common;
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
33
|
+
const baseUrl = (0, resolveBaseUrl_1.resolveBaseUrl)(options);
|
|
34
|
+
if (!baseUrl) {
|
|
34
35
|
return undefined;
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return (0, deployS3_1.urlToS3Protocol)(baseUrl).replace(packageVersion, version);
|
|
37
38
|
};
|
|
38
39
|
const checkAWSAuth = () => {
|
|
39
40
|
try {
|
|
@@ -28,7 +28,6 @@ const path = __importStar(require("path"));
|
|
|
28
28
|
const nodessh = __importStar(require("node-ssh"));
|
|
29
29
|
const constants_1 = require("../../../constants");
|
|
30
30
|
const resolvers_1 = require("../../../resolvers");
|
|
31
|
-
const getSafeSchemeString_1 = require("../../../utils/getSafeSchemeString");
|
|
32
31
|
const getSshKeyAbsolutePath = (c, sshKeyRelativePath) => {
|
|
33
32
|
if (!sshKeyRelativePath)
|
|
34
33
|
return '';
|
|
@@ -45,12 +44,7 @@ const makeSshConnection = async (c) => {
|
|
|
45
44
|
await ssh.connect({ host, username, privateKey, passphrase });
|
|
46
45
|
return ssh;
|
|
47
46
|
};
|
|
48
|
-
const getLocalBuildPackagePath = (c) =>
|
|
49
|
-
const { runtime, platform } = c;
|
|
50
|
-
const schemeDirName = c.program.schemeFolder ? (0, getSafeSchemeString_1.getSafeSchemeString)(runtime.scheme) : '';
|
|
51
|
-
const appDirPath = path.join(c.paths.project.builds.dir, schemeDirName, `${runtime.appId}_${platform}`);
|
|
52
|
-
return path.join(appDirPath, 'output', (0, resolvers_1.resolveBuildFileName)(c));
|
|
53
|
-
};
|
|
47
|
+
const getLocalBuildPackagePath = (c) => (path.join(c.runtime.appDir, 'output', (0, resolvers_1.resolveBuildFileName)(c)));
|
|
54
48
|
const resolveRemotePaths = (c) => {
|
|
55
49
|
const { scheme, appId } = c.runtime;
|
|
56
50
|
const remoteBuildDirRelativePath = (0, resolvers_1.resolveHbbtvRemoteBuildDirRelativePath)(c, scheme, appId);
|
|
@@ -25,39 +25,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.customRnvBuildTask = void 0;
|
|
27
27
|
const child_process_1 = require("child_process");
|
|
28
|
-
const path = __importStar(require("path"));
|
|
29
|
-
const os = __importStar(require("os"));
|
|
30
28
|
const fs = __importStar(require("fs"));
|
|
31
29
|
const rnv_1 = require("rnv");
|
|
32
30
|
const constants_1 = require("../constants");
|
|
33
31
|
const sdks_1 = require("../sdks");
|
|
34
32
|
const resolvers_1 = require("../resolvers");
|
|
35
33
|
const { TASK_BUILD, TASK_PACKAGE, PARAMS } = rnv_1.Constants;
|
|
36
|
-
const isWindows = os.platform() === 'win32';
|
|
37
|
-
const PARAM_KEYS = {
|
|
38
|
-
productionPackagesHostedUrl: {
|
|
39
|
-
key: 'productionPackagesHostedUrl',
|
|
40
|
-
description: 'Uses production package hosted URL of App',
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
34
|
const makeZipOutput = (c) => {
|
|
44
35
|
const platformBuildDir = rnv_1.Common.getPlatformBuildDir(c);
|
|
45
|
-
const copiedProjectBuildDir =
|
|
36
|
+
const copiedProjectBuildDir = `${platformBuildDir}/build`;
|
|
46
37
|
const defaultZipFileName = `${c.platform}_${c.runtime.appId}.zip`;
|
|
47
38
|
const fileName = (0, resolvers_1.resolveBuildFileName)(c) || defaultZipFileName;
|
|
48
|
-
(0, child_process_1.execSync)(`cp -r ${
|
|
49
|
-
(0, child_process_1.execSync)(`rm -rf ${
|
|
50
|
-
(0, child_process_1.execSync)(`mkdir ${
|
|
51
|
-
|
|
52
|
-
(0, child_process_1.execSync)(`tar -acf ${path.join('..', 'output', fileName)} *`, { cwd: copiedProjectBuildDir });
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
(0, child_process_1.execSync)(`zip -r ${path.join('..', 'output', fileName)} *`, { cwd: copiedProjectBuildDir });
|
|
56
|
-
}
|
|
39
|
+
(0, child_process_1.execSync)(`cp -r ${rnv_1.Common.getPlatformProjectDir(c)}/public ${copiedProjectBuildDir}`);
|
|
40
|
+
(0, child_process_1.execSync)(`rm -rf ${platformBuildDir}/output`);
|
|
41
|
+
(0, child_process_1.execSync)(`mkdir ${platformBuildDir}/output`);
|
|
42
|
+
(0, child_process_1.execSync)(`zip -r ../output/${fileName} *`, { cwd: copiedProjectBuildDir });
|
|
57
43
|
(0, child_process_1.execSync)(`rm -rf ${copiedProjectBuildDir}`);
|
|
58
44
|
};
|
|
59
45
|
const renameOutput = (c) => {
|
|
60
|
-
const packageOutputDirPath =
|
|
46
|
+
const packageOutputDirPath = `${c.runtime.appDir}/output`;
|
|
61
47
|
if (!fs.existsSync(packageOutputDirPath))
|
|
62
48
|
return;
|
|
63
49
|
const outputFilenameList = fs.readdirSync(packageOutputDirPath);
|
|
@@ -73,9 +59,6 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
73
59
|
rnv_1.Logger.logTask('taskRnvBuild', `parent:${parentTask}`);
|
|
74
60
|
const { platform } = c;
|
|
75
61
|
c.runtime.forceBundleAssets = true;
|
|
76
|
-
if (c.program.rawArgs?.includes(`--${PARAM_KEYS.productionPackagesHostedUrl.key}`)) {
|
|
77
|
-
c.program[PARAM_KEYS.productionPackagesHostedUrl.key] = true;
|
|
78
|
-
}
|
|
79
62
|
await (0, sdks_1.handlePlatformSdk)(c);
|
|
80
63
|
await rnv_1.TaskManager.executeOrSkipTask(c, TASK_PACKAGE, TASK_BUILD, originTask);
|
|
81
64
|
switch (platform) {
|
|
@@ -84,7 +67,6 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
84
67
|
case constants_1.Platforms.KREATV:
|
|
85
68
|
case constants_1.Platforms.SAPHI:
|
|
86
69
|
case constants_1.Platforms.VIDAA:
|
|
87
|
-
case constants_1.Platforms.SMARTCAST:
|
|
88
70
|
case constants_1.Platforms.WEBTV:
|
|
89
71
|
await sdks_1.SDKWebpack.buildCoreWebpackProject(c);
|
|
90
72
|
makeZipOutput(c);
|
|
@@ -101,7 +83,6 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
101
83
|
renameOutput(c);
|
|
102
84
|
break;
|
|
103
85
|
case constants_1.Platforms.ANDROIDTV:
|
|
104
|
-
case constants_1.Platforms.FIRETV:
|
|
105
86
|
await sdks_1.SDKAndroidtv.buildAndroidTVProject(c);
|
|
106
87
|
break;
|
|
107
88
|
default:
|
|
@@ -112,7 +93,7 @@ const customRnvBuildTask = {
|
|
|
112
93
|
description: 'Build project binary',
|
|
113
94
|
fn: buildFn,
|
|
114
95
|
task: 'build',
|
|
115
|
-
params: PARAMS.withBase(PARAMS.withConfigure(
|
|
96
|
+
params: PARAMS.withBase(PARAMS.withConfigure()),
|
|
116
97
|
platforms: Object.values(constants_1.Platforms),
|
|
117
98
|
};
|
|
118
99
|
exports.customRnvBuildTask = customRnvBuildTask;
|
|
@@ -19,7 +19,6 @@ const configureFn = async (c, parentTask, originTask) => {
|
|
|
19
19
|
case constants_1.Platforms.KREATV:
|
|
20
20
|
case constants_1.Platforms.SAPHI:
|
|
21
21
|
case constants_1.Platforms.VIDAA:
|
|
22
|
-
case constants_1.Platforms.SMARTCAST:
|
|
23
22
|
case constants_1.Platforms.WEBTV:
|
|
24
23
|
case constants_1.Platforms.XBOX:
|
|
25
24
|
await sdks_1.SDKWebpack.configureWebProject(c);
|
|
@@ -31,7 +30,6 @@ const configureFn = async (c, parentTask, originTask) => {
|
|
|
31
30
|
await sdks_1.SDKWebos.configureWebOSProject(c);
|
|
32
31
|
break;
|
|
33
32
|
case constants_1.Platforms.ANDROIDTV:
|
|
34
|
-
case constants_1.Platforms.FIRETV:
|
|
35
33
|
await sdks_1.SDKAndroidtv.configureAndroidTVProject(c);
|
|
36
34
|
break;
|
|
37
35
|
default:
|
|
@@ -5,12 +5,6 @@ const rnv_1 = require("rnv");
|
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const deployS3_1 = require("./deploy/aswS3/deployS3");
|
|
7
7
|
const deployHbbtv_1 = require("./deploy/hbbtv/deployHbbtv");
|
|
8
|
-
const PARAM_KEYS = {
|
|
9
|
-
schemeFolder: {
|
|
10
|
-
key: 'schemeFolder',
|
|
11
|
-
description: 'Flag to use scheme folder in path of build',
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
8
|
const { logErrorPlatform } = rnv_1.PlatformManager;
|
|
15
9
|
const { logTask } = rnv_1.Logger;
|
|
16
10
|
const { TASK_EXPORT, TASK_DEPLOY, PARAMS } = rnv_1.Constants;
|
|
@@ -18,9 +12,6 @@ const { executeOrSkipTask } = rnv_1.TaskManager;
|
|
|
18
12
|
const deployFn = async (c, parentTask, originTask) => {
|
|
19
13
|
logTask('taskRnvDeploy', `parent:${parentTask}`);
|
|
20
14
|
await executeOrSkipTask(c, TASK_EXPORT, TASK_DEPLOY, originTask);
|
|
21
|
-
if (c.program.rawArgs?.includes(`--${PARAM_KEYS.schemeFolder.key}`)) {
|
|
22
|
-
c.program[PARAM_KEYS.schemeFolder.key] = true;
|
|
23
|
-
}
|
|
24
15
|
switch (c.platform) {
|
|
25
16
|
case constants_1.Platforms.HBBTV:
|
|
26
17
|
await (0, deployHbbtv_1.deployHbbTV)(c);
|
|
@@ -28,10 +19,8 @@ const deployFn = async (c, parentTask, originTask) => {
|
|
|
28
19
|
break;
|
|
29
20
|
case constants_1.Platforms.ANDROIDTV:
|
|
30
21
|
case constants_1.Platforms.ENTONE:
|
|
31
|
-
case constants_1.Platforms.FIRETV:
|
|
32
22
|
case constants_1.Platforms.KREATV:
|
|
33
23
|
case constants_1.Platforms.SAPHI:
|
|
34
|
-
case constants_1.Platforms.SMARTCAST:
|
|
35
24
|
case constants_1.Platforms.TIZEN:
|
|
36
25
|
case constants_1.Platforms.VIDAA:
|
|
37
26
|
case constants_1.Platforms.WEBOS:
|
|
@@ -47,7 +36,7 @@ const customRnvDeployTask = {
|
|
|
47
36
|
description: 'Deploy the binary via selected deployment integration or build hook',
|
|
48
37
|
fn: deployFn,
|
|
49
38
|
task: 'deploy',
|
|
50
|
-
params: PARAMS.withBase(PARAMS.withConfigure(
|
|
39
|
+
params: PARAMS.withBase(PARAMS.withConfigure()),
|
|
51
40
|
platforms: Object.values(constants_1.Platforms),
|
|
52
41
|
};
|
|
53
42
|
exports.customRnvDeployTask = customRnvDeployTask;
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.customRnvPlatformConfigureTask = void 0;
|
|
27
|
-
const path = __importStar(require("path"));
|
|
28
4
|
const rnv_1 = require("rnv");
|
|
29
5
|
const schemeParser_1 = require("rnv/dist/core/configManager/schemeParser");
|
|
30
6
|
const packageParser_1 = require("rnv/dist/core/configManager/packageParser");
|
|
@@ -38,8 +14,7 @@ const taskRnvPlatformConfigure = async (c, parentTask, originTask) => {
|
|
|
38
14
|
await rnv_1.TaskManager.executeTask(c, TASK_PROJECT_CONFIGURE, TASK_PLATFORM_CONFIGURE, originTask);
|
|
39
15
|
await rnv_1.PlatformManager.isPlatformSupported(c);
|
|
40
16
|
await (0, schemeParser_1.isBuildSchemeSupported)(c);
|
|
41
|
-
if (platform === constants_1.Platforms.ANDROIDTV
|
|
42
|
-
platform === constants_1.Platforms.FIRETV) {
|
|
17
|
+
if (platform === constants_1.Platforms.ANDROIDTV) {
|
|
43
18
|
await (0, sdks_1.handlePlatformSdk)(c);
|
|
44
19
|
}
|
|
45
20
|
else {
|
|
@@ -59,13 +34,6 @@ const taskRnvPlatformConfigure = async (c, parentTask, originTask) => {
|
|
|
59
34
|
await rnv_1.PlatformManager.cleanPlatformBuild(c, c.platform);
|
|
60
35
|
}
|
|
61
36
|
await rnv_1.PlatformManager.copySharedPlatforms(c);
|
|
62
|
-
if (platform === constants_1.Platforms.FIRETV) {
|
|
63
|
-
rnv_1.Logger.logInfo('We re-use AndroidTV template for FireTV platform!');
|
|
64
|
-
const templatesDir = c.paths.project.platformTemplatesDirs[platform];
|
|
65
|
-
const androidTvTemplateDir = path.join(templatesDir, constants_1.Platforms.ANDROIDTV);
|
|
66
|
-
const fireTvTemplateDir = path.join(templatesDir, constants_1.Platforms.FIRETV);
|
|
67
|
-
rnv_1.FileUtils.copyFolderContentsRecursiveSync(androidTvTemplateDir, fireTvTemplateDir);
|
|
68
|
-
}
|
|
69
37
|
await rnv_1.PlatformManager.createPlatformBuild(c, c.platform);
|
|
70
38
|
await (0, packageParser_1.injectPlatformDependencies)(c);
|
|
71
39
|
};
|
|
@@ -19,13 +19,11 @@ const startFn = async (c, parentTask, originTask) => {
|
|
|
19
19
|
switch (platform) {
|
|
20
20
|
case constants_1.Platforms.ANDROIDTV:
|
|
21
21
|
case constants_1.Platforms.ENTONE:
|
|
22
|
-
case constants_1.Platforms.FIRETV:
|
|
23
22
|
case constants_1.Platforms.HBBTV:
|
|
24
23
|
case constants_1.Platforms.KREATV:
|
|
25
24
|
case constants_1.Platforms.SAPHI:
|
|
26
25
|
case constants_1.Platforms.TIZEN:
|
|
27
26
|
case constants_1.Platforms.VIDAA:
|
|
28
|
-
case constants_1.Platforms.SMARTCAST:
|
|
29
27
|
case constants_1.Platforms.WEBOS:
|
|
30
28
|
case constants_1.Platforms.WEBTV:
|
|
31
29
|
case constants_1.Platforms.XBOX:
|
|
@@ -1,46 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forEachSupportedPlatformFlavour = exports.
|
|
3
|
+
exports.forEachSupportedPlatformFlavour = exports.getProgressMessage = void 0;
|
|
4
4
|
const resolvers_1 = require("../resolvers");
|
|
5
|
-
const getProgressMessage = (
|
|
6
|
-
|
|
7
|
-
let string = `\nProcessing`;
|
|
8
|
-
if (printScheme) {
|
|
9
|
-
string += ` "${schemes[schemeIndex]}" scheme"`;
|
|
10
|
-
string += ` (${schemeIndex + 1}/${schemes.length}),`;
|
|
11
|
-
}
|
|
12
|
-
string += ` "${platforms[platformIndex]}" platform`;
|
|
5
|
+
const getProgressMessage = (platforms, platformIndex, flavours, flavourIndex) => {
|
|
6
|
+
let string = `\nProcessing "${platforms[platformIndex]}" platform`;
|
|
13
7
|
string += ` (${platformIndex + 1}/${platforms.length})`;
|
|
14
8
|
string += ` and its "${flavours[flavourIndex]}" flavour`;
|
|
15
9
|
string += ` (${flavourIndex + 1}/${flavours.length})...`;
|
|
16
10
|
return string;
|
|
17
11
|
};
|
|
18
12
|
exports.getProgressMessage = getProgressMessage;
|
|
19
|
-
const
|
|
20
|
-
const { ignoredPlatforms = [], schemes = [], schemeIndex = 0, } = options;
|
|
13
|
+
const forEachSupportedPlatformFlavour = (c, cb, ignoredPlatforms = []) => {
|
|
21
14
|
const processPlatformFlavours = (platform, platformIndex, platforms) => {
|
|
22
15
|
if (ignoredPlatforms.includes(platform)) {
|
|
23
16
|
console.log(`\nSkipping "${platforms[platformIndex]}" platform (${platformIndex + 1}/${platforms.length}).`);
|
|
24
17
|
return;
|
|
25
18
|
}
|
|
26
19
|
const processFlavour = (flavour, flavourIndex, flavours) => {
|
|
27
|
-
console.log(getProgressMessage(
|
|
28
|
-
schemes, schemeIndex, platforms, platformIndex, flavours, flavourIndex,
|
|
29
|
-
}));
|
|
20
|
+
console.log(getProgressMessage(platforms, platformIndex, flavours, flavourIndex));
|
|
30
21
|
const { scheme } = c.runtime;
|
|
31
22
|
return cb({ platform, flavour, scheme });
|
|
32
23
|
};
|
|
33
|
-
const supportedFlavours =
|
|
24
|
+
const { supportedFlavours = [] } = c.buildConfig.platforms[platform]?.deploy || {};
|
|
34
25
|
supportedFlavours.forEach(processFlavour);
|
|
35
26
|
};
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
const forEachSupportedPlatformFlavour = (c, cb, options = {}) => {
|
|
39
|
-
const supportedPlatforms = (0, resolvers_1.resolveSupportedPlatforms)(c);
|
|
40
|
-
_forEachPlatformFlavour(supportedPlatforms, c, cb, options);
|
|
27
|
+
(0, resolvers_1.resolveSupportedPlatforms)(c).forEach(processPlatformFlavours);
|
|
41
28
|
};
|
|
42
29
|
exports.forEachSupportedPlatformFlavour = forEachSupportedPlatformFlavour;
|
|
43
|
-
const forEachPlatformFlavour = (platforms, c, cb) => {
|
|
44
|
-
_forEachPlatformFlavour(platforms, c, cb);
|
|
45
|
-
};
|
|
46
|
-
exports.forEachPlatformFlavour = forEachPlatformFlavour;
|
|
@@ -24,18 +24,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.zipBuildsByPlatforms = void 0;
|
|
27
|
-
const child_process_1 = require("child_process");
|
|
28
27
|
const fs_1 = require("fs");
|
|
29
|
-
const
|
|
28
|
+
const path_1 = require("path");
|
|
29
|
+
const child_process_1 = require("child_process");
|
|
30
30
|
const glob = __importStar(require("glob"));
|
|
31
31
|
const resolvers_1 = require("../resolvers");
|
|
32
|
-
const getSafeSchemeString_1 = require("../utils/getSafeSchemeString");
|
|
33
32
|
const zipDir = (srcDir, outputFile) => (0, child_process_1.execSync)(`zip ${outputFile} -0 -j ${srcDir}/*`);
|
|
34
33
|
const getPlatformBuildsPaths = (c, platformName) => {
|
|
35
34
|
const { platformBuildsDir } = c.buildConfig.paths;
|
|
36
|
-
const
|
|
37
|
-
const schemesBuildsPath = path.join(platformBuildsDir, schemeDirName);
|
|
38
|
-
const outputGlob = `${schemesBuildsPath}/**/output`;
|
|
35
|
+
const outputGlob = `${platformBuildsDir}/**/output`;
|
|
39
36
|
const platformBuildsGlob = `${outputGlob}/*.${(0, resolvers_1.resolveBuildFileExtension)(platformName)}`;
|
|
40
37
|
try {
|
|
41
38
|
const buildsPathsCandidates = glob.sync(platformBuildsGlob) || [];
|
|
@@ -50,10 +47,10 @@ const processPlatform = (c, platformName) => {
|
|
|
50
47
|
if (platformBuildsPaths && platformBuildsPaths.length === 0)
|
|
51
48
|
return;
|
|
52
49
|
const outputZipFilePath = (0, resolvers_1.resolveZippedPlatformBuildsRelativeFilePath)(c, platformName);
|
|
53
|
-
const tempPlatformDir = `${
|
|
50
|
+
const tempPlatformDir = `${(0, path_1.dirname)(outputZipFilePath)}/${platformName}`;
|
|
54
51
|
(0, fs_1.mkdirSync)(tempPlatformDir, { recursive: true });
|
|
55
52
|
const copyBuildFileIntoTempPlatformDir = (buildFilePath) => {
|
|
56
|
-
const buildFileName =
|
|
53
|
+
const buildFileName = (0, path_1.basename)(buildFilePath);
|
|
57
54
|
const dest = `${tempPlatformDir}/${buildFileName}`;
|
|
58
55
|
(0, fs_1.copyFileSync)(buildFilePath, dest);
|
|
59
56
|
};
|
|
@@ -125,13 +125,13 @@ function generateConfig(config) {
|
|
|
125
125
|
scheme: config.scheme,
|
|
126
126
|
flavour: config.appConfigId,
|
|
127
127
|
};
|
|
128
|
-
const { PLATFORM, HOSTED_URL } = process.env;
|
|
129
128
|
const { buildConfig } = smartapps_bigscreen_rnv_build_engine_1.Resolvers.getBaseConfig();
|
|
130
129
|
const buildVersion = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBuildVersion(platformSchemeAppIdObj);
|
|
131
|
-
const baseUrl =
|
|
130
|
+
const baseUrl = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBaseUrl(platformSchemeAppIdObj);
|
|
132
131
|
const packageVersions = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolvePackageVersions(projectDir);
|
|
133
132
|
const devServerHost = config.devServerHost || '0.0.0.0';
|
|
134
133
|
const isDevServer = appBuildEngineProjectDir.endsWith('/server');
|
|
134
|
+
const { PLATFORM } = process.env;
|
|
135
135
|
const isBuildHosted = config.isBuildHosted || false;
|
|
136
136
|
const appContentPath = getAppContentPath(baseUrl, isBuildHosted);
|
|
137
137
|
const copiedDirWithPublicContentPath = path_1.default.join(appBuildDir, `../${path_1.default.parse(appBuildDir).name}-public`);
|
|
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
|
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
3
|
|
|
4
4
|
android {
|
|
5
|
-
compileSdkVersion
|
|
5
|
+
compileSdkVersion 31
|
|
6
6
|
|
|
7
7
|
compileOptions {
|
|
8
8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
@@ -11,7 +11,7 @@ android {
|
|
|
11
11
|
|
|
12
12
|
defaultConfig {
|
|
13
13
|
minSdkVersion 21
|
|
14
|
-
targetSdkVersion
|
|
14
|
+
targetSdkVersion 30
|
|
15
15
|
|
|
16
16
|
versionCode 1
|
|
17
17
|
versionName "1.0"
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
apply plugin: 'com.android.application'
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
3
|
apply plugin: 'kotlin-kapt'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def useTheoPlayer = theoLicense != ''
|
|
4
|
+
apply plugin: 'com.google.gms.google-services'
|
|
5
|
+
apply plugin: 'com.google.firebase.crashlytics'
|
|
7
6
|
|
|
8
7
|
android {
|
|
9
8
|
compileSdkVersion {{COMPILE_SDK_VERSION}}
|
|
@@ -33,10 +32,6 @@ android {
|
|
|
33
32
|
|
|
34
33
|
// necessary for Fire OS - installation of debug build fails otherwise
|
|
35
34
|
multiDexEnabled true
|
|
36
|
-
|
|
37
|
-
buildConfigField "String", "APP_URL", '"{{APP_URL}}"'
|
|
38
|
-
buildConfigField "String", "THEO_LICENSE", "\"$theoLicense\""
|
|
39
|
-
buildConfigField "Boolean", "startWithHighVideoQuality", "true"
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
signingConfigs {
|
|
@@ -45,6 +40,8 @@ android {
|
|
|
45
40
|
keyPassword '{{KEY_PASSWORD}}'
|
|
46
41
|
storeFile file('{{STORE_FILE}}')
|
|
47
42
|
storePassword '{{STORE_PASSWORD}}'
|
|
43
|
+
v1SigningEnabled true
|
|
44
|
+
v2SigningEnabled true
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
|
|
@@ -60,8 +57,7 @@ android {
|
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
buildFeatures {
|
|
63
|
-
|
|
64
|
-
viewBinding true
|
|
60
|
+
dataBinding true
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
flavorDimensions "bridge"
|
|
@@ -78,6 +74,16 @@ android {
|
|
|
78
74
|
}
|
|
79
75
|
}
|
|
80
76
|
|
|
77
|
+
//Enable GoogleServices and Crashlytics for specified variant
|
|
78
|
+
android.applicationVariants.all { variant ->
|
|
79
|
+
project.tasks.getByName('process' + variant.name.capitalize() + 'GoogleServices').enabled = false
|
|
80
|
+
tasks.whenTaskAdded { task ->
|
|
81
|
+
if (task.name.toLowerCase().contains("crashlytics")) {
|
|
82
|
+
task.enabled = false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
81
87
|
dependencies {
|
|
82
88
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
83
89
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
@@ -87,6 +93,9 @@ dependencies {
|
|
|
87
93
|
compileOnly "javax.annotation:jsr250-api:1.0"
|
|
88
94
|
implementation "androidx.appcompat:appcompat:1.4.2"
|
|
89
95
|
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
|
96
|
+
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
|
97
|
+
implementation 'com.google.firebase:firebase-crashlytics:18.2.11'
|
|
98
|
+
implementation 'com.google.firebase:firebase-analytics:21.0.0'
|
|
90
99
|
|
|
91
100
|
implementation "com.google.dagger:dagger:2.42"
|
|
92
101
|
kapt "com.google.dagger:dagger-compiler:2.42"
|
|
@@ -95,14 +104,9 @@ dependencies {
|
|
|
95
104
|
implementation "com.squareup.retrofit2:converter-gson:2.5.0"
|
|
96
105
|
implementation "com.squareup.okhttp3:logging-interceptor:4.9.2"
|
|
97
106
|
implementation "com.squareup.okhttp3:okhttp:4.9.2"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
} else {
|
|
102
|
-
implementation "com.twentyfouri.player:exoplayer:0.6.0-alpha.36"
|
|
103
|
-
compileOnly "com.twentyfouri.player:theoplayer:0.6.0-alpha.36"
|
|
104
|
-
}
|
|
107
|
+
implementation "com.twentyfouri.player:exoplayer:0.6.0-alpha.23"
|
|
108
|
+
implementation 'com.google.android.exoplayer:extension-okhttp:2.17.1'
|
|
109
|
+
implementation "com.jumptvs.jumpkit:jumpkit-exoplayer:2.6.5"
|
|
105
110
|
|
|
106
111
|
implementation project(':common')
|
|
107
112
|
}
|
|
108
|
-
|
|
@@ -29,19 +29,4 @@
|
|
|
29
29
|
-keep class com.amazon.** {*;}
|
|
30
30
|
-keepattributes *Annotation*
|
|
31
31
|
|
|
32
|
-
-keep class com.theoplayer.android.** {*;}
|
|
33
|
-
-dontwarn com.theoplayer.android.**
|
|
34
|
-
-keep public class com.google.android.gms.* { public *; }
|
|
35
|
-
-dontwarn com.google.android.gms.**
|
|
36
|
-
|
|
37
|
-
# In case of using yospace integration
|
|
38
|
-
-keep class com.yospace.util.** {*;}
|
|
39
|
-
-dontwarn com.yospace.util.**
|
|
40
|
-
|
|
41
|
-
# For native Google IMA integration
|
|
42
|
-
-keep class com.google.obf.** { *; }
|
|
43
|
-
-keep interface com.google.obf.** { *; }
|
|
44
|
-
-keep class com.google.ads.interactivemedia.** { *; }
|
|
45
|
-
-keep interface com.google.ads.interactivemedia.** { *; }
|
|
46
|
-
|
|
47
32
|
-optimizationpasses 1
|