All Projects → android10 → android-trinity

android10 / android-trinity

Licence: Apache-2.0 license
android-trinity is tiny proactive framework with much of the scaffolding code required to start a new Android Application.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to android-trinity

Android-daily-read-tips
log for articles and info in android for every developer
Stars: ✭ 13 (-70.45%)
Mutual labels:  mobile-app, android-development, android-application, mobile-development
addIt
Simple addition game made with Flutter for Mobile and Web using BLOC pattern
Stars: ✭ 16 (-63.64%)
Mutual labels:  mobile-app, android-application, mobile-development
Mvvm Reddit
A companion project for our blog post on better Android software development using MVVM with RxJava.
Stars: ✭ 106 (+140.91%)
Mutual labels:  mobile-app, android-application, mobile-development
Shipr-Community-Android
Shipr Social is the Multi Platform Chat Project for Developers
Stars: ✭ 21 (-52.27%)
Mutual labels:  android-development, android-application, developer-tools
Kotlin Android Scaffolding
An android project structure using kotlin and most common libraries.
Stars: ✭ 53 (+20.45%)
Mutual labels:  development, android-development, android-application
Buildapks
Really quickly build APKs on handheld device (smartphone or tablet) in Amazon, Android, Chromebook and Windows📲 See https://buildapks.github.io/docsBuildAPKs/setup to start building APKs.
Stars: ✭ 218 (+395.45%)
Mutual labels:  mobile-app, android-development, android-application
PlantShopUI-Android
Check out the new style for App Design aims for the Online Plant Shop Service using jetpack compose...😉😀😁😎
Stars: ✭ 29 (-34.09%)
Mutual labels:  development, android-development, android-application
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+5715.91%)
Mutual labels:  development, dev, developer-tools
Prototype.Forms.Controls
This sample app contains a random mixture of Xamarin/Xamarin.Forms controls, views, and functionality snippets that I've created.
Stars: ✭ 21 (-52.27%)
Mutual labels:  mobile-app, mobile-development
harika
Offline-, mobile-first graph note-taking app focused on performance with the knowledgebase of any scale
Stars: ✭ 111 (+152.27%)
Mutual labels:  mobile-first, mobile-friendly
react-native-animated-radio-button
Fully customizable animated radio button for React Native
Stars: ✭ 25 (-43.18%)
Mutual labels:  development, mobile-app
software-systems-architecture
A collection of descriptions of the architecture that various systems use.
Stars: ✭ 24 (-45.45%)
Mutual labels:  mobile-app, mobile-development
react-native-text-area
Simple and easy to use TextArea for React Native.
Stars: ✭ 20 (-54.55%)
Mutual labels:  development, mobile-app
react-native-tab-bars
Fully customizable navigation tab bar for React Native
Stars: ✭ 16 (-63.64%)
Mutual labels:  mobile-app, mobile-development
CircularDialogs
Android dialog library to give user feedback about the common operations like Success, Warning and Errors.
Stars: ✭ 35 (-20.45%)
Mutual labels:  android-development, mobile-development
Manji
Manji is a mobile application built to help people learning Japanese learn about Kanji.
Stars: ✭ 142 (+222.73%)
Mutual labels:  mobile-app, mobile-development
android-clean-code
Writing Clean Code in Android
Stars: ✭ 22 (-50%)
Mutual labels:  mobile-app, android-development
CrossMobile
Create native iOS, Android, Windows Phone and Desktop applications in Java. Write it once, and produce sophisticated multiplatform applications.
Stars: ✭ 48 (+9.09%)
Mutual labels:  mobile-app, mobile-development
FluentERP
ERP mobile application for Android with a support for SAP-like T-codes!
Stars: ✭ 18 (-59.09%)
Mutual labels:  mobile-app, mobile-development
xkcdViewer
A beautiful xkcd viewer app written with Flutter
Stars: ✭ 60 (+36.36%)
Mutual labels:  mobile-app, android-application

android-trinity

This is tiny framework with much of the scaffolding code (with some nice utilities and prepared source code) required to start a new Android Application.

Background 📦

