Skip to content

Commit bb5736f

Browse files
Merge pull request #3438 from NativeScript/fatme/fix-cloud-builds
Fix cloud builds
2 parents 071d1e2 + 8c1a99b commit bb5736f

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

lib/services/android-project-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
157157

158158
this.$androidToolsInfo.validateAndroidHomeEnvVariable({ showWarningsAsErrors: true });
159159

160-
const javaCompilerVersion = (await this.$sysInfo.getSysInfo()).javacVersion;
160+
const javaCompilerVersion = await this.$sysInfo.getJavaCompilerVersion();
161161

162162
this.$androidToolsInfo.validateJavacVersion(javaCompilerVersion, { showWarningsAsErrors: true });
163163

lib/services/ios-project-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
372372
const installedPlugins = await (<IPluginsService>this.$injector.resolve("pluginsService")).getAllInstalledPlugins(projectData);
373373
for (const pluginData of installedPlugins) {
374374
const pluginsFolderExists = this.$fs.exists(path.join(pluginData.pluginPlatformsFolderPath(this.$devicePlatformsConstants.iOS.toLowerCase()), "Podfile"));
375-
const cocoaPodVersion = (await this.$sysInfo.getSysInfo()).cocoaPodsVer;
375+
const cocoaPodVersion = await this.$sysInfo.getCocoaPodsVersion();
376376
if (pluginsFolderExists && !cocoaPodVersion) {
377377
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.`);
378378
}

lib/services/xcproj-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class XcprojService implements IXcprojService {
3030

3131
public async getXcprojInfo(): Promise<IXcprojInfo> {
3232
if (!this.xcprojInfoCache) {
33-
let cocoapodVer = (await this.$sysInfo.getSysInfo()).cocoaPodsVer;
33+
let cocoapodVer = await this.$sysInfo.getCocoaPodsVersion();
3434
const xcodeVersion = await this.$xcodeSelectService.getXcodeVersion();
3535

3636
if (cocoapodVer && !semver.valid(cocoapodVer)) {

lib/sys-info.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,17 @@ export class SysInfo implements ISysInfo {
1414

1515
return this.sysInfo;
1616
}
17+
18+
public getXcodeVersion(): Promise<string> {
19+
return sysInfo.getXcodeVersion();
20+
}
21+
22+
public getCocoaPodsVersion(): Promise<string> {
23+
return sysInfo.getCocoaPodsVersion();
24+
}
25+
26+
public getJavaCompilerVersion(): Promise<string> {
27+
return sysInfo.getJavaCompilerVersion();
28+
}
1729
}
1830
$injector.register("sysInfo", SysInfo);

0 commit comments

Comments
 (0)