Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle init isn't interactive

I am using gradle through command line for the first time. I am running the latest version of Ubuntu. My professor's instructions indicate that upon typing "gradle init" I should be prompted to say what type of project it is as well as the language, etc. Mine simply skips all of that and says "build successful" afterwards, my professors' file ends up with the proper directory structure and mine only has the basic root folders. From the quick searches I've done, I see that there is a difference between interactive and non-interactive responses, but I can't find anything regarding how to make it interactive.

like image 436
Mathemagician Avatar asked Apr 23 '26 15:04

Mathemagician


2 Answers

My issue was I installed gradle with sudo apt install gradle which installs a very old version. Instead you can install sdk and then run sdk install gradle

like image 58
Ben W Avatar answered May 02 '26 12:05

Ben W


I had this problem, too. Seems to be a bug.

You can tell gradle non-interactively what type to create, for example:

gradle init --type java-library

Other build types

like image 21
Code ninetyninepointnine Avatar answered May 02 '26 12:05

Code ninetyninepointnine