diff --git a/lib/common b/lib/common index a8b2bc8981..28b500f7c4 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit a8b2bc8981f37bbe36a7a08507b0cd980913c091 +Subproject commit 28b500f7c4302b9825a2d8bcf6dfde015149cb0c diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index 0b7c230ef1..442c40cfd7 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -157,7 +157,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject this.$androidToolsInfo.validateAndroidHomeEnvVariable({ showWarningsAsErrors: true }); - const javaCompilerVersion = (await this.$sysInfo.getSysInfo()).javacVersion; + const javaCompilerVersion = await this.$sysInfo.getJavaCompilerVersion(); this.$androidToolsInfo.validateJavacVersion(javaCompilerVersion, { showWarningsAsErrors: true }); diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index ab12660aab..bc579b7143 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -372,7 +372,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ const installedPlugins = await (this.$injector.resolve("pluginsService")).getAllInstalledPlugins(projectData); for (const pluginData of installedPlugins) { const pluginsFolderExists = this.$fs.exists(path.join(pluginData.pluginPlatformsFolderPath(this.$devicePlatformsConstants.iOS.toLowerCase()), "Podfile")); - const cocoaPodVersion = (await this.$sysInfo.getSysInfo()).cocoaPodsVer; + const cocoaPodVersion = await this.$sysInfo.getCocoaPodsVersion(); if (pluginsFolderExists && !cocoaPodVersion) { this.$errors.failWithoutHelp(`${pluginData.name} has Podfile and you don't have Cocoapods installed or it is not configured correctly. Please verify Cocoapods can work on your machine.`); } diff --git a/lib/services/xcproj-service.ts b/lib/services/xcproj-service.ts index 3fa1cf28a6..395db55707 100644 --- a/lib/services/xcproj-service.ts +++ b/lib/services/xcproj-service.ts @@ -30,7 +30,7 @@ class XcprojService implements IXcprojService { public async getXcprojInfo(): Promise { if (!this.xcprojInfoCache) { - let cocoapodVer = (await this.$sysInfo.getSysInfo()).cocoaPodsVer; + let cocoapodVer = await this.$sysInfo.getCocoaPodsVersion(); const xcodeVersion = await this.$xcodeSelectService.getXcodeVersion(); if (cocoapodVer && !semver.valid(cocoapodVer)) { diff --git a/lib/sys-info.ts b/lib/sys-info.ts index bf42352a4c..3db406aebf 100644 --- a/lib/sys-info.ts +++ b/lib/sys-info.ts @@ -14,5 +14,17 @@ export class SysInfo implements ISysInfo { return this.sysInfo; } + + public getXcodeVersion(): Promise { + return sysInfo.getXcodeVersion(); + } + + public getCocoaPodsVersion(): Promise { + return sysInfo.getCocoaPodsVersion(); + } + + public getJavaCompilerVersion(): Promise { + return sysInfo.getJavaCompilerVersion(); + } } $injector.register("sysInfo", SysInfo);