How to silence logs in Java Image Builder (jib) - gradle

Using JIB in CI produces a mountain of logs because it prints progress, is there a simple way to turn them off?
In my case I am using the Gradle plugin, but I suspect it is the same issue with the Maven plugin

Related

IntelliJ IDEA on Mac. Is it possible to build my Kotlin Native project from the commandline without the IDE?

Quite new to all things Kotlin / IntelliJ / IDEA / gradle.
I'm comparing some code in about ten languages and the Kotlin Native version is the only one that I can't figure out how to build without using the IDE.
I started the project in IntelliJ IDEA by following guides on getting started with Kotlin and this was the recommended method.
By Googling, searching the IntelliJ help, and hunting here on StackOverflow I've been unable to find the answer. Most questions are about Multiplatform and phone apps. I'm just making a macOS commandline tool for now.
Is there a way included with IntelliJ IDEA to build a project form the terminal without starting up the IDE?
Or would it actually require me to use a completely different build system and just use Kotlin Native Mono install totally separate from the IntelliJ setup? Is no shared build system possible or would that be an even more advanced proposition?
There is no need to use the IntelliJ IDEA to build the Kotlin native project.
You should be able to use the gradle build or gradle nativeBinaries command from the Terminal to build the Gradle project.
Also, you could refer to the Kotlin native documentation here for details: https://kotlinlang.org/docs/native-gradle.html
I figured it out with a bit more trial and error.
IntelliJ IDEA seems to come with gradle but doesn't put it in the path. The IntelliJ IDEA project has set up a build system that will work with gradle as is though. You don't have to set up a new one from scratch.
In my case the gradle executable was at:
/System/Volumes/Data/Users/hippietrail/.gradle/wrapper/dists/gradle-7.4.2-bin/48ivgl02cpt2ed3fh9dbalvx8/gradle-7.4.2/bin/gradle
Running gradle using the full path with no parameters looks like it's doing something and takes a while, but doesn't build the project. To build it simply add the build parameter so in my case:
/System/Volumes/Data/Users/hippietrail/.gradle/wrapper/dists/gradle-7.4.2-bin/48ivgl02cpt2ed3fh9dbalvx8/gradle-7.4.2/bin/gradle build
It seems that gradle is not in the path by design and that the intended usage is via the gradlew that IntelliJ IDEA put in my project directory for me. This is an (explicit) wrapper script for gradle. So the more straightforward invocation is:
./gradlew build

Fast failing Gradle on authentication failure for Maven repo that uses BasicAuthentication

I am using a Maven repo inside a Gradle build that relies on BasicAuthentication to access its contents. If the credentials are incorrect or missing then the build fails indirectly, due to missing artefacts. However, I would much prefer it if the build could fail immediately in this case, e.g. by throwing an exception. I'm new to Gradle but despite searching the Gradle documentation I can't seem to find such a facility. I am using Gradle v7.1.1 inside Android Studio. Is this possible?

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0

I am developing an app using react-native and I am getting the error that depreceated gradle features were used making it in compatible with gradle 7.0 but I don't have gradle 7.0 I am using gradle 6.0.1. Can anyone suggest why is that.
Below is the image
It's just a deprecation warning giving you a heads-up that once you DO UPGRADE to 7.0 your build will stop working. In other words: you are using deprecated Gradle features which are scheduled for removal in v7.0 (next major version).
To remove the warning run your task with --warning-mode=all CLI parameter to see what those features are and refactor your build.gradle to eliminate usages of these features.

spring boot gradle plugin, application plugin and gradle 2.3 wrapper

After switching to gradle 2.3 for wrapper I am noticing a lot more goals being added from application plugin and included as part of the build process. Its creating zip files, tar files, doing script related stuff for all subprojects. This is not the intended behavior. I would like to keep it the way it was before such that unless I explicitly specify the application plugin goals like distZip, they shouldnt be invoked as part of my gradle build.
This behaviour's caused by Spring Boot's Gradle plugin. I've opened an issue. I don't fully understand why the switching from Gradle 2.2 to 2.3 triggers a change in behaviour, but your best bet at the moment would appear to be to stick with Gradle 2.2.

How should I set up a Maven/Groovy project in STS?

I have a project that uses some Java and some Groovy, and it's all built with Maven. We use the GMaven plugin to compile the Groovy. I've been using Eclipse and have got fed up with the "Plugin execution not covered by lifecycle" message that indicates Eclipse is incapable of doing what my command-line does (I've tried adding the ignore/execute config to fix it, but it never works properly), so I've switched to Spring Tool Suite, which claims to have full Groovy support. How should I set it all up? So far I've had exactly the same experience as with regular Eclipse, but given that SpringSource are responsible for Groovy, I figure there must be a way of doing it.
Have you read this thread?
http://forum.springsource.org/showthread.php?130130-Working-with-Mavenized-Grails-projects-in-GGTS-3-1-0-Updated-for-3-1-0-release/page2
For grails projects, you do not need to use gmaven or the groovy-eclipse-compiler. You must be using the 3.1.0 STS (which is not actually released yet, but you can get this
You also must be using Grails 2.1.1.
You can secretly get a 3.1.0 release build by going to this download page:
http://www.springsource.org/downloads/sts-ggts
Instead of clicking on the links, copy them and substitute 3.1.0 for 3.0.0.

Resources