Relative Content

Tag Archive for javagradle

How to draft a lib not depends on a specified dependency?

I will draft a java lib built under gradle. The lib will depend some common lib like commons-lang3. To make compilation work, a specified version (suppose 1.0.1) of commons-lang3 must be provided. But the lib consumer may already import a high version commons-lang3 (suppose 1.9.11).

How do I make a .env file in gradle

I’m trying to make a Gradle project, and I have sensitive information like database URL, password, and so on that I wouldn’t want uploaded to GitHub. I can’t seem to figure out how to make the env file. I’ve tried everything I can think of.

Constantly getting “java wants to make changes dialog”

I’m getting constantly a dialog box that asks me to enter an administrator’s username and password because “java wants to make changes”.
I believe this related to gradle because it usually pops up when I run gradle from terminal or when I build or refresh gradle in IntelliJ.
My MacOS version is Sonoma 14.5 but I had exactly the same issue previously with Ventura.
I have spent some time on Keychain Access trying to find a solution but I couldn’t get anywhere.
Any help will be so much appreciated.

How to append external VM args in gradle application plugin

I am using Gradle Application Plugin to run a main class. I know we can provide VM args using applicationDefaultJvmArgs. When I try to run the code using IntelliJ gradle run configs(or an external shell script) as gradle run by providing VM args -Dfoo=bar, they are not used in applicationDefaultJvmArgs.