Loading src/gradlew.ts +8 −3 Changes for src/gradlew.ts: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' const IS_WINDOWS = process.platform === 'win32' export function wrapperFilename(): string { export function wrapperScriptFilename(): string { return IS_WINDOWS ? 'gradlew.bat' : 'gradlew' } Loading @@ -11,9 +11,14 @@ export function installScriptFilename(): string { return IS_WINDOWS ? 'gradle.bat' : 'gradle' } export function validateGradleWrapper(gradlewDirectory: string): void { export function locateGradleWrapperScript(buildRootDirectory: string): string { validateGradleWrapper(buildRootDirectory) return path.resolve(buildRootDirectory, wrapperScriptFilename()) } function validateGradleWrapper(buildRootDirectory: string): void { const wrapperProperties = path.resolve( gradlewDirectory, buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties' ) if (!fs.existsSync(wrapperProperties)) { Loading src/main.ts +1 −8 Changes for src/main.ts: 1 added line, 8 removed lines. Original line number Diff line number Diff line Loading @@ -59,14 +59,7 @@ async function resolveGradleExecutable( return path.resolve(workspaceDirectory, gradleExecutable) } const wrapperDirectory = core.getInput('wrapper-directory') const gradlewDirectory = wrapperDirectory !== '' ? path.resolve(workspaceDirectory, wrapperDirectory) : buildRootDirectory gradlew.validateGradleWrapper(gradlewDirectory) return path.resolve(gradlewDirectory, gradlew.wrapperFilename()) return gradlew.locateGradleWrapperScript(buildRootDirectory) } function resolveBuildRootDirectory(baseDirectory: string): string { Loading Loading
src/gradlew.ts +8 −3 Changes for src/gradlew.ts: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' const IS_WINDOWS = process.platform === 'win32' export function wrapperFilename(): string { export function wrapperScriptFilename(): string { return IS_WINDOWS ? 'gradlew.bat' : 'gradlew' } Loading @@ -11,9 +11,14 @@ export function installScriptFilename(): string { return IS_WINDOWS ? 'gradle.bat' : 'gradle' } export function validateGradleWrapper(gradlewDirectory: string): void { export function locateGradleWrapperScript(buildRootDirectory: string): string { validateGradleWrapper(buildRootDirectory) return path.resolve(buildRootDirectory, wrapperScriptFilename()) } function validateGradleWrapper(buildRootDirectory: string): void { const wrapperProperties = path.resolve( gradlewDirectory, buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties' ) if (!fs.existsSync(wrapperProperties)) { Loading
src/main.ts +1 −8 Changes for src/main.ts: 1 added line, 8 removed lines. Original line number Diff line number Diff line Loading @@ -59,14 +59,7 @@ async function resolveGradleExecutable( return path.resolve(workspaceDirectory, gradleExecutable) } const wrapperDirectory = core.getInput('wrapper-directory') const gradlewDirectory = wrapperDirectory !== '' ? path.resolve(workspaceDirectory, wrapperDirectory) : buildRootDirectory gradlew.validateGradleWrapper(gradlewDirectory) return path.resolve(gradlewDirectory, gradlew.wrapperFilename()) return gradlew.locateGradleWrapperScript(buildRootDirectory) } function resolveBuildRootDirectory(baseDirectory: string): string { Loading