{"id":20018994,"url":"https://github.com/android10/android-trinity","last_synced_at":"2025-10-08T07:09:54.774Z","repository":{"id":53780291,"uuid":"316355460","full_name":"android10/android-trinity","owner":"android10","description":"android-trinity is tiny proactive framework with much of the scaffolding code  required to start a new Android Application.","archived":false,"fork":false,"pushed_at":"2021-04-29T20:34:31.000Z","size":205,"stargazers_count":54,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-25T12:13:38.476Z","etag":null,"topics":["android","android-application","android-development","dev","developer-tools","development","mobile","mobile-app","mobile-development","mobile-first","mobile-friendly"],"latest_commit_sha":null,"homepage":"https://android-trinity.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-26T23:19:55.000Z","updated_at":"2024-03-18T07:54:35.000Z","dependencies_parsed_at":"2022-09-11T21:52:30.009Z","dependency_job_id":null,"html_url":"https://github.com/android10/android-trinity","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/android10/android-trinity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Fandroid-trinity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Fandroid-trinity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Fandroid-trinity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Fandroid-trinity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android10","download_url":"https://codeload.github.com/android10/android-trinity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Fandroid-trinity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903530,"owners_count":26065895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-application","android-development","dev","developer-tools","development","mobile","mobile-app","mobile-development","mobile-first","mobile-friendly"],"created_at":"2024-11-13T08:25:26.662Z","updated_at":"2025-10-08T07:09:54.745Z","avatar_url":"https://github.com/android10.png","language":"Kotlin","readme":"# android-trinity\nThis is tiny framework with much of the scaffolding code (with some nice utilities and prepared source code) required to start a new **Android Application.** \n\n## Background 📦\n\nYes, 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. \n\n## What does android-trinity provide? 🎨\n\n**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.   \n\n - `Kotlin DSL` by default at Gradle build system leve.\n - Static Analisis Code Report (Detekt).\n - Code Coverage Report (Jacoco).\n - Base Classes: [`BaseActivity`](https://github.com/android10/android-trinity/blob/main/app/src/main/kotlin/com/fernandocejas/sample/core/platform/BaseActivity.kt) and [`BaseFragments`](https://github.com/android10/android-trinity/blob/main/app/src/main/kotlin/com/fernandocejas/sample/core/platform/BaseFragment.kt).\n - Toolbar with styles pre-defined.\n - Pre-setup Test clases: [`UnitTest`](https://github.com/android10/android-trinity/blob/main/app/src/test/kotlin/com/fernandocejas/sample/UnitTest.kt), [`AndroidTest`](https://github.com/android10/android-trinity/blob/main/app/src/test/kotlin/com/fernandocejas/sample/AndroidTest.kt), [`AcceptanceTest`](https://github.com/android10/android-trinity/blob/main/app/src/androidTest/kotlin/com/fernandocejas/sample/AcceptanceTest.kt).\n - Pre-compiled Gradle Scripts (`buildScr` folder) organized by aspects:\n    - [`compilation.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/compilation.gradle.kts)\n    - [`infrastructure.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/infrastructure.gradle.kts)\n    - [`quality.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/quality.gradle.kts)\n    - [`variants.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/variants.gradle.kts)\n - Dependencies Management in one place: [`Dependencies.kt`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/Dependencies.kt)\n - LeakCanary for leaks detection.\n - Pre-defined Build Variants (check [`variants.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/variants.gradle.kts) file)\n    - Build Types:\n        - `DEBUG`\n        - `RELEASE`\n    - Product Flavors:\n        - `DEV`\n        - `INTERNAL`\n        - `PUBLIC`\n - Kotlin Coroutines\n - A [Compact Feature Flags Framework](https://github.com/android10/android-trinity/pull/1)\n\n## What does android-trinity NOT INCLUDE? (likely to change if necessary in future versions)\n\n - DI. You should choose your Dependency Injection Framework.\n - NO Navigation Framework. \n - NO `LiveData` and `ViewModel` libraries since some Engineers might use other approaches at UI level like MVI, MVP, etc.\n - NO Kotlin Flow.\n - NO UI Layouts for Tablet or Android TV support. \n\n## Pre-defined Gradle Tasks\n\n - `./gradlew runStaticAnalysis`\n - `./gradlew runTestCoverage`\n - `./gradlew runUnitTests`\n - `./gradlew runAcceptanceTests`\n - `./gradlew compileApp`\n - `./gradlew runApp`\n \n## How to use it 👣\n\nAt 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.\n\n - **STEP 1:** Click on [![Use this template](https://img.shields.io/badge/-Use%20this%20template-brightgreen)](https://github.com/android10/android-trinity/generate) to create a new repo. \n - **STEP 2:** Import the project in Android Studio\n - **STEP 3:** Rename packages according to your needs. `com.fernandocejas.sample` by default. \n\n## Using Test Helpers\n\nLet'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:\n \n- `UnitTest.kt`: Unit Test base class which setup mocks for you (You only use the `@Mockk` annotation)\n\n```kotlin \nclass FeatureFlagTest : UnitTest() {\n\n    @Mockk prival val yourMock\n\n    @Test\n    fun `given a feature flag, when it is activated, then executes given logic block`() {\n        val activeFlag = ActiveFeatureFlag()\n        val fakeNavigator = mockk\u003cNavigator\u003e(relaxed = true)\n\n        activeFlag whenActivated {\n            fakeNavigator.doSomething()\n            fakeNavigator.navigateToActiveFeature()\n            fakeNavigator.doSomething()\n        }\n\n        verify(exactly = 1) { fakeNavigator.navigateToActiveFeature() }\n        verify(exactly = 2) { fakeNavigator.doSomething() }\n    }\n```\n\n- `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](https://github.com/robolectric/robolectric).\n\n```kotlin \nclass YourTestClass : AndroidTest() {\n\n    @Mockk prival val yourMock\n\n    @Test\n    fun `given something, when something happens, then do something`() {\n        TODO()\n    }\n```\n\n- `AcceptanceTest.kt`: UI Test base class which setup [Espresso](https://developer.android.com/training/testing/espresso) for you\n\n```kotlin \nclass MainActivityTest: AcceptanceTest(MainActivity::class.java) {\n\n    @Test\n    fun checkToolBarTest() {\n        onView(withId(R.id.toolbar)).check(matches(isDisplayed()))\n    }\n}\n```\n\n## Feature Flags\n\nAndroid-trinity includes a simple offline feature flags framework with a very simple api generated at compile time. \nIf you want more information, refer to the [introduced pull request](https://github.com/android10/android-trinity/pull/1). (TODO: Add more documentation)\n\nExample of its usage:\n```kotlin\nFlag.Hello whenActivated { displayGreeting(R.string.hello) }\n```\n\n\n## Quality Reports: Static Analysis\n\n - The tool chosen here is [Detekt](https://github.com/detekt/detekt) due to its nature for Kotlin. \n - The gradlew task and its configuration could be found inside [`quality.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/quality.gradle.kts) file.\n - cconfiguration Rules are in [config/detekt/detekt.yml](https://github.com/android10/android-trinity/blob/main/config/detekt/detekt.yml).\n\n## Quality Reports: Code Coverage\n\n- The tool chosen here is [Jacoco](https://github.com/jacoco/jacoco) due to its nature and popularity in the community. \n - The gradlew task and its configuration could be found inside [`quality.gradle.kts`](https://github.com/android10/android-trinity/blob/main/buildSrc/src/main/kotlin/scripts/quality.gradle.kts) file.\n\n## TODO List\n\n- [ ] Gradle Tasks for Publishing to Google Play: [App Bundles](https://developer.android.com/guide/app-bundle).\n- [ ] Automate the process from **How to Use** section: Idea: `./gradlew setupProject`\n- [X] Local Feature Flags.\n- [ ] Rename default packages to `io.android-trinity` or `io.android.trinity`.\n- [ ] ???\n- [ ] ???\n\n## How to Contribute\n\nNothing 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](https://github.com/android10/android-trinity/issues) and label it properly: **Bug**, **Enhancement**, etc.. or send a [PR](https://github.com/android10/android-trinity/pulls). Please both with a good descriptions of the intention, in order to facilitate review\n\n## License\n\n    Copyright 2021 Fernando Cejas\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n![http://www.fernandocejas.com](https://github.com/android10/Sample-Data/blob/master/android10/android10_logo_big.png)\n\n\u003ca href=\"https://www.buymeacoffee.com/android10\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n","funding_links":["https://www.buymeacoffee.com/android10"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid10%2Fandroid-trinity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid10%2Fandroid-trinity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid10%2Fandroid-trinity/lists"}