Yes, android studio might create a project for you, but there are missing parts, which I ALWAYS end up adding to every single project I create. This tiny Framework (I would say still scaffolding code) aims to solve this by making easy and fast to create an android project with the fundamental building blocks. Check the TODO section below for more information on the evolution and progress.

What does android-trinity provide? 🎨

Freedom. It uses standard tools but organized in such a way that facilitates android development. You can refactor or change anything but the idea is to have a robust starting point. All the wiring is done for you with the flexibility of being modified according to your needs.

What does android-trinity NOT INCLUDE? (likely to change if necessary in future versions)

  • DI. You should choose your Dependency Injection Framework.
  • NO Navigation Framework.
  • NO LiveData and ViewModel libraries since some Engineers might use other approaches at UI level like MVI, MVP, etc.
  • NO Kotlin Flow.
  • NO UI Layouts for Tablet or Android TV support.

Pre-defined Gradle Tasks

  • ./gradlew runStaticAnalysis
  • ./gradlew runTestCoverage
  • ./gradlew runUnitTests
  • ./gradlew runAcceptanceTests
  • ./gradlew compileApp
  • ./gradlew runApp

How to use it 👣

At the time being there are a couple of manual steps involved since we are at a very early stage. But we believe in sofware evolution right? So stay tuned and check both the How to Contribute and TODO List sections.

  • STEP 1: Click on Use this template to create a new repo.
  • STEP 2: Import the project in Android Studio
  • STEP 3: Rename packages according to your needs. com.fernandocejas.sample by default.

Using Test Helpers

Let's say you want to write tests (and you should ALWAYS do), As mentioned there are 3 classes which come into play and here examples of their usage:

  • UnitTest.kt: Unit Test base class which setup mocks for you (You only use the @Mockk annotation)
class FeatureFlagTest : UnitTest() {

    @Mockk prival val yourMock

    @Test
    fun `given a feature flag, when it is activated, then executes given logic block`() {
        val activeFlag = ActiveFeatureFlag()
        val fakeNavigator = mockk<Navigator>(relaxed = true)

        activeFlag whenActivated {
            fakeNavigator.doSomething()
            fakeNavigator.navigateToActiveFeature()
            fakeNavigator.doSomething()
        }

        verify(exactly = 1) { fakeNavigator.navigateToActiveFeature() }
        verify(exactly = 2) { fakeNavigator.doSomething() }
    }
  • AndroidTest.kt: Integration Test base class which setup mocks for you (You only use the @Mockk annotation). You might use this classes when they are Android Components involved. It is backed up by Robolectric.
class YourTestClass : AndroidTest() {

    @Mockk prival val yourMock

    @Test
    fun `given something, when something happens, then do something`() {
        TODO()
    }
  • AcceptanceTest.kt: UI Test base class which setup Espresso for you
class MainActivityTest: AcceptanceTest(MainActivity::class.java) {

    @Test
    fun checkToolBarTest() {
        onView(withId(R.id.toolbar)).check(matches(isDisplayed()))
    }
}

Feature Flags

Android-trinity includes a simple offline feature flags framework with a very simple api generated at compile time. If you want more information, refer to the introduced pull request. (TODO: Add more documentation)

Example of its usage:

Flag.Hello whenActivated { displayGreeting(R.string.hello) }

Quality Reports: Static Analysis

Quality Reports: Code Coverage

  • The tool chosen here is Jacoco due to its nature and popularity in the community.
  • The gradlew task and its configuration could be found inside quality.gradle.kts file.

TODO List

  • Gradle Tasks for Publishing to Google Play: App Bundles.
  • Automate the process from How to Use section: Idea: ./gradlew setupProject
  • Local Feature Flags.
  • Rename default packages to io.android-trinity or io.android.trinity.
  • ???
  • ???

How to Contribute

Nothing is set in stone here and things can change and evolve based on the community work and requirements. So if you want to contribute, feel free to open an issue and label it properly: Bug, Enhancement, etc.. or send a PR. Please both with a good descriptions of the intention, in order to facilitate review

License

Copyright 2021 Fernando Cejas

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

http://www.fernandocejas.com

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].