diff --git a/.gitignore b/.gitignore index d4301c928..d9476c44e 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ apps/**/*/platforms apps/**/*/webpack.*.js *.tgz .npmrc +**/**/*.log # System Files .DS_Store diff --git a/apps/automated/project.json b/apps/automated/project.json index 057ff4fd3..d61bc888b 100644 --- a/apps/automated/project.json +++ b/apps/automated/project.json @@ -4,6 +4,10 @@ "sourceRoot": "apps/automated/app", "projectType": "application", "prefix": "nativescript", + "namedInputs": { + "default": ["{projectRoot}/**/*"], + "production": ["!{projectRoot}/**/*.spec.ts"] + }, "targets": { "build": { "executor": "@nativescript/nx:build", @@ -17,6 +21,8 @@ }, "ios": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "noHmr": true, "platform": "ios" @@ -24,6 +30,8 @@ }, "android": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "noHmr": true, "platform": "android" diff --git a/apps/toolbox/project.json b/apps/toolbox/project.json index 2bd2ce7a6..8cf19b412 100644 --- a/apps/toolbox/project.json +++ b/apps/toolbox/project.json @@ -4,6 +4,10 @@ "sourceRoot": "apps/toolbox/src", "projectType": "application", "prefix": "nativescript", + "namedInputs": { + "default": ["{projectRoot}/**/*"], + "production": ["!{projectRoot}/**/*.spec.ts"] + }, "targets": { "build": { "executor": "@nativescript/nx:build", @@ -17,6 +21,8 @@ }, "ios": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "platform": "ios", "noHmr": true @@ -24,6 +30,8 @@ }, "android": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "platform": "android", "noHmr": true diff --git a/apps/ui/project.json b/apps/ui/project.json index 1558e473b..7fee7621f 100644 --- a/apps/ui/project.json +++ b/apps/ui/project.json @@ -4,6 +4,10 @@ "sourceRoot": "apps/ui/src", "projectType": "application", "prefix": "nativescript", + "namedInputs": { + "default": ["{projectRoot}/**/*"], + "production": ["!{projectRoot}/**/*.spec.ts"] + }, "targets": { "build": { "executor": "@nativescript/nx:build", @@ -17,6 +21,8 @@ }, "ios": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "platform": "ios", "noHmr": true @@ -24,6 +30,8 @@ }, "android": { "executor": "@nativescript/nx:build", + "inputs": ["default", "^production"], + "outputs": [], "options": { "platform": "android", "noHmr": true diff --git a/nx.json b/nx.json index 06c3a4a86..bfcc2e8a8 100644 --- a/nx.json +++ b/nx.json @@ -6,13 +6,14 @@ }, "tasksRunnerOptions": { "default": { - "runner": "nx/tasks-runners/default", + "runner": "@nrwl/nx-cloud", "options": { "useDaemonProcess": false, - "cacheableOperations": ["build", "lint", "test", "e2e"], + "cacheableOperations": ["build", "lint", "test", "ios", "android", "e2e"], "canTrackAnalytics": false, "showUsageWarnings": true, - "parallel": 1 + "parallel": 1, + "accessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=" } } }, diff --git a/package.json b/package.json index 0381361ff..60f1d9800 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,12 @@ "url": "https://github.com/NativeScript/NativeScript.git" }, "dependencies": { + "@nrwl/nx-cloud": "^15.0.2", "nativescript-theme-core": "^1.0.4" }, "devDependencies": { "@nativescript/hook": "^2.0.0", - "@nativescript/nx": "~4.0.0", + "@nativescript/nx": "~4.1.0", "@nrwl/cli": "15.2.1", "@nrwl/eslint-plugin-nx": "15.2.1", "@nrwl/jest": "15.2.1", @@ -54,6 +55,7 @@ "module-alias": "^2.2.2", "nativescript": "~8.3.0", "nativescript-typedoc-theme": "1.1.0", + "nx": "15.2.1", "parse-css": "git+https://github.com/tabatkins/parse-css.git", "parserlib": "^1.1.1", "prettier": "^2.6.2", @@ -69,8 +71,7 @@ "tslint-to-eslint-config": "^2.13.0", "typedoc": "^0.22.17", "typescript": "4.8.4", - "zx": "^7.0.5", - "nx": "15.2.1" + "zx": "^7.0.5" }, "lint-staged": { "**/*": [ @@ -78,4 +79,3 @@ ] } } - diff --git a/packages/core/project.json b/packages/core/project.json index 5ea1e4fcd..06ab3867e 100644 --- a/packages/core/project.json +++ b/packages/core/project.json @@ -4,6 +4,10 @@ "sourceRoot": "packages/core", "projectType": "library", "generators": {}, + "namedInputs": { + "default": ["{projectRoot}/**/*"], + "production": ["!{projectRoot}/**/*.spec.ts"] + }, "targets": { "lint": { "executor": "@nrwl/linter:eslint", @@ -13,6 +17,8 @@ }, "test": { "executor": "@nrwl/jest:jest", + "inputs": ["default", "^production"], + "outputs": ["dist/out-tsc"], "options": { "jestConfig": "packages/core/jest.config.ts", "passWithNoTests": true, @@ -22,11 +28,11 @@ "ci": { "ci": true } - }, - "outputs": ["{workspaceRoot}/coverage/packages/core"] + } }, "build": { "executor": "nx:run-commands", + "inputs": ["default", "^production"], "outputs": ["{workspaceRoot}/dist/packages"], "options": { "commands": [ diff --git a/tools/scripts/run-automated.js b/tools/scripts/run-automated.js index 0448a5881..138a3e3c3 100644 --- a/tools/scripts/run-automated.js +++ b/tools/scripts/run-automated.js @@ -11,13 +11,11 @@ const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes const platform = process.argv[2]; const spawned_process = spawn( - "ns", + "npx", [ - "--path=./apps/automated", + "nx", "run", - platform, - "--no-hmr", - "--force", + `apps-automated:${platform}`, // "--log=trace", "--timeout=600" // 10 minutes, booting avds on CI is very slow... ],