Git Product home page Git Product logo

ytemplate-android's Introduction

Y—Template

Y—Template aims to build your initial setup for your Android project quickly. The project provides you organised structures following MVVM architecture and also provides dependencies to support major functionalities which an Android project needs

The project includes a shell script file YTemplate.sh which renames and restructures the Android project based on the package name, model name and application name the Android project needs.

How to run the Y—Template script

  • The script file YTemplate.sh takes two inputs.
    • <package_name> is your app ID and should be in lower-case.
    • <application_name> Optional input.
    • ./YTemplate.sh <package_name> <application_name>.

Note: To run the shell script on Windows, one can run bash on ubuntu in Windows(starting from Windows 10) or GitWindows(https://git-scm.com/download/win). Type bash YTemplate.sh <package_name> <application_name>. It will execute the script.

Features

  • Compose UI.
  • HILT dependency for dependency injection.
  • Jetpack navigation.
  • Version catalog support for handling dependencies.
  • MVVM architecture.
  • Room database support for Local database.
  • Ktor for remote database connection.
  • Jacoco support for test report generation.

Architecture

Y—Template follows MVVM architecture. Different modules support different layers of MVVM architecture.

Multi-Module
  • app : Entry point for the app. Provides basic structures such as Application classes, Navigation components.
  • feature : Module where different features can be added with the respective fragment/activity classes and view-models.
  • core/domain(optional) : Module to add the domain/use case layers for different features which can be shared across multiple features.
  • core/data : Module to handle the data layer of the app. This layer supports both local database and remote database.
  • build-logic : Module where the dependencies are added for the Android project and contains build configuration logics for gradle tasks.

Single-Module
  • app : Module to add various features to the app and providing basic structures such as Application classes, Navigation components. This is a combined version of app and feature module of Multi-module architecture.
  • domain(optional) : Package structure that can be added under app module which would contain domain/use case files. This is similar to core/domain in multi-module
  • data : Package structure to handle the data layer placed under the app module. This is similar to core/data in multi-module
  • buildSrc : Module containing complex build logic encapsulated as a custom task.

How to generate test report

  • Generating jacoco debug test report
    • Gradle command clean build createMergedJacocoReport
      • From Android Studio
        • Open gradle menu bar from Android Studio right side panel
        • Click on the gradle icon and
        • In command popup window type clean build createMergedJacocoReport and press enter
        • Wait for the execution completion,
        • After successful execution report will be stored in 'project\build\reports\jacoco\html\index.html'.

How to generate dokka report

  • Gradle command single module clean build dokkaHtml for multi-module clean build dokkaHtmlMultiModule
    • From Android Studio
    • Open gradle menu bar from Android Studio right-side panel
    • Click on the gradle icon and
    • In the command popup window type dokkaHtml for multi-module dokkaHtmlMultiModule

How to check Ktlint

  • Gradle command for checking lint error ktlintCheck
  • Gradle command for formatting code ktlintFormat

License

    Copyright 2023 Y—Template

    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.

ytemplate-android's People

Contributors

akyml avatar anup350 avatar deepakyml avatar dkk009 avatar edwinpradeep avatar kikoso avatar renovate[bot] avatar sonymathewyml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ytemplate-android's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update coroutine (app.cash.turbine:turbine, org.jetbrains.kotlinx:kotlinx-coroutines-core, org.jetbrains.kotlinx:kotlinx-coroutines-test, org.jetbrains.kotlinx:kotlinx-coroutines-android, androidx.test:core-ktx)
  • Update firebase (com.google.firebase:firebase-bom, com.google.firebase:firebase-analytics)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • Update room to v2.5.2 (androidx.room:room-testing, androidx.room:room-ktx, androidx.room:room-compiler, androidx.room:room-runtime)
  • Update test (io.mockk:mockk-android, org.junit.jupiter:junit-jupiter, androidx.test:core, com.android.test, org.jetbrains.kotlin:kotlin-test-common)
  • Update android to v8.1.2 (com.android.library, com.android.application, com.android.tools.build:gradle)
  • Update androidx (androidx.core:core-ktx, androidx.navigation:navigation-testing, androidx.lifecycle:lifecycle-runtime-ktx, androidx.lifecycle:lifecycle-viewmodel-ktx)
  • Update androidxCompose (androidx.navigation:navigation-compose, androidx.lifecycle:lifecycle-viewmodel-compose, androidx.activity:activity-compose, androidx.compose:compose-bom)
  • Update dependencyInjection to v2.48 (com.google.dagger.hilt.android, com.google.dagger:hilt-android-testing, com.google.dagger:hilt-android, com.google.dagger:hilt-android-compiler)
  • Update kotlin to v1.9.10 (org.jetbrains.kotlin.jvm, org.jetbrains.kotlin.android, org.jetbrains.kotlin:kotlin-stdlib-common, org.jetbrains.kotlin:kotlin-serialization)
  • Update ktor (io.ktor:ktor-client-mock, io.ktor:ktor-client-logging, io.ktor:ktor-serialization-kotlinx-json, io.ktor:ktor-client-content-negotiation, io.ktor:ktor-client-okhttp, io.ktor:ktor-client-core, org.jetbrains.kotlinx:kotlinx-serialization-json)
  • Update others (org.jlleitschuh.gradle.ktlint, org.jetbrains.dokka, org.sonarqube, org.jacoco:org.jacoco.core)
  • Update all dependencies (actions/checkout, gradle, org.jetbrains.kotlin.kapt, org.jetbrains.kotlin.plugin.serialization)
  • Click on this checkbox to rebase all open PRs at once

Detected dependencies

github-actions
.github/workflows/android.yml
  • actions/checkout v3
  • actions/setup-java v3
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
app/build.gradle.kts
build-logic/settings.gradle.kts
build-logic/build.gradle.kts
core/analytics/analyticsLib/build.gradle.kts
core/analytics/firebase/build.gradle.kts
core/common/build.gradle.kts
core/data/build.gradle.kts
core/database/build.gradle.kts
core/network/build.gradle.kts
core/ui/build.gradle.kts
domain/build.gradle.kts
feature/post/build.gradle.kts
gradle/libs.versions.toml
  • com.android.tools.build:gradle 8.0.0
  • org.jacoco:org.jacoco.core 0.8.9
  • org.jetbrains.kotlin:kotlin-serialization 1.8.20
  • androidx.activity:activity-compose 1.7.1
  • androidx.appcompat:appcompat 1.6.1
  • androidx.compose:compose-bom 2023.04.01
  • androidx.core:core-ktx 1.10.0
  • androidx.navigation:navigation-compose 2.5.3
  • androidx.lifecycle:lifecycle-viewmodel-compose 2.6.1
  • androidx.lifecycle:lifecycle-viewmodel-ktx 2.6.1
  • androidx.navigation:navigation-testing 2.5.3
  • com.google.dagger:hilt-android-compiler 2.45
  • com.google.dagger:hilt-android 2.45
  • com.google.dagger:hilt-android-testing 2.45
  • androidx.hilt:hilt-navigation-compose 1.0.0
  • androidx.hilt:hilt-compiler 1.0.0
  • androidx.core:core-ktx 1.9.0
  • androidx.lifecycle:lifecycle-runtime-ktx 2.6.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.6.4
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.6.4
  • app.cash.turbine:turbine 0.12.3
  • androidx.room:room-runtime 2.5.1
  • androidx.room:room-compiler 2.5.1
  • androidx.room:room-ktx 2.5.1
  • androidx.room:room-testing 2.5.1
  • io.ktor:ktor-client-core 2.2.4
  • io.ktor:ktor-client-okhttp 2.2.4
  • io.ktor:ktor-client-content-negotiation 2.2.4
  • io.ktor:ktor-serialization-kotlinx-json 2.2.4
  • io.ktor:ktor-client-logging 2.2.4
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.5.0
  • io.ktor:ktor-client-mock 2.2.4
  • androidx.test:core 1.4.0
  • androidx.test:core-ktx 1.4.0
  • androidx.test.espresso:espresso-core 3.5.1
  • androidx.test.ext:junit-ktx 1.1.5
  • androidx.test:rules 1.5.0
  • androidx.test:runner 1.5.2
  • androidx.test:monitor 1.6.1
  • androidx.test.ext:junit 1.1.5
  • org.jetbrains.kotlin:kotlin-stdlib-common 1.8.20
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.6.4
  • org.jetbrains.kotlin:kotlin-test-common 1.8.20
  • org.junit.jupiter:junit-jupiter 5.9.2
  • com.google.firebase:firebase-analytics 21.2.2
  • com.google.firebase:firebase-bom 31.5.0
  • io.mockk:mockk-android 1.13.5
  • androidx.test:runner 1.5.2
  • com.android.application 8.0.0
  • org.jetbrains.kotlin.android 1.8.20
  • com.android.library 8.0.0
  • com.android.test 8.0.0
  • org.jetbrains.kotlin.jvm 1.8.20
  • org.jetbrains.kotlin.plugin.serialization 1.8.20
  • com.google.dagger.hilt.android 2.45
  • com.google.devtools.ksp 1.8.20-1.0.11
  • org.jetbrains.kotlin.kapt 1.8.20
  • org.sonarqube 4.0.0.2929
  • org.jetbrains.dokka 1.8.10
  • org.jlleitschuh.gradle.ktlint 11.3.1
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: //developer-notice

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.