Skip to content

Commit

Permalink
feat(executors): move all gradle executors to gradle lib (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 authored May 27, 2023
1 parent 00f7f88 commit 86d6740
Show file tree
Hide file tree
Showing 66 changed files with 94 additions and 381 deletions.
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export interface BuildImageExecutorSchema {} // eslint-disable-line
export interface BuildImageExecutorSchema {} // eslint-disable-line
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface BuildExecutorSchema {
args: string;
}
export interface BuildExecutorSchema {
args: string;
}
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface IntegrationTestExecutorSchema {
native: boolean;
}
export interface IntegrationTestExecutorSchema {
native: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export interface KotlinFormatExecutorSchema {} // eslint-disable-line
export interface KotlinFormatExecutorSchema {} // eslint-disable-line
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface LintExecutorSchema {
linter: LinterType;
}
export interface LintExecutorSchema {
linter: LinterType;
}
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface RunTaskExecutorSchema {
task: string;
}
export interface RunTaskExecutorSchema {
task: string;
}
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface ServeExecutorSchema {
args: string;
}
export interface ServeExecutorSchema {
args: string;
}
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface ServeExecutorSchema {
args: string;
}
export interface ServeExecutorSchema {
args: string;
}
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export interface TestExecutorSchema {} // eslint-disable-line
export interface TestExecutorSchema {} // eslint-disable-line
32 changes: 16 additions & 16 deletions packages/nx-boot-gradle/executors.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
3 changes: 0 additions & 3 deletions packages/nx-boot-gradle/src/executors/lint/schema.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/nx-boot-gradle/src/executors/run-task/schema.d.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/nx-boot-gradle/src/executors/test/executor.ts

This file was deleted.

90 changes: 45 additions & 45 deletions packages/nx-quarkus-gradle/executors.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
36 changes: 0 additions & 36 deletions packages/nx-quarkus-gradle/src/executors/ktformat/executor.spec.ts

This file was deleted.

22 changes: 0 additions & 22 deletions packages/nx-quarkus-gradle/src/executors/ktformat/executor.ts

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions packages/nx-quarkus-gradle/src/executors/ktformat/schema.json

This file was deleted.

Loading

0 comments on commit 86d6740

Please sign in to comment.