Skip to content

mfdeveloper/android-plugin-project-template

Repository files navigation

Forks Stargazers Issues project_license

Android Studio Plugin: Project template example

Table of Contents
  1. Built With
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. References

Product Name Screen Shot

About The Project

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.

Built With

  • Kotlin
  • Gradle
  • Intellij IDEA
  • Android Studio

(back to top)

Getting Started

Follow the steps below in order to install the required IDE's / tools and build the project

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/mfdeveloper/android-plugin-project-template.git [your-folder-name]
  2. Open Intellij IDEA, go to Settings => Plugins and make sure that you have Plugin DevKit installed

    Intellij Plugin DevKit

  3. Use Java JVM/JDK 17 or newer

    IDE Java JDK

    Usually it is $JAVA_HOME or Jetbrains Runtime bundled with IntelliJ or Android Studio

  4. Using Intellij IDEA, open the cloned repo

  5. Perform a Gradle sync in order to download the dependencies defined with Gradle version catalog on libs.versions.toml file

  6. You can verify that plugin and template are working as expected by running:

    ./gradlew runIde

Build and install the plugin

  1. Run the Gradle command below to generate the plugin .jar file:

    ./gradlew buildPlugin

    It should generate in your build/libs folder in the project (e.g build/libs/project-templates-example-0.0-SNAPSHOT.jar)

  2. Optionally, you can run the same command above from IntelliJ IDE Gradle panel (optional)

    Intellij: Gradle task build plugin

  3. Now open Android Studio, go to the plugins section and click on the gear or colon icon and select "Install from disk" option

    Android Studio: Install plugin from disk

  4. Select the .jar file you just created and restart the Android Studio.

  5. Now, create a new project. You should see the project template example as a scaffold option

    Android Studio: New project

(back to top)

Usage

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

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'feat(scope): Add some AmazingFeature')
  4. Push to the Branch (git push [your-remote-fork] feature/amazing-feature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

References

(back to top)

About

Android new project template plugin example created and customized from tutorial: https://www.sasikanth.dev/creating-project-templates-in-android-studio

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages