-
Notifications
You must be signed in to change notification settings - Fork 84
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
add support for Gradle builds in addition to Maven #118
Comments
@rhuss @ctron @apupier @chirino @jamesnetherton how do you like #121 ? It works e.g. with https://github.com/vorburger/s2i-java-example/tree/gradle (if you want to try, note "git checkout gradle" branch...) - which something like #120 could "prove" on the PR (and ensure future non-regression for). |
To work, this requires vorburger/s2i#gradle which includes: * fabric8io-images/s2i#146 * fabric8io-images/s2i#118
add Gradle build support, initial version (fixes #118)
add java/examples/gradle and cover it in test.sh (#118)
"/usr/local/s2i/assemble: line 214: ./gradlew: Permission denied" in minishift when try to build my own gradle project |
Hello, thanks for the interest. FYI I don't work on this project at all
anymore, so this is just a quick tip for you, I won't be able to follow up
further:
I'm assuming you are a Windows user, with a filesystem without permissions,
so locally gradlew in cmd.exe works.
From the error message, it looks like the "gradlew" script, which is in
YOUR project, the one you're trying to build, not this project here, is
just missing "chmod +x gradlew".. do that, from a Linux not Windows
environment (or WSL), commit it (FYI git preserves file permissions), and
it should work.
I'm happy to see that the work I did here a while ago is still useful to
people.
… |
Would there be any interest in a contribution to this project to build Gradle projects, in addition to Maven?
It doesn't seem that hard to add a something like this here:
note the use of
*.gradle*
in order to also allowbuild.gradle.kts
for the Gradle Kotlin DSL, and myProjectName.gradle.if present, then run something like
./gradlew --gradle-user-home=${S2I_ARTIFACTS_DIR}/gradle-home --project-cache-dir=${S2I_ARTIFACTS_DIR}/gradle-project-cache build
(TBC, probably with a GRADLE_ARGS and/or GRADLE_ARGS_APPEND, similar to the MAVEN_ARGS and MAVEN_ARGS_APPEND).I would limit this to support only the Gradle wrapper, and not even bother to add a Gradle distribution into the image. Just because using the wrapper is VERY widespread in Gradle based project (contrary to the maven-wrapper), and saves a ton of "which version" hassles, which for frequently releasing Gradle is even more important than with Maven (BTW surprised we're on ancient Maven 3.3.3 instead of latest 3.5.2 here...). The overhead of downloading a Gradle distribution IMHO is manageable with incremental builds by preserving the --gradle-user-home and --project-cache-dir accross builds; in the bigger picture of typically many many dependencies, the Gradle distribution itself is really just another such dependency.
BTW incremental builds with Gradle should be blazingly fast, not only avoiding dependency re-downloads, but truly incrementallying building code changes themselves (which never really works reliably in Maven; BTW I'm surprised we don't do clean package instead of just package here).
It should also include the equivalent of #110.
The text was updated successfully, but these errors were encountered: