Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildpack should look for gradlew in the same place as build.gradle #338

Open
dmikusa opened this issue Dec 2, 2024 · 0 comments
Open
Labels
type:enhancement A general enhancement

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Dec 2, 2024

Describe the Enhancement

Possible Solution

Presently, the buildpack looks for gradlew in the application root (i.e. /workspace/gradlew). If it doesn't exist, it falls back to installing the latest version of Gradle.

A case was reported where gradlew was not in the application root, but a sub-directory. It was, however, located next to build.gradle. After we check for gradlew in the app root, we should then check the directory where build.gradle exists (if it's different). Then fall back to installing gradle as we do now.

We might also want to consider checking the adjusted working directory (see #339) for a possible location of gradlew also.

This should work although there is a slight risk to backwards compatibility. If a user happens to have a build.gradle and a gradlew that was not previously being found, they'll experience different behavior. This seems like a very unlikely situation though and very low risk.

Motivation

Make more use cases "just work".

@dmikusa dmikusa added the type:enhancement A general enhancement label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant