问题
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.
回答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 The old android
tool that could create a project, but that was for the old Ant-based build process, and Google has never delivered a replacement.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.
来源:https://stackoverflow.com/questions/54846173/how-to-automate-android-project-skeleton-creation-no-android-studio