From 4bd1395d1a2f2646939a29368c5b204b209c9b00 Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Fri, 10 Jan 2020 11:01:09 +0200 Subject: [PATCH 1/3] feat: expose before build hooks in order to support cloud builds without an extension --- lib/services/android-project-service.ts | 2 ++ lib/services/ios-project-service.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index e33ee726be..f7434c28cb 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -5,6 +5,7 @@ import * as semver from "semver"; import * as projectServiceBaseLib from "./platform-project-service-base"; import { DeviceAndroidDebugBridge } from "../common/mobile/android/device-android-debug-bridge"; import { Configurations, LiveSyncPaths } from "../common/constants"; +import { hook } from "../common/helpers"; import { performanceLog } from ".././common/decorators"; export class AndroidProjectService extends projectServiceBaseLib.PlatformProjectServiceBase { @@ -242,6 +243,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject } @performanceLog() + @hook('buildAndroid') public async buildProject(projectRoot: string, projectData: IProjectData, buildData: IAndroidBuildData): Promise { const platformData = this.getPlatformData(projectData); await this.$gradleBuildService.buildProject(platformData.projectRoot, buildData); diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index 6a0854c2fb..6046f970bb 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -14,6 +14,7 @@ import { IOSEntitlementsService } from "./ios-entitlements-service"; import { IOSBuildData } from "../data/build-data"; import { IOSPrepareData } from "../data/prepare-data"; import { BUILD_XCCONFIG_FILE_NAME, IosProjectConstants } from "../constants"; +import { hook } from "../common/helpers"; interface INativeSourceCodeGroup { name: string; @@ -193,6 +194,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ path.join(projectRoot, projectData.projectName)); } + @hook('buildIOS') public async buildProject(projectRoot: string, projectData: IProjectData, iOSBuildData: IOSBuildData): Promise { const platformData = this.getPlatformData(projectData); From ca8b03dc37232317658b792456da583cceff0c0d Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Fri, 10 Jan 2020 11:04:47 +0200 Subject: [PATCH 2/3] chore: bump version --- npm-shrinkwrap.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 349795898d..eb1117574b 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "nativescript", - "version": "6.3.2", + "version": "6.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8389,4 +8389,4 @@ "integrity": "sha512-99p+ohUBZ2Es0AXrw/tpazMcJ0/acpdQXr0UPrVWF0p7i8XiOYvjiXTdwXUVCTPopBGCSDtWBzOoYNPtF3z/8w==" } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index d4c91177bb..612a03d301 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nativescript", "preferGlobal": true, - "version": "6.3.2", + "version": "6.3.3", "author": "Telerik ", "description": "Command-line interface for building NativeScript projects", "bin": { @@ -141,4 +141,4 @@ "engines": { "node": ">=10.0.0 <14.0.0" } -} +} \ No newline at end of file From 98ee34fd29a6754bd98d669561af165b177ff3a0 Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Fri, 10 Jan 2020 11:16:28 +0200 Subject: [PATCH 3/3] test: fix unit tests after a new android project service dependency --- test/services/android-project-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/services/android-project-service.ts b/test/services/android-project-service.ts index b541c182a4..13cddd66ce 100644 --- a/test/services/android-project-service.ts +++ b/test/services/android-project-service.ts @@ -11,6 +11,7 @@ import { GradleBuildArgsService } from "../../lib/services/android/gradle-build- const createTestInjector = (): IInjector => { const testInjector = new Yok(); testInjector.register("androidProjectService", AndroidProjectService); + testInjector.register("hooksService", stubs.HooksServiceStub); testInjector.register("childProcess", stubs.ChildProcessStub); testInjector.register("hostInfo", {}); testInjector.register("projectDataService", stubs.ProjectDataService);