1

I would like to create a regular Android project skeleton (e.g. create directories for all the sources, resources, flavors dimensions, etc; create manifest and xml stubs)

I know you can do this in a shell script, but I want to use Gradle, if it is possible at all.

Is that functionality built into Gradle, or do I have to write my own extension/plugin. How does Studio create the project skeleton in actuality?

I don't want to re-invent the wheel, but I do not want the IDE.

Ate Somebits
  • 287
  • 1
  • 18
  • 1
    "Is that functionality built into Gradle" -- no. "How does Studio create the project skeleton in actuality?" -- not by any means available to us from the command line, at least not in any documented form. – CommonsWare Feb 23 '19 at 21:16
  • My question is concerned with *automation* of these tasks, not what they are. – Ate Somebits Feb 23 '19 at 21:18

1 Answers1

1

Is that functionality built into Gradle

There is no task presently in the Android Plugin for Gradle for creating an Android project. Google used to distribute the android tool that could create a project, but that was for the old Ant-based build process, and Google has never delivered a replacement. The old android tool, while still available, is deprecated and no longer has a sub-command for creating a project.

How does Studio create the project skeleton in actuality?

It has its own template system that creates project files based upon the input that you provide via the new-project wizard. AFAIK this is just baked into the IDE; there is no documented CLI for accessing that functionality.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 1
    google still distributes the android tool... that's what you get in "tools-only" or "linux-dist".... – Ate Somebits Feb 26 '20 at 19:52
  • @Hatebit: Yes, but it is deprecated and does not fit the OP's requirements. I have updated the answer, though, as that was indeed a bug in the answer itself. Thanks for pointing this out! – CommonsWare Feb 26 '20 at 20:04
  • @Hatebit: Sorry, your original comment came a few days after the question and my answer, and I missed the connection. – CommonsWare Jun 04 '20 at 11:37
  • I don't mind, but I did change my id name at one point or the other. It's funny, those situations, we should compile these "bloopers" ha – Ate Somebits Jun 05 '20 at 17:56