Skip to content

Commit

Permalink
fix(gradle): Use gradle wrapper inside docker (#5598)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Feb 29, 2020
1 parent de2986f commit 5eff5b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/manager/gradle/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ Array [
exports[`manager/gradle extractPackageFile should use docker even if gradlew is available 1`] = `
Array [
Object {
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"gradle --init-script renovate-plugin.gradle renovate\\"",
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"./gradlew --init-script renovate-plugin.gradle renovate\\"",
"options": Object {
"cwd": "localDir",
"encoding": "utf-8",
Expand Down Expand Up @@ -536,7 +536,7 @@ Array [
},
},
Object {
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"gradle --init-script renovate-plugin.gradle renovate\\"",
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"./gradlew --init-script renovate-plugin.gradle renovate\\"",
"options": Object {
"cwd": "localDir",
"encoding": "utf-8",
Expand Down
3 changes: 0 additions & 3 deletions lib/manager/gradle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
import { platform } from '../../platform';
import { LANGUAGE_JAVA } from '../../constants/languages';
import { DATASOURCE_MAVEN } from '../../constants/data-binary-source';
import { BinarySource } from '../../util/exec/common';
import { DatasourceError } from '../../datasource';

export const GRADLE_DEPENDENCY_REPORT_OPTIONS =
Expand All @@ -46,8 +45,6 @@ async function getGradleCommandLine(
): Promise<string> {
const args = GRADLE_DEPENDENCY_REPORT_OPTIONS;

if (config.binarySource === BinarySource.Docker) return `gradle ${args}`;

const gradlewPath = upath.join(cwd, 'gradlew');
const gradlewExists = await exists(gradlewPath);
const gradlewExecutable = gradlewExists && (await canExecute(gradlewPath));
Expand Down

0 comments on commit 5eff5b8

Please sign in to comment.