Initialise sub projects


Apologies I’m pretty new to Gradle and I’m trying to set up my first (hierarchical) multi-project build.

I have set up a very basic top level build file with a top level folder for 3 sub projects which seems to be okay (“gradle build” builds a build folder in each sub-folder).

I was hoping to do a “gradle init --type java-library” in the sub projects but (when I run with -info) I get a build failure with the message

"Task ‘init’ not found in project.

Is there a way to do the init or do I make need a folder structure template to copy i manually (I guess this is the only part of the init I really wanted).

I realise this is quite trivial but I thought I’d ask the question in case it points to a deeper misunderstanding!