Table of Contents
A simple Android Studio Plugin with file templates in order to create new projects from: File => New => New Project menu. This template was created following Creating project templates for Android Studio tutorial, with extra customizations.
Follow the steps below in order to install the required IDE's / tools and build the project
- Download and install Intellij Toolbox App (Optional)
- Download and install Intellij IDEA (Community Edition is preferred)
- Download and install Android Studio
-
Clone the repo
git clone https://github.com/mfdeveloper/android-plugin-project-template.git [your-folder-name]
-
Open Intellij IDEA, go to Settings => Plugins and make sure that you have Plugin DevKit installed
-
Use Java
JVM/JDK 17or newerUsually it is
$JAVA_HOMEorJetbrains Runtimebundled with IntelliJ or Android Studio -
Using Intellij IDEA, open the cloned repo
-
Perform a Gradle sync in order to download the dependencies defined with Gradle version catalog on libs.versions.toml file
-
You can verify that plugin and template are working as expected by running:
./gradlew runIde
-
Run the Gradle command below to generate the plugin
.jarfile:./gradlew buildPlugin
It should generate in your
build/libsfolder in the project (e.gbuild/libs/project-templates-example-0.0-SNAPSHOT.jar) -
Optionally, you can run the same command above from IntelliJ IDE Gradle panel (optional)
-
Now open Android Studio, go to the plugins section and click on the gear or colon icon and select "Install from disk" option
-
Select the
.jarfile you just created and restart the Android Studio. -
Now, create a new project. You should see the project template example as a scaffold option
You can use this template/scaffold repository to create Android Studio plugins for:
- Create new android projects with custom structures and dependency libraries (custom
Fragments,Composable's, Navigation libraries...) - New android projects with custom modules (e.g. feature or layer modules)
- Create project templates for Kotlin multiplatform and/or Compose multiplatform projects
- Use it as a base for any kind of Android Studio plugin
- Add git commitizen to the project
- Upgrade Intellij Platform Gradle Plugin to version (
2.x) - Adopt Gradle version catalog
- Use structure files (classes, interfaces...) with template variables instead of strings
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag enhancement.
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature) - Commit your Changes (
git commit -m 'feat(scope): Add some AmazingFeature') - Push to the Branch (
git push [your-remote-fork] feature/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.




