1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-11-02 07:43:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix gradle check

This commit is contained in:
sunnylqm
2024-10-19 11:39:13 +08:00
parent 04f75cd51b
commit d5f468aa44
3 changed files with 15 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update-cli",
"version": "1.30.4",
"version": "1.31.0",
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
"main": "index.js",
"bin": {

View File

@@ -177,7 +177,9 @@ async function checkGradleConfig() {
let crunchPngs;
try {
const gradleConfig = await g2js.parseFile('android/app/build.gradle');
crunchPngs = gradleConfig.android.buildTypes.release.crunchPngs;
const projectConfig = gradleConfig['project.ext.react'];
if (projectConfig) {
for (const packagerConfig of projectConfig) {
if (
packagerConfig.includes('enableHermes') &&
@@ -187,7 +189,7 @@ async function checkGradleConfig() {
break;
}
}
crunchPngs = gradleConfig.android.buildTypes.release.crunchPngs;
}
} catch (e) {}
return {
enableHermes,
@@ -609,7 +611,6 @@ export const commands = {
const { version, major, minor } = getRNVersion();
console.log('Bundling with react-native: ', version);
printVersionCommand();
await runReactNativeBundleCommand(
bundleName,

View File

@@ -134,7 +134,9 @@ export const commands = {
let minPkgVersion = options.minPackageVersion;
let maxPkgVersion = options.maxPackageVersion;
let rollout = options.rollout;
if (rollout !== undefined) {
if (rollout === undefined) {
rollout = null;
} else {
try {
rollout = parseInt(rollout);
} catch (e) {