Giter VIP home page Giter VIP logo

cortinico / kotlin-android-template Goto Github PK

View Code? Open in Web Editor NEW
1.7K 32.0 237.0 678 KB

Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️

License: MIT License

Kotlin 100.00%
template template-repository android-template kotlin-template android-app android-library kotlin-dsl gradle gradle-kotlin-dsl gradle-android-plugin ktlint detekt github-templates github-template github-actions kotlin-android-template android maven-central hacktoberfest

kotlin-android-template's Issues

Dependency Dashboard

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

Open

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

Detected dependencies

github-actions
.github/workflows/cleanup.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
  • ad-m/github-push-action v0.8.0
.github/workflows/gradle-wrapper-validation.yml
  • actions/checkout v4
  • gradle/wrapper-validation-action v2
.github/workflows/pre-merge.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
.github/workflows/publish-release.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
  • actions/upload-artifact v4
.github/workflows/publish-snapshot.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
  • actions/upload-artifact v4
gradle
buildSrc/src/main/java/Coordinates.kt
buildSrc/src/main/java/Extensions.kt
gradle.properties
settings.gradle.kts
build.gradle.kts
app/build.gradle.kts
buildSrc/settings.gradle.kts
buildSrc/build.gradle.kts
buildSrc/src/main/kotlin/cleanup.gradle.kts
buildSrc/src/main/kotlin/publish.gradle.kts
gradle/libs.versions.toml
  • junit:junit 4.13.2
  • androidx.activity:activity-compose 1.9.0
  • androidx.appcompat:appcompat 1.6.1
  • androidx.constraintlayout:constraintlayout 2.1.4
  • androidx.core:core-ktx 1.13.1
  • androidx.test:rules 1.5.0
  • androidx.test:runner 1.5.0
  • androidx.test.ext:junit 1.1.5
  • androidx.test.ext:junit-ktx 1.1.5
  • androidx.compose:compose-bom 2024.05.00
  • io.gitlab.arturbosch.detekt:detekt-formatting 1.23.6
  • androidx.test.espresso:espresso-core 3.5.1
  • com.android.tools.build:gradle 8.4.0
  • org.jetbrains.kotlin:kotlin-gradle-plugin 1.9.20
  • io.gitlab.arturbosch.detekt 1.23.6
  • com.github.ben-manes.versions 0.51.0
library-android/build.gradle.kts
library-compose/build.gradle.kts
library-kotlin/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

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

Device Debugger

🐛 Describe the bug

⚠️ Current behavior

✅ Expected behavior

💣 Steps to reproduce

📷 Screenshots

📱 Tech info

  • Device:
  • OS:
  • Library/App version:

Automatic replacement of AppId/package with Github Actions

I just bumped into the Jetbrains template for IntelliJ plugins (https://github.com/JetBrains/intellij-platform-plugin-template#getting-started). They have a Github Action that replaces the template values with values from the fork repo. I think it'd be a great addition to this template: it'll make sure users don't forget to remove the default value and save some manual configuration.

I'm not sure I'll have a lot of time to work on this but if someone feels like investigating Github Actions, I think that'd be a good fit.

Should use Compose BOM instead of reference to specific compose version

⚠️ Is your feature request related to a problem? Please describe

Nowdays it's recommended to use compose BOM versioning instead of hard references to using a specific version for all compose libraries. See https://developer.android.com/jetpack/compose/bom

💡 Describe the solution you'd like

A solution with version catalogs is explained at https://developer.android.com/jetpack/compose/bom#does_the_bom_work_with_version_catalogs. At work I am not using version catalogs yet so I can't get it working with a <2min PR 😢

🤚 Do you want to develop this feature yourself?

  • Yes
  • No (Note: At least not right now)

Add short directory descriptions to the readme

⚠️ Is your feature request related to a problem? Please describe

No clue why there are so many directories and what they do.

💡 Describe the solution you'd like

Add directory descriptions to readme or docs.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

Implementing a more comprehensive .gitignore

⚠️ Is your feature request related to a problem? Please describe

When getting started with the template and the first build new directories that are typically ignored for version control are not successfully ignored. (eg. various .xml files that relate to IDE config)

image

💡 Describe the solution you'd like

A more comprehensive .gitignore could be used such as this one could be beneficial to this template as it is one less thing to worry about.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

Where should I add e.g. Hilt Android and AndroidX Navigation Safe Args Gradle Plugins?

Should I add them inside buildSrc folder?

plugins {
    `kotlin-dsl`
}

repositories {
    google()
    mavenCentral()
}

dependencies {
    implementation(group = "com.android.tools.build", name = "gradle", version = "7.0.1")
    implementation(kotlin(module = "gradle-plugin", version = "1.5.30"))
    implementation(group = "com.google.dagger", name = "hilt-android-gradle-plugin", version = "2.38.1")
    implementation(group = "androidx.navigation", name = "navigation-safe-args-gradle-plugin", version = "2.3.5")
}

Thanks

Setup test coverage with jacoco/codecov

⚠️ Is your feature request related to a problem? Please describe

Add support for code coverage

💡 Describe the solution you'd like

Ideally we could setup jacoco + codecov to have an automated test report after every push/pr.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

This feature is up for grab

Need example of flavor in build.gradle.kts

⚠️ Is your feature request related to a problem? Please describe

In real project, we often have build flavor.

💡 Describe the solution you'd like

Add example of flavor staging and production in build.gradle.kts

🤚 Do you want to develop this feature yourself?

  • Yes
  • No
    (Sorry, I'm not so familiar with Kotlin Gradle script).

🐛 App Crash observed on factorial computation

🐛 Describe the bug

The Template App gets crashed when we click on compute button w/o entering any number in the EditText.

⚠️ Current behaviour

The Template App gets crashed when we click on compute button w/o entering any number in the EditText.

✅ Expected behaviour

The app should not get crashed.

💣 Steps to reproduce

  1. Run the App.
  2. Don't Enter any text in EditText.
  3. Click compute button.
  4. App gets crashed.

📷 Screenshots

device-2021-09-19-171849

📱 Tech info

  • Device: Google Pixel 3
  • OS: 10.0.0
  • Library/App version: 1.0.0

Replace ActivityTestRule with activityScenarioRule

⚠️ Is your feature request related to a problem? Please describe

ActivityTestRule inside the espresso test case is deprecated .

💡 Describe the solution you'd like

I believe we could add JUnit KTX extension library , and then:

@get:Rule val activityScenarioRule = activityScenarioRule<MainActivity>()

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

Add a flavor for Compose

⚠️ Is your feature request related to a problem? Please describe

One of the use cases of this repo is to build sample projects for submitting bug reports. This has been a painpoint since my development directory is full of different sample projects, and often I need to upgrade to the latest version of the tools I used.

💡 Describe the solution you'd like

Add a flavor for using Jetpack Compose. As Compose still evolves rapidly, and I have been struggling a lot to keep a repo up-to-date with all the build setup.
The flavor could be a subproject or a different branch: I am open to any suggestion.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

Suggestion for Danger Integration

⚠️ Is your feature request related to a problem? Please describe

I have just seen this repo and thought auto pr review bot could help developers productivity

💡 Describe the solution you'd like

as static analysis tools already integrated we could integrate danger to use static analysis tools output as a pr review.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No

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.