Giter VIP home page Giter VIP logo

android-template's Introduction

ArchiTecture logo

test lint

Clean architecture with 3 layers

  • Data (for database, API and preferences code)
  • Domain (for business logic and models)
  • Presentation (for UI logic, with MVVM)

ArchiTecture logo

Tests

  • Unit tests
  • Application tests
  • Activity tests (with Espresso)
  • Application has a testing flag

Other useful features

  • Dependency injection (with Hilt)
  • Reactive programming with Kotlin Flows
  • Google Material Design library
  • Margins and Insets with Insetter
  • Logging (with Timber)
  • Android architecture components to share ViewModels during configuration changes
  • Edge To Edge Configuration
  • Resource defaults
    • themes.xml - app themes
    • themes.xml (v29) - app themes (for better edgeToEdge)
    • colors.xml - colors for the entire project
    • styles.xml - widget styles
    • styles-text.xml - text appearances

Getting started

Script

  1. Download this repository extract and open the folder
  2. Run newproject.sh script to create a copy with the name you want
    • Example: ./newproject.sh -p com.example.project -t Project
  3. On app/build.gradle, update the dependencies Android Studio suggests
  4. On theme.xml & colors.xml set your application primary and secondary colors

And you're ready to start working on your new app.

Manual

  1. Download this repository extract and open the template folder on Android Studio
  2. Rename the app package io.bloco.template
  3. Check if the manifest package was renamed along with the package
  4. On app/build.gradle, change the applicationId to the new app package
  5. On app/build.gradle, update the dependencies Android Studio suggests
  6. On string.xml, set your application name
  7. On theme.xml & colors.xml set your application primary and secondary colors

And you're ready to start working on your new app.

Notes

  • Jetifier is enabled inside gradle.properties. Even though it's not necessary for the current dependencies, it was left enabled so anyone can start using the template without worrying when to turn it on. We do recommend you to check Can I drop Jetifier? when expanding the template.
  • Android Template contains .github/workflows for lint check and unit testing. You can easily take this project worflow and repurpose it with a few path changes, you can also find a commented example in test.yml for Instrumentation Testing and CodeCoverage that we advice to keep a clean project, you will however need to replace the secret keys with your own.

More

If you want to know more you can check our blog post.

android-template's People

Contributors

filmaluco avatar lilianafaustinodev avatar sdsantos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.