@nx/gradle 19.0.0-beta.3 → 19.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/gradle",
|
3
|
-
"version": "19.0.0-beta.
|
3
|
+
"version": "19.0.0-beta.4",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
|
6
6
|
"repository": {
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"migrations": "./migrations.json"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@nx/devkit": "19.0.0-beta.
|
36
|
+
"@nx/devkit": "19.0.0-beta.4"
|
37
37
|
},
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public"
|
package/src/plugin/nodes.js
CHANGED
@@ -90,8 +90,9 @@ function createGradleTargets(tasks, projectRoot, options, context, outputDirs) {
|
|
90
90
|
for (const task of tasks) {
|
91
91
|
const targetName = options?.[`${task.name}TargetName`] ?? task.name;
|
92
92
|
const outputs = outputDirs.get(task.name);
|
93
|
+
const path = (0, node_path_1.relative)(projectRoot, (0, exec_gradle_1.getGradleBinaryPath)());
|
93
94
|
targets[targetName] = {
|
94
|
-
command: `${
|
95
|
+
command: `${path} ${task.name}`,
|
95
96
|
options: {
|
96
97
|
cwd: projectRoot,
|
97
98
|
},
|
@@ -2,6 +2,6 @@
|
|
2
2
|
/// <reference types="node" />
|
3
3
|
import { ExecFileOptions } from 'child_process';
|
4
4
|
import { ExecFileSyncOptionsWithBufferEncoding } from 'node:child_process';
|
5
|
-
export declare function execGradle(args: string[], execOptions
|
5
|
+
export declare function execGradle(args: string[], execOptions?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
6
6
|
export declare function getGradleBinaryPath(): string;
|
7
|
-
export declare function execGradleAsync(args: ReadonlyArray<string>, execOptions
|
7
|
+
export declare function execGradleAsync(args: ReadonlyArray<string>, execOptions?: ExecFileOptions): Promise<Buffer>;
|
package/src/utils/exec-gradle.js
CHANGED
@@ -23,9 +23,6 @@ function getGradleBinaryPath() {
|
|
23
23
|
exports.getGradleBinaryPath = getGradleBinaryPath;
|
24
24
|
function execGradleAsync(args, execOptions) {
|
25
25
|
const gradleBinaryPath = getGradleBinaryPath();
|
26
|
-
if (!(0, node_fs_1.existsSync)(gradleBinaryPath)) {
|
27
|
-
throw new Error('Gradle is not setup. Run "gradle init"');
|
28
|
-
}
|
29
26
|
return new Promise((res, rej) => {
|
30
27
|
const cp = (0, node_child_process_1.execFile)(gradleBinaryPath, args, execOptions);
|
31
28
|
let stdout = Buffer.from('');
|