From 86d67402517fd92cf505226c31c6af6fa0929b9d Mon Sep 17 00:00:00 2001 From: khalilou88 <32600911+khalilou88@users.noreply.github.com> Date: Sat, 27 May 2023 16:16:37 +0200 Subject: [PATCH] feat(executors): move all gradle executors to gradle lib (#235) --- .../build-image/boot}/executor.spec.ts | 0 .../executors/build-image/boot}/executor.ts | 2 +- .../executors/build-image/boot}/schema.d.ts | 2 +- .../executors/build-image/boot}/schema.json | 0 .../build-image/quarkus}/executor.spec.ts | 0 .../build-image/quarkus}/executor.ts | 0 .../build-image/quarkus}/schema.d.ts | 0 .../build-image/quarkus}/schema.json | 0 .../executors/build/boot}/executor.spec.ts | 0 .../src/executors/build/boot}/executor.ts | 2 +- .../src/executors/build/boot}/schema.d.ts | 0 .../src/executors/build/boot}/schema.json | 0 .../executors/build/quarkus}/executor.spec.ts | 0 .../src/executors/build/quarkus}/executor.ts | 2 +- .../src/executors/build/quarkus}/schema.d.ts | 6 +- .../src/executors/build/quarkus}/schema.json | 0 .../integration-test/executor.spec.ts | 0 .../executors/integration-test/executor.ts | 2 +- .../executors/integration-test/schema.d.ts | 6 +- .../executors/integration-test/schema.json | 0 .../src/executors/kformat/executor.spec.ts | 0 .../src/executors/kformat}/executor.ts | 2 +- .../src/executors/kformat}/schema.d.ts | 0 .../src/executors/kformat/schema.json | 0 .../src/executors/ktformat/executor.spec.ts | 0 .../src/executors/ktformat}/executor.ts | 2 +- .../src/executors/ktformat}/schema.d.ts | 2 +- .../src/executors/ktformat/schema.json | 0 .../src/executors/lint/executor.spec.ts | 0 .../src/executors/lint/executor.ts | 2 +- .../src/executors/lint/schema.d.ts | 6 +- .../src/executors/lint/schema.json | 0 .../src/executors/run-task/executor.spec.ts | 0 .../src/executors/run-task/executor.ts | 2 +- .../src/executors/run-task/schema.d.ts | 6 +- .../src/executors/run-task/schema.json | 0 .../executors/serve/boot}/executor.spec.ts | 0 .../src/executors/serve/boot}/executor.ts | 2 +- .../src/executors/serve/boot}/schema.d.ts | 6 +- .../src/executors/serve/boot}/schema.json | 0 .../executors/serve/quarkus}/executor.spec.ts | 0 .../src/executors/serve/quarkus}/executor.ts | 2 +- .../src/executors/serve/quarkus}/schema.d.ts | 6 +- .../src/executors/serve/quarkus}/schema.json | 0 .../src/executors/test/executor.spec.ts | 0 .../src/executors/test/executor.ts | 4 +- .../src/executors/test/schema.d.ts | 2 +- .../src/executors/test/schema.json | 0 packages/nx-boot-gradle/executors.json | 32 +++---- .../src/executors/lint/schema.d.ts | 3 - .../src/executors/run-task/schema.d.ts | 3 - .../src/executors/test/executor.ts | 12 --- packages/nx-quarkus-gradle/executors.json | 90 +++++++++---------- .../src/executors/ktformat/executor.spec.ts | 36 -------- .../src/executors/ktformat/executor.ts | 22 ----- .../src/executors/ktformat/schema.d.ts | 1 - .../src/executors/ktformat/schema.json | 10 --- .../src/executors/lint/executor.spec.ts | 38 -------- .../src/executors/lint/executor.ts | 35 -------- .../src/executors/lint/schema.json | 14 --- .../src/executors/run-task/executor.spec.ts | 38 -------- .../src/executors/run-task/executor.ts | 14 --- .../src/executors/run-task/schema.json | 14 --- .../src/executors/test/executor.spec.ts | 36 -------- .../src/executors/test/schema.d.ts | 1 - .../src/executors/test/schema.json | 10 --- 66 files changed, 94 insertions(+), 381 deletions(-) rename packages/{nx-boot-gradle/src/executors/build-image => gradle/src/executors/build-image/boot}/executor.spec.ts (100%) rename packages/{nx-boot-gradle/src/executors/build-image => gradle/src/executors/build-image/boot}/executor.ts (87%) rename packages/{nx-boot-gradle/src/executors/build-image => gradle/src/executors/build-image/boot}/schema.d.ts (98%) rename packages/{nx-boot-gradle/src/executors/build-image => gradle/src/executors/build-image/boot}/schema.json (100%) rename packages/{nx-quarkus-gradle/src/executors/build-image => gradle/src/executors/build-image/quarkus}/executor.spec.ts (100%) rename packages/{nx-quarkus-gradle/src/executors/build-image => gradle/src/executors/build-image/quarkus}/executor.ts (100%) rename packages/{nx-quarkus-gradle/src/executors/build-image => gradle/src/executors/build-image/quarkus}/schema.d.ts (100%) rename packages/{nx-quarkus-gradle/src/executors/build-image => gradle/src/executors/build-image/quarkus}/schema.json (100%) rename packages/{nx-boot-gradle/src/executors/build => gradle/src/executors/build/boot}/executor.spec.ts (100%) rename packages/{nx-boot-gradle/src/executors/build => gradle/src/executors/build/boot}/executor.ts (91%) rename packages/{nx-boot-gradle/src/executors/build => gradle/src/executors/build/boot}/schema.d.ts (100%) rename packages/{nx-boot-gradle/src/executors/build => gradle/src/executors/build/boot}/schema.json (100%) rename packages/{nx-quarkus-gradle/src/executors/build => gradle/src/executors/build/quarkus}/executor.spec.ts (100%) rename packages/{nx-quarkus-gradle/src/executors/build => gradle/src/executors/build/quarkus}/executor.ts (89%) rename packages/{nx-quarkus-gradle/src/executors/build => gradle/src/executors/build/quarkus}/schema.d.ts (95%) rename packages/{nx-quarkus-gradle/src/executors/build => gradle/src/executors/build/quarkus}/schema.json (100%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/integration-test/executor.spec.ts (100%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/integration-test/executor.ts (88%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/integration-test/schema.d.ts (95%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/integration-test/schema.json (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/kformat/executor.spec.ts (100%) rename packages/{nx-boot-gradle/src/executors/ktformat => gradle/src/executors/kformat}/executor.ts (93%) rename packages/{nx-boot-gradle/src/executors/ktformat => gradle/src/executors/kformat}/schema.d.ts (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/kformat/schema.json (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/ktformat/executor.spec.ts (100%) rename packages/{nx-boot-gradle/src/executors/kformat => gradle/src/executors/ktformat}/executor.ts (93%) rename packages/{nx-boot-gradle/src/executors/kformat => gradle/src/executors/ktformat}/schema.d.ts (98%) rename packages/{nx-boot-gradle => gradle}/src/executors/ktformat/schema.json (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/lint/executor.spec.ts (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/lint/executor.ts (93%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/lint/schema.d.ts (95%) rename packages/{nx-boot-gradle => gradle}/src/executors/lint/schema.json (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/run-task/executor.spec.ts (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/run-task/executor.ts (86%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/run-task/schema.d.ts (95%) rename packages/{nx-boot-gradle => gradle}/src/executors/run-task/schema.json (100%) rename packages/{nx-boot-gradle/src/executors/serve => gradle/src/executors/serve/boot}/executor.spec.ts (100%) rename packages/{nx-boot-gradle/src/executors/serve => gradle/src/executors/serve/boot}/executor.ts (90%) rename packages/{nx-boot-gradle/src/executors/serve => gradle/src/executors/serve/boot}/schema.d.ts (95%) rename packages/{nx-boot-gradle/src/executors/serve => gradle/src/executors/serve/boot}/schema.json (100%) rename packages/{nx-quarkus-gradle/src/executors/serve => gradle/src/executors/serve/quarkus}/executor.spec.ts (100%) rename packages/{nx-quarkus-gradle/src/executors/serve => gradle/src/executors/serve/quarkus}/executor.ts (90%) rename packages/{nx-quarkus-gradle/src/executors/serve => gradle/src/executors/serve/quarkus}/schema.d.ts (95%) rename packages/{nx-quarkus-gradle/src/executors/serve => gradle/src/executors/serve/quarkus}/schema.json (100%) rename packages/{nx-boot-gradle => gradle}/src/executors/test/executor.spec.ts (100%) rename packages/{nx-quarkus-gradle => gradle}/src/executors/test/executor.ts (84%) rename packages/{nx-boot-gradle => gradle}/src/executors/test/schema.d.ts (98%) rename packages/{nx-boot-gradle => gradle}/src/executors/test/schema.json (100%) delete mode 100644 packages/nx-boot-gradle/src/executors/lint/schema.d.ts delete mode 100644 packages/nx-boot-gradle/src/executors/run-task/schema.d.ts delete mode 100644 packages/nx-boot-gradle/src/executors/test/executor.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/ktformat/executor.spec.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/ktformat/executor.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/ktformat/schema.d.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/ktformat/schema.json delete mode 100644 packages/nx-quarkus-gradle/src/executors/lint/executor.spec.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/lint/executor.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/lint/schema.json delete mode 100644 packages/nx-quarkus-gradle/src/executors/run-task/executor.spec.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/run-task/executor.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/run-task/schema.json delete mode 100644 packages/nx-quarkus-gradle/src/executors/test/executor.spec.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/test/schema.d.ts delete mode 100644 packages/nx-quarkus-gradle/src/executors/test/schema.json diff --git a/packages/nx-boot-gradle/src/executors/build-image/executor.spec.ts b/packages/gradle/src/executors/build-image/boot/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/build-image/executor.spec.ts rename to packages/gradle/src/executors/build-image/boot/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/build-image/executor.ts b/packages/gradle/src/executors/build-image/boot/executor.ts similarity index 87% rename from packages/nx-boot-gradle/src/executors/build-image/executor.ts rename to packages/gradle/src/executors/build-image/boot/executor.ts index a8ed2653d..3aa330dbb 100644 --- a/packages/nx-boot-gradle/src/executors/build-image/executor.ts +++ b/packages/gradle/src/executors/build-image/boot/executor.ts @@ -1,5 +1,5 @@ import { ExecutorContext, logger } from '@nx/devkit'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; import { runCommand } from '@jnxplus/common'; import { BuildImageExecutorSchema } from './schema'; diff --git a/packages/nx-boot-gradle/src/executors/build-image/schema.d.ts b/packages/gradle/src/executors/build-image/boot/schema.d.ts similarity index 98% rename from packages/nx-boot-gradle/src/executors/build-image/schema.d.ts rename to packages/gradle/src/executors/build-image/boot/schema.d.ts index dfb1f7743..4c33edd21 100644 --- a/packages/nx-boot-gradle/src/executors/build-image/schema.d.ts +++ b/packages/gradle/src/executors/build-image/boot/schema.d.ts @@ -1 +1 @@ -export interface BuildImageExecutorSchema {} // eslint-disable-line +export interface BuildImageExecutorSchema {} // eslint-disable-line diff --git a/packages/nx-boot-gradle/src/executors/build-image/schema.json b/packages/gradle/src/executors/build-image/boot/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/build-image/schema.json rename to packages/gradle/src/executors/build-image/boot/schema.json diff --git a/packages/nx-quarkus-gradle/src/executors/build-image/executor.spec.ts b/packages/gradle/src/executors/build-image/quarkus/executor.spec.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build-image/executor.spec.ts rename to packages/gradle/src/executors/build-image/quarkus/executor.spec.ts diff --git a/packages/nx-quarkus-gradle/src/executors/build-image/executor.ts b/packages/gradle/src/executors/build-image/quarkus/executor.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build-image/executor.ts rename to packages/gradle/src/executors/build-image/quarkus/executor.ts diff --git a/packages/nx-quarkus-gradle/src/executors/build-image/schema.d.ts b/packages/gradle/src/executors/build-image/quarkus/schema.d.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build-image/schema.d.ts rename to packages/gradle/src/executors/build-image/quarkus/schema.d.ts diff --git a/packages/nx-quarkus-gradle/src/executors/build-image/schema.json b/packages/gradle/src/executors/build-image/quarkus/schema.json similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build-image/schema.json rename to packages/gradle/src/executors/build-image/quarkus/schema.json diff --git a/packages/nx-boot-gradle/src/executors/build/executor.spec.ts b/packages/gradle/src/executors/build/boot/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/build/executor.spec.ts rename to packages/gradle/src/executors/build/boot/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/build/executor.ts b/packages/gradle/src/executors/build/boot/executor.ts similarity index 91% rename from packages/nx-boot-gradle/src/executors/build/executor.ts rename to packages/gradle/src/executors/build/boot/executor.ts index e8d516803..94d6000a0 100644 --- a/packages/nx-boot-gradle/src/executors/build/executor.ts +++ b/packages/gradle/src/executors/build/boot/executor.ts @@ -1,5 +1,5 @@ import { getProjectType, runCommand } from '@jnxplus/common'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; import { ExecutorContext, logger } from '@nx/devkit'; import { BuildExecutorSchema } from './schema'; diff --git a/packages/nx-boot-gradle/src/executors/build/schema.d.ts b/packages/gradle/src/executors/build/boot/schema.d.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/build/schema.d.ts rename to packages/gradle/src/executors/build/boot/schema.d.ts diff --git a/packages/nx-boot-gradle/src/executors/build/schema.json b/packages/gradle/src/executors/build/boot/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/build/schema.json rename to packages/gradle/src/executors/build/boot/schema.json diff --git a/packages/nx-quarkus-gradle/src/executors/build/executor.spec.ts b/packages/gradle/src/executors/build/quarkus/executor.spec.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build/executor.spec.ts rename to packages/gradle/src/executors/build/quarkus/executor.spec.ts diff --git a/packages/nx-quarkus-gradle/src/executors/build/executor.ts b/packages/gradle/src/executors/build/quarkus/executor.ts similarity index 89% rename from packages/nx-quarkus-gradle/src/executors/build/executor.ts rename to packages/gradle/src/executors/build/quarkus/executor.ts index 2b73dad7a..aeb9ce9b2 100644 --- a/packages/nx-quarkus-gradle/src/executors/build/executor.ts +++ b/packages/gradle/src/executors/build/quarkus/executor.ts @@ -1,7 +1,7 @@ import { ExecutorContext, logger } from '@nx/devkit'; import { runCommand } from '@jnxplus/common'; import { BuildExecutorSchema } from './schema'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; export default async function runExecutor( options: BuildExecutorSchema, diff --git a/packages/nx-quarkus-gradle/src/executors/build/schema.d.ts b/packages/gradle/src/executors/build/quarkus/schema.d.ts similarity index 95% rename from packages/nx-quarkus-gradle/src/executors/build/schema.d.ts rename to packages/gradle/src/executors/build/quarkus/schema.d.ts index 20b715149..0a10cc631 100644 --- a/packages/nx-quarkus-gradle/src/executors/build/schema.d.ts +++ b/packages/gradle/src/executors/build/quarkus/schema.d.ts @@ -1,3 +1,3 @@ -export interface BuildExecutorSchema { - args: string; -} +export interface BuildExecutorSchema { + args: string; +} diff --git a/packages/nx-quarkus-gradle/src/executors/build/schema.json b/packages/gradle/src/executors/build/quarkus/schema.json similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/build/schema.json rename to packages/gradle/src/executors/build/quarkus/schema.json diff --git a/packages/nx-quarkus-gradle/src/executors/integration-test/executor.spec.ts b/packages/gradle/src/executors/integration-test/executor.spec.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/integration-test/executor.spec.ts rename to packages/gradle/src/executors/integration-test/executor.spec.ts diff --git a/packages/nx-quarkus-gradle/src/executors/integration-test/executor.ts b/packages/gradle/src/executors/integration-test/executor.ts similarity index 88% rename from packages/nx-quarkus-gradle/src/executors/integration-test/executor.ts rename to packages/gradle/src/executors/integration-test/executor.ts index 1a4aabfd3..a3e3b52da 100644 --- a/packages/nx-quarkus-gradle/src/executors/integration-test/executor.ts +++ b/packages/gradle/src/executors/integration-test/executor.ts @@ -1,7 +1,7 @@ import { ExecutorContext, logger } from '@nx/devkit'; import { runCommand } from '@jnxplus/common'; import { IntegrationTestExecutorSchema } from './schema'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; export default async function runExecutor( options: IntegrationTestExecutorSchema, diff --git a/packages/nx-quarkus-gradle/src/executors/integration-test/schema.d.ts b/packages/gradle/src/executors/integration-test/schema.d.ts similarity index 95% rename from packages/nx-quarkus-gradle/src/executors/integration-test/schema.d.ts rename to packages/gradle/src/executors/integration-test/schema.d.ts index 6e6c42ab8..c44dd01b5 100644 --- a/packages/nx-quarkus-gradle/src/executors/integration-test/schema.d.ts +++ b/packages/gradle/src/executors/integration-test/schema.d.ts @@ -1,3 +1,3 @@ -export interface IntegrationTestExecutorSchema { - native: boolean; -} +export interface IntegrationTestExecutorSchema { + native: boolean; +} diff --git a/packages/nx-quarkus-gradle/src/executors/integration-test/schema.json b/packages/gradle/src/executors/integration-test/schema.json similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/integration-test/schema.json rename to packages/gradle/src/executors/integration-test/schema.json diff --git a/packages/nx-boot-gradle/src/executors/kformat/executor.spec.ts b/packages/gradle/src/executors/kformat/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/kformat/executor.spec.ts rename to packages/gradle/src/executors/kformat/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/ktformat/executor.ts b/packages/gradle/src/executors/kformat/executor.ts similarity index 93% rename from packages/nx-boot-gradle/src/executors/ktformat/executor.ts rename to packages/gradle/src/executors/kformat/executor.ts index d38ea24d5..37f0a093b 100644 --- a/packages/nx-boot-gradle/src/executors/ktformat/executor.ts +++ b/packages/gradle/src/executors/kformat/executor.ts @@ -2,7 +2,7 @@ import { getKtlintPath } from '@jnxplus/common'; import { ExecutorContext, logger } from '@nx/devkit'; import { getProjectSourceRoot, runCommand } from '@jnxplus/common'; import { KotlinFormatExecutorSchema } from './schema'; -import { getKtlintVersion } from '@jnxplus/gradle'; +import { getKtlintVersion } from '../../../.'; export default async function runExecutor( options: KotlinFormatExecutorSchema, diff --git a/packages/nx-boot-gradle/src/executors/ktformat/schema.d.ts b/packages/gradle/src/executors/kformat/schema.d.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/ktformat/schema.d.ts rename to packages/gradle/src/executors/kformat/schema.d.ts diff --git a/packages/nx-boot-gradle/src/executors/kformat/schema.json b/packages/gradle/src/executors/kformat/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/kformat/schema.json rename to packages/gradle/src/executors/kformat/schema.json diff --git a/packages/nx-boot-gradle/src/executors/ktformat/executor.spec.ts b/packages/gradle/src/executors/ktformat/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/ktformat/executor.spec.ts rename to packages/gradle/src/executors/ktformat/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/kformat/executor.ts b/packages/gradle/src/executors/ktformat/executor.ts similarity index 93% rename from packages/nx-boot-gradle/src/executors/kformat/executor.ts rename to packages/gradle/src/executors/ktformat/executor.ts index d38ea24d5..37f0a093b 100644 --- a/packages/nx-boot-gradle/src/executors/kformat/executor.ts +++ b/packages/gradle/src/executors/ktformat/executor.ts @@ -2,7 +2,7 @@ import { getKtlintPath } from '@jnxplus/common'; import { ExecutorContext, logger } from '@nx/devkit'; import { getProjectSourceRoot, runCommand } from '@jnxplus/common'; import { KotlinFormatExecutorSchema } from './schema'; -import { getKtlintVersion } from '@jnxplus/gradle'; +import { getKtlintVersion } from '../../../.'; export default async function runExecutor( options: KotlinFormatExecutorSchema, diff --git a/packages/nx-boot-gradle/src/executors/kformat/schema.d.ts b/packages/gradle/src/executors/ktformat/schema.d.ts similarity index 98% rename from packages/nx-boot-gradle/src/executors/kformat/schema.d.ts rename to packages/gradle/src/executors/ktformat/schema.d.ts index c45ddb777..b1514033d 100644 --- a/packages/nx-boot-gradle/src/executors/kformat/schema.d.ts +++ b/packages/gradle/src/executors/ktformat/schema.d.ts @@ -1 +1 @@ -export interface KotlinFormatExecutorSchema {} // eslint-disable-line +export interface KotlinFormatExecutorSchema {} // eslint-disable-line diff --git a/packages/nx-boot-gradle/src/executors/ktformat/schema.json b/packages/gradle/src/executors/ktformat/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/ktformat/schema.json rename to packages/gradle/src/executors/ktformat/schema.json diff --git a/packages/nx-boot-gradle/src/executors/lint/executor.spec.ts b/packages/gradle/src/executors/lint/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/lint/executor.spec.ts rename to packages/gradle/src/executors/lint/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/lint/executor.ts b/packages/gradle/src/executors/lint/executor.ts similarity index 93% rename from packages/nx-boot-gradle/src/executors/lint/executor.ts rename to packages/gradle/src/executors/lint/executor.ts index e6f5ca7e9..05ff57293 100644 --- a/packages/nx-boot-gradle/src/executors/lint/executor.ts +++ b/packages/gradle/src/executors/lint/executor.ts @@ -1,4 +1,4 @@ -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/gradle'; +import { getCheckstyleVersion, getKtlintVersion } from '../../../.'; import { ExecutorContext, logger } from '@nx/devkit'; import { getCheckstylePath, getKtlintPath } from '@jnxplus/common'; import { diff --git a/packages/nx-quarkus-gradle/src/executors/lint/schema.d.ts b/packages/gradle/src/executors/lint/schema.d.ts similarity index 95% rename from packages/nx-quarkus-gradle/src/executors/lint/schema.d.ts rename to packages/gradle/src/executors/lint/schema.d.ts index 14833fd2d..75bfc1054 100644 --- a/packages/nx-quarkus-gradle/src/executors/lint/schema.d.ts +++ b/packages/gradle/src/executors/lint/schema.d.ts @@ -1,3 +1,3 @@ -export interface LintExecutorSchema { - linter: LinterType; -} +export interface LintExecutorSchema { + linter: LinterType; +} diff --git a/packages/nx-boot-gradle/src/executors/lint/schema.json b/packages/gradle/src/executors/lint/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/lint/schema.json rename to packages/gradle/src/executors/lint/schema.json diff --git a/packages/nx-boot-gradle/src/executors/run-task/executor.spec.ts b/packages/gradle/src/executors/run-task/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/run-task/executor.spec.ts rename to packages/gradle/src/executors/run-task/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/run-task/executor.ts b/packages/gradle/src/executors/run-task/executor.ts similarity index 86% rename from packages/nx-boot-gradle/src/executors/run-task/executor.ts rename to packages/gradle/src/executors/run-task/executor.ts index 65f9dd9ef..86a547501 100644 --- a/packages/nx-boot-gradle/src/executors/run-task/executor.ts +++ b/packages/gradle/src/executors/run-task/executor.ts @@ -1,5 +1,5 @@ import { ExecutorContext, logger } from '@nx/devkit'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; import { RunTaskExecutorSchema } from './schema'; import { runCommand } from '@jnxplus/common'; diff --git a/packages/nx-quarkus-gradle/src/executors/run-task/schema.d.ts b/packages/gradle/src/executors/run-task/schema.d.ts similarity index 95% rename from packages/nx-quarkus-gradle/src/executors/run-task/schema.d.ts rename to packages/gradle/src/executors/run-task/schema.d.ts index 39991c4e0..fc5b6ce47 100644 --- a/packages/nx-quarkus-gradle/src/executors/run-task/schema.d.ts +++ b/packages/gradle/src/executors/run-task/schema.d.ts @@ -1,3 +1,3 @@ -export interface RunTaskExecutorSchema { - task: string; -} +export interface RunTaskExecutorSchema { + task: string; +} diff --git a/packages/nx-boot-gradle/src/executors/run-task/schema.json b/packages/gradle/src/executors/run-task/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/run-task/schema.json rename to packages/gradle/src/executors/run-task/schema.json diff --git a/packages/nx-boot-gradle/src/executors/serve/executor.spec.ts b/packages/gradle/src/executors/serve/boot/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/serve/executor.spec.ts rename to packages/gradle/src/executors/serve/boot/executor.spec.ts diff --git a/packages/nx-boot-gradle/src/executors/serve/executor.ts b/packages/gradle/src/executors/serve/boot/executor.ts similarity index 90% rename from packages/nx-boot-gradle/src/executors/serve/executor.ts rename to packages/gradle/src/executors/serve/boot/executor.ts index 3fc6c0293..7b10abef9 100644 --- a/packages/nx-boot-gradle/src/executors/serve/executor.ts +++ b/packages/gradle/src/executors/serve/boot/executor.ts @@ -1,7 +1,7 @@ import { runCommand, waitForever } from '@jnxplus/common'; import { ExecutorContext, logger } from '@nx/devkit'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; import { ServeExecutorSchema } from './schema'; export default async function runExecutor( diff --git a/packages/nx-boot-gradle/src/executors/serve/schema.d.ts b/packages/gradle/src/executors/serve/boot/schema.d.ts similarity index 95% rename from packages/nx-boot-gradle/src/executors/serve/schema.d.ts rename to packages/gradle/src/executors/serve/boot/schema.d.ts index f9cfd637b..6d76b1fa9 100644 --- a/packages/nx-boot-gradle/src/executors/serve/schema.d.ts +++ b/packages/gradle/src/executors/serve/boot/schema.d.ts @@ -1,3 +1,3 @@ -export interface ServeExecutorSchema { - args: string; -} +export interface ServeExecutorSchema { + args: string; +} diff --git a/packages/nx-boot-gradle/src/executors/serve/schema.json b/packages/gradle/src/executors/serve/boot/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/serve/schema.json rename to packages/gradle/src/executors/serve/boot/schema.json diff --git a/packages/nx-quarkus-gradle/src/executors/serve/executor.spec.ts b/packages/gradle/src/executors/serve/quarkus/executor.spec.ts similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/serve/executor.spec.ts rename to packages/gradle/src/executors/serve/quarkus/executor.spec.ts diff --git a/packages/nx-quarkus-gradle/src/executors/serve/executor.ts b/packages/gradle/src/executors/serve/quarkus/executor.ts similarity index 90% rename from packages/nx-quarkus-gradle/src/executors/serve/executor.ts rename to packages/gradle/src/executors/serve/quarkus/executor.ts index 18cc1b5f5..de7ae2011 100644 --- a/packages/nx-quarkus-gradle/src/executors/serve/executor.ts +++ b/packages/gradle/src/executors/serve/quarkus/executor.ts @@ -1,7 +1,7 @@ import { ExecutorContext, logger } from '@nx/devkit'; import { runCommand, waitForever } from '@jnxplus/common'; import { ServeExecutorSchema } from './schema'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { getExecutable, getProjectPath } from '../../../.'; export default async function runExecutor( options: ServeExecutorSchema, diff --git a/packages/nx-quarkus-gradle/src/executors/serve/schema.d.ts b/packages/gradle/src/executors/serve/quarkus/schema.d.ts similarity index 95% rename from packages/nx-quarkus-gradle/src/executors/serve/schema.d.ts rename to packages/gradle/src/executors/serve/quarkus/schema.d.ts index f9cfd637b..6d76b1fa9 100644 --- a/packages/nx-quarkus-gradle/src/executors/serve/schema.d.ts +++ b/packages/gradle/src/executors/serve/quarkus/schema.d.ts @@ -1,3 +1,3 @@ -export interface ServeExecutorSchema { - args: string; -} +export interface ServeExecutorSchema { + args: string; +} diff --git a/packages/nx-quarkus-gradle/src/executors/serve/schema.json b/packages/gradle/src/executors/serve/quarkus/schema.json similarity index 100% rename from packages/nx-quarkus-gradle/src/executors/serve/schema.json rename to packages/gradle/src/executors/serve/quarkus/schema.json diff --git a/packages/nx-boot-gradle/src/executors/test/executor.spec.ts b/packages/gradle/src/executors/test/executor.spec.ts similarity index 100% rename from packages/nx-boot-gradle/src/executors/test/executor.spec.ts rename to packages/gradle/src/executors/test/executor.spec.ts diff --git a/packages/nx-quarkus-gradle/src/executors/test/executor.ts b/packages/gradle/src/executors/test/executor.ts similarity index 84% rename from packages/nx-quarkus-gradle/src/executors/test/executor.ts rename to packages/gradle/src/executors/test/executor.ts index 609cb8fe7..b19e0602e 100644 --- a/packages/nx-quarkus-gradle/src/executors/test/executor.ts +++ b/packages/gradle/src/executors/test/executor.ts @@ -1,7 +1,7 @@ import { ExecutorContext, logger } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; +import { getExecutable, getProjectPath } from '../../lib/utils/index'; import { TestExecutorSchema } from './schema'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; +import { runCommand } from '@jnxplus/common'; export default async function runExecutor( options: TestExecutorSchema, diff --git a/packages/nx-boot-gradle/src/executors/test/schema.d.ts b/packages/gradle/src/executors/test/schema.d.ts similarity index 98% rename from packages/nx-boot-gradle/src/executors/test/schema.d.ts rename to packages/gradle/src/executors/test/schema.d.ts index 82c0805e7..cc0e88003 100644 --- a/packages/nx-boot-gradle/src/executors/test/schema.d.ts +++ b/packages/gradle/src/executors/test/schema.d.ts @@ -1 +1 @@ -export interface TestExecutorSchema {} // eslint-disable-line +export interface TestExecutorSchema {} // eslint-disable-line diff --git a/packages/nx-boot-gradle/src/executors/test/schema.json b/packages/gradle/src/executors/test/schema.json similarity index 100% rename from packages/nx-boot-gradle/src/executors/test/schema.json rename to packages/gradle/src/executors/test/schema.json diff --git a/packages/nx-boot-gradle/executors.json b/packages/nx-boot-gradle/executors.json index eb7cc6179..b14998acf 100644 --- a/packages/nx-boot-gradle/executors.json +++ b/packages/nx-boot-gradle/executors.json @@ -2,43 +2,43 @@ "$schema": "http://json-schema.org/schema", "executors": { "build": { - "implementation": "./src/executors/build/executor", - "schema": "./src/executors/build/schema.json", + "implementation": "@jnxplus/gradle/src/executors/build/boot/executor", + "schema": "@jnxplus/gradle/src/executors/build/boot/schema.json", "description": "build executor" }, "build-image": { - "implementation": "./src/executors/build-image/executor", - "schema": "./src/executors/build-image/schema.json", + "implementation": "@jnxplus/gradle/src/executors/build-image/boot/executor", + "schema": "@jnxplus/gradle/src/executors/build-image/boot/schema.json", "description": "build-image executor" }, "serve": { - "implementation": "./src/executors/serve/executor", - "schema": "./src/executors/serve/schema.json", + "implementation": "@jnxplus/gradle/src/executors/serve/boot/executor", + "schema": "@jnxplus/gradle/src/executors/serve/boot/schema.json", "description": "serve executor" }, "lint": { - "implementation": "./src/executors/lint/executor", - "schema": "./src/executors/lint/schema.json", + "implementation": "@jnxplus/gradle/src/executors/lint/executor", + "schema": "@jnxplus/gradle/src/executors/lint/schema.json", "description": "lint executor" }, "test": { - "implementation": "./src/executors/test/executor", - "schema": "./src/executors/test/schema.json", + "implementation": "@jnxplus/gradle/src/executors/test/executor", + "schema": "@jnxplus/gradle/src/executors/test/schema.json", "description": "test executor" }, "ktformat": { - "implementation": "./src/executors/ktformat/executor", - "schema": "./src/executors/ktformat/schema.json", + "implementation": "@jnxplus/gradle/src/executors/ktformat/executor", + "schema": "@jnxplus/gradle/src/executors/ktformat/schema.json", "description": "kotlin format executor" }, "kformat": { - "implementation": "./src/executors/kformat/executor", - "schema": "./src/executors/kformat/schema.json", + "implementation": "@jnxplus/gradle/src/executors/kformat/executor", + "schema": "@jnxplus/gradle/src/executors/kformat/schema.json", "description": "(Deprecated) kotlin format executor" }, "run-task": { - "implementation": "./src/executors/run-task/executor", - "schema": "./src/executors/run-task/schema.json", + "implementation": "@jnxplus/gradle/src/executors/run-task/executor", + "schema": "@jnxplus/gradle/src/executors/run-task/schema.json", "description": "run-task executor" } } diff --git a/packages/nx-boot-gradle/src/executors/lint/schema.d.ts b/packages/nx-boot-gradle/src/executors/lint/schema.d.ts deleted file mode 100644 index 14833fd2d..000000000 --- a/packages/nx-boot-gradle/src/executors/lint/schema.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface LintExecutorSchema { - linter: LinterType; -} diff --git a/packages/nx-boot-gradle/src/executors/run-task/schema.d.ts b/packages/nx-boot-gradle/src/executors/run-task/schema.d.ts deleted file mode 100644 index 39991c4e0..000000000 --- a/packages/nx-boot-gradle/src/executors/run-task/schema.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface RunTaskExecutorSchema { - task: string; -} diff --git a/packages/nx-boot-gradle/src/executors/test/executor.ts b/packages/nx-boot-gradle/src/executors/test/executor.ts deleted file mode 100644 index 268ddcda0..000000000 --- a/packages/nx-boot-gradle/src/executors/test/executor.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ExecutorContext, logger } from '@nx/devkit'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; -import { TestExecutorSchema } from './schema'; -import { runCommand } from '@jnxplus/common'; - -export default async function runExecutor( - options: TestExecutorSchema, - context: ExecutorContext -) { - logger.info(`Executor ran for Test: ${JSON.stringify(options)}`); - return runCommand(`${getExecutable()} ${getProjectPath(context)}:test`); -} diff --git a/packages/nx-quarkus-gradle/executors.json b/packages/nx-quarkus-gradle/executors.json index 5dae42d0e..42b397432 100644 --- a/packages/nx-quarkus-gradle/executors.json +++ b/packages/nx-quarkus-gradle/executors.json @@ -1,45 +1,45 @@ -{ - "$schema": "http://json-schema.org/schema", - "executors": { - "build": { - "implementation": "./src/executors/build/executor", - "schema": "./src/executors/build/schema.json", - "description": "build executor" - }, - "build-image": { - "implementation": "./src/executors/build-image/executor", - "schema": "./src/executors/build-image/schema.json", - "description": "build-image executor" - }, - "serve": { - "implementation": "./src/executors/serve/executor", - "schema": "./src/executors/serve/schema.json", - "description": "serve executor" - }, - "lint": { - "implementation": "./src/executors/lint/executor", - "schema": "./src/executors/lint/schema.json", - "description": "lint executor" - }, - "test": { - "implementation": "./src/executors/test/executor", - "schema": "./src/executors/test/schema.json", - "description": "test executor" - }, - "integration-test": { - "implementation": "./src/executors/integration-test/executor", - "schema": "./src/executors/integration-test/schema.json", - "description": "integration-test executor" - }, - "ktformat": { - "implementation": "./src/executors/ktformat/executor", - "schema": "./src/executors/ktformat/schema.json", - "description": "kotlin format executor" - }, - "run-task": { - "implementation": "./src/executors/run-task/executor", - "schema": "./src/executors/run-task/schema.json", - "description": "run-task executor" - } - } -} +{ + "$schema": "http://json-schema.org/schema", + "executors": { + "build": { + "implementation": "@jnxplus/gradle/src/executors/build/quarkus/executor", + "schema": "@jnxplus/gradle/src/executors/build/quarkus/schema.json", + "description": "build executor" + }, + "build-image": { + "implementation": "@jnxplus/gradle/src/executors/build-image/quarkus/executor", + "schema": "@jnxplus/gradle/src/executors/build-image/quarkus/schema.json", + "description": "build-image executor" + }, + "serve": { + "implementation": "@jnxplus/gradle/src/executors/serve/quarkus/executor", + "schema": "@jnxplus/gradle/src/executors/serve/quarkus/schema.json", + "description": "serve executor" + }, + "lint": { + "implementation": "@jnxplus/gradle/src/executors/lint/executor", + "schema": "@jnxplus/gradle/src/executors/lint/schema.json", + "description": "lint executor" + }, + "test": { + "implementation": "@jnxplus/gradle/src/executors/test/executor", + "schema": "@jnxplus/gradle/src/executors/test/schema.json", + "description": "test executor" + }, + "integration-test": { + "implementation": "@jnxplus/gradle/src/executors/integration-test/executor", + "schema": "@jnxplus/gradle/src/executors/integration-test/schema.json", + "description": "integration-test executor" + }, + "ktformat": { + "implementation": "@jnxplus/gradle/src/executors/ktformat/executor", + "schema": "@jnxplus/gradle/src/executors/ktformat/schema.json", + "description": "kotlin format executor" + }, + "run-task": { + "implementation": "@jnxplus/gradle/src/executors/run-task/executor", + "schema": "@jnxplus/gradle/src/executors/run-task/schema.json", + "description": "run-task executor" + } + } +} diff --git a/packages/nx-quarkus-gradle/src/executors/ktformat/executor.spec.ts b/packages/nx-quarkus-gradle/src/executors/ktformat/executor.spec.ts deleted file mode 100644 index 0b5925dcf..000000000 --- a/packages/nx-quarkus-gradle/src/executors/ktformat/executor.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ExecutorContext } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; -import executor from './executor'; -import { KotlinFormatExecutorSchema } from './schema'; -jest.mock('@jnxplus/common'); - -const options: KotlinFormatExecutorSchema = {}; -const context: ExecutorContext = { - root: '/root', - cwd: '/root', - projectName: 'my-app', - targetName: 'lint', - workspace: { - version: 2, - projects: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - 'my-app': { - root: 'apps/wibble', - sourceRoot: 'apps/wibble', - }, - }, - npmScope: 'test', - }, - isVerbose: false, -}; - -describe('Kotlin Format Executor', () => { - beforeEach(async () => { - (runCommand as jest.Mock).mockReturnValue({ success: true }); - }); - - xit('can run', async () => { - const output = await executor(options, context); - expect(output.success).toBe(true); - }); -}); diff --git a/packages/nx-quarkus-gradle/src/executors/ktformat/executor.ts b/packages/nx-quarkus-gradle/src/executors/ktformat/executor.ts deleted file mode 100644 index 0b6133e69..000000000 --- a/packages/nx-quarkus-gradle/src/executors/ktformat/executor.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - getKtlintPath, - getProjectSourceRoot, - runCommand, -} from '@jnxplus/common'; -import { getKtlintVersion } from '@jnxplus/gradle'; -import { ExecutorContext, logger } from '@nx/devkit'; -import { KotlinFormatExecutorSchema } from './schema'; - -export default async function runExecutor( - options: KotlinFormatExecutorSchema, - context: ExecutorContext -) { - logger.info(`Executor ran for Kotlin Format: ${JSON.stringify(options)}`); - const projectSourceRoot = getProjectSourceRoot(context); - - const ktlintPath = await getKtlintPath(getKtlintVersion); - - const command = `java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${ktlintPath} -F "${projectSourceRoot}/**/*.kt"`; - - return runCommand(command); -} diff --git a/packages/nx-quarkus-gradle/src/executors/ktformat/schema.d.ts b/packages/nx-quarkus-gradle/src/executors/ktformat/schema.d.ts deleted file mode 100644 index c45ddb777..000000000 --- a/packages/nx-quarkus-gradle/src/executors/ktformat/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface KotlinFormatExecutorSchema {} // eslint-disable-line diff --git a/packages/nx-quarkus-gradle/src/executors/ktformat/schema.json b/packages/nx-quarkus-gradle/src/executors/ktformat/schema.json deleted file mode 100644 index 6e835c1df..000000000 --- a/packages/nx-quarkus-gradle/src/executors/ktformat/schema.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": 2, - "outputCapture": "pipe", - "$schema": "http://json-schema.org/schema", - "title": "Kotlin Format executor", - "description": "", - "type": "object", - "properties": {}, - "required": [] -} diff --git a/packages/nx-quarkus-gradle/src/executors/lint/executor.spec.ts b/packages/nx-quarkus-gradle/src/executors/lint/executor.spec.ts deleted file mode 100644 index e65cd7bc3..000000000 --- a/packages/nx-quarkus-gradle/src/executors/lint/executor.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ExecutorContext } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; -import executor from './executor'; -import { LintExecutorSchema } from './schema'; -jest.mock('@jnxplus/common'); - -const options: LintExecutorSchema = { - linter: 'checkstyle', -}; -const context: ExecutorContext = { - root: '/root', - cwd: '/root', - projectName: 'my-app', - targetName: 'lint', - workspace: { - version: 2, - projects: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - 'my-app': { - root: 'apps/wibble', - sourceRoot: 'apps/wibble', - }, - }, - npmScope: 'test', - }, - isVerbose: false, -}; - -describe('Lint Executor', () => { - beforeEach(async () => { - (runCommand as jest.Mock).mockReturnValue({ success: true }); - }); - - xit('can run', async () => { - const output = await executor(options, context); - expect(output.success).toBe(true); - }); -}); diff --git a/packages/nx-quarkus-gradle/src/executors/lint/executor.ts b/packages/nx-quarkus-gradle/src/executors/lint/executor.ts deleted file mode 100644 index e2b8451e7..000000000 --- a/packages/nx-quarkus-gradle/src/executors/lint/executor.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { - getCheckstylePath, - getKtlintPath, - getPmdExecutable, - getProjectSourceRoot, - runCommand, -} from '@jnxplus/common'; -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/gradle'; -import { ExecutorContext, logger } from '@nx/devkit'; -import { LintExecutorSchema } from './schema'; - -export default async function runExecutor( - options: LintExecutorSchema, - context: ExecutorContext -) { - logger.info(`Executor ran for Lint: ${JSON.stringify(options)}`); - let command = ''; - const projectSourceRoot = getProjectSourceRoot(context); - - if (options.linter === 'checkstyle') { - const checkstylePath = await getCheckstylePath(getCheckstyleVersion); - command = `java -jar ${checkstylePath} -c ./tools/linters/checkstyle.xml ${projectSourceRoot}`; - } - - if (options.linter === 'pmd') { - command = `${getPmdExecutable()} check -f text -R ./tools/linters/pmd.xml -d ${projectSourceRoot}`; - } - - if (options.linter === 'ktlint') { - const ktlintPath = await getKtlintPath(getKtlintVersion); - command = `java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${ktlintPath} "${projectSourceRoot}/**/*.kt"`; - } - - return runCommand(command); -} diff --git a/packages/nx-quarkus-gradle/src/executors/lint/schema.json b/packages/nx-quarkus-gradle/src/executors/lint/schema.json deleted file mode 100644 index 251bc3def..000000000 --- a/packages/nx-quarkus-gradle/src/executors/lint/schema.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": 2, - "outputCapture": "pipe", - "$schema": "http://json-schema.org/schema", - "title": "Lint executor", - "description": "", - "type": "object", - "properties": { - "linter": { - "type": "string" - } - }, - "required": ["linter"] -} diff --git a/packages/nx-quarkus-gradle/src/executors/run-task/executor.spec.ts b/packages/nx-quarkus-gradle/src/executors/run-task/executor.spec.ts deleted file mode 100644 index 4d87b3737..000000000 --- a/packages/nx-quarkus-gradle/src/executors/run-task/executor.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ExecutorContext } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; -import executor from './executor'; -import { RunTaskExecutorSchema } from './schema'; -jest.mock('@jnxplus/common'); - -const options: RunTaskExecutorSchema = { - task: 'test', -}; -const context: ExecutorContext = { - root: '/root', - cwd: '/root', - projectName: 'my-app', - targetName: 'build', - workspace: { - version: 2, - projects: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - 'my-app': { - root: 'apps/wibble', - sourceRoot: 'apps/wibble', - }, - }, - npmScope: 'test', - }, - isVerbose: false, -}; - -describe('Run Task Executor', () => { - beforeEach(async () => { - (runCommand as jest.Mock).mockReturnValue({ success: true }); - }); - - xit('can run', async () => { - const output = await executor(options, context); - expect(output.success).toBe(true); - }); -}); diff --git a/packages/nx-quarkus-gradle/src/executors/run-task/executor.ts b/packages/nx-quarkus-gradle/src/executors/run-task/executor.ts deleted file mode 100644 index 154608ea4..000000000 --- a/packages/nx-quarkus-gradle/src/executors/run-task/executor.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ExecutorContext, logger } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; -import { RunTaskExecutorSchema } from './schema'; -import { getExecutable, getProjectPath } from '@jnxplus/gradle'; - -export default async function runExecutor( - options: RunTaskExecutorSchema, - context: ExecutorContext -) { - logger.info(`Executor ran for Run Task: ${JSON.stringify(options)}`); - return runCommand( - `${getExecutable()} ${getProjectPath(context)}:${options.task}` - ); -} diff --git a/packages/nx-quarkus-gradle/src/executors/run-task/schema.json b/packages/nx-quarkus-gradle/src/executors/run-task/schema.json deleted file mode 100644 index c347d16f7..000000000 --- a/packages/nx-quarkus-gradle/src/executors/run-task/schema.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": 2, - "outputCapture": "pipe", - "$schema": "http://json-schema.org/schema", - "title": "Run Task executor", - "description": "", - "type": "object", - "properties": { - "task": { - "type": "string" - } - }, - "required": ["task"] -} diff --git a/packages/nx-quarkus-gradle/src/executors/test/executor.spec.ts b/packages/nx-quarkus-gradle/src/executors/test/executor.spec.ts deleted file mode 100644 index f7230a2f5..000000000 --- a/packages/nx-quarkus-gradle/src/executors/test/executor.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ExecutorContext } from '@nx/devkit'; -import { runCommand } from '@jnxplus/common'; -import executor from './executor'; -import { TestExecutorSchema } from './schema'; -jest.mock('@jnxplus/common'); - -const options: TestExecutorSchema = {}; -const context: ExecutorContext = { - root: '/root', - cwd: '/root', - projectName: 'my-app', - targetName: 'test', - workspace: { - version: 2, - projects: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - 'my-app': { - root: 'apps/wibble', - sourceRoot: 'apps/wibble', - }, - }, - npmScope: 'test', - }, - isVerbose: false, -}; - -describe('Test Executor', () => { - beforeEach(async () => { - (runCommand as jest.Mock).mockReturnValue({ success: true }); - }); - - xit('can run', async () => { - const output = await executor(options, context); - expect(output.success).toBe(true); - }); -}); diff --git a/packages/nx-quarkus-gradle/src/executors/test/schema.d.ts b/packages/nx-quarkus-gradle/src/executors/test/schema.d.ts deleted file mode 100644 index 82c0805e7..000000000 --- a/packages/nx-quarkus-gradle/src/executors/test/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface TestExecutorSchema {} // eslint-disable-line diff --git a/packages/nx-quarkus-gradle/src/executors/test/schema.json b/packages/nx-quarkus-gradle/src/executors/test/schema.json deleted file mode 100644 index fc8fb878b..000000000 --- a/packages/nx-quarkus-gradle/src/executors/test/schema.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": 2, - "outputCapture": "pipe", - "$schema": "http://json-schema.org/schema", - "title": "Test executor", - "description": "", - "type": "object", - "properties": {}, - "required": [] -}