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

builder:22 image doesn't feature any Gradle functionality #324

Closed
very-doge-wow opened this issue Mar 27, 2023 · 2 comments · Fixed by #381
Closed

builder:22 image doesn't feature any Gradle functionality #324

very-doge-wow opened this issue Mar 27, 2023 · 2 comments · Fixed by #381
Assignees

Comments

@very-doge-wow
Copy link

We've been using the builder-classic:22 image in the past to build our applications using Gradle.
Now we want to migrate to the builder:22 image as suggested by the docs in this repository. However, there don't seem to be any buildpacks present in this builder image which feature Gradle build functionality.

The old builder-classic image had a dedicated buildpack for this: https://github.com/heroku/heroku-buildpack-gradle
When taking a look into the builder-classic's builder.toml one will also find it:

[[buildpacks]]
  id = "heroku/gradle"
  uri = "https://cnb-shim.herokuapp.com/v1/heroku/gradle?version=0.0.0&name=Gradle"

When taking a look into the builder's builder.toml however, is seems to only feature the standard heroku/java buildpack:
https://github.com/heroku/builder/blob/main/builder-22/builder.toml

This buildpack however only supports Maven, which one can also verify by inspecting the heroku/java buildpack's docs here:
https://github.com/heroku/buildpacks-jvm/tree/main/meta-buildpacks/java

We can't seem to find any information on why the new builder image doesn't include Gradle functionality.
Is it not possible anymore to build Gradle apps using Heroku buildpacks?

@very-doge-wow very-doge-wow changed the title builder:22 image doesn't feature any Gradle functionality builder:22 image doesn't feature any Gradle functionality Mar 27, 2023
@very-doge-wow very-doge-wow changed the title builder:22 image doesn't feature any Gradle functionality builder:22 image doesn't feature any Gradle functionality Mar 27, 2023
@Malax
Copy link
Member

Malax commented Apr 19, 2023

Hello @very-doge-wow! :) Thanks for opening the issue. It is correct that builder:22 currently doesn't support Gradle apps. This is because we don't have a native implementation of a CNB for Gradle yet. We will have one soon, but currently we don't.

From this repos readme:

heroku/builder builder images feature Heroku's native Cloud Native Buildpacks. These buildpacks are optimized and make use of many CNB features. These builder images support Go, Java, Node.js, Python, Ruby, and Typescript codebases.

heroku/builder-classic builder images feature Heroku's classic platform buildpacks, shimmed for compatibility with the Cloud Native Buildpacks specification. These buildpacks don't take advantage of many CNB features and are less optimized, but offer a wider variety of languages and legacy language feature support.These builder images support Clojure, Go, Gradle, Java, Node.js, PHP, Python, Ruby, Scala, and Typescript codebases.

This means that you'll have to stick to the builder-classic:22 image for now if you need to build Gradle apps. I'll leave this issue open and will update it when the Gradle buildpack arrives so you (and others) can track this more easily.

As a workaround, you can use heroku/builder:22 together with the shimmed Gradle buildpack found in heroku/builder-classic:22 like so:

$ pack build myimage -B heroku/builder:22 -b heroku/jvm -b "https://cnb-shim.herokuapp.com/v1/heroku/gradle?version=0.0.0&name=Gradle" --path .

@Malax Malax self-assigned this Apr 19, 2023
@edmorley edmorley linked a pull request Sep 19, 2023 that will close this issue
@edmorley
Copy link
Member

This is now resolved as of #381 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants