GithubHelp home page GithubHelp logo

ashtanko / android-base-skeleton Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 148 KB

WIP

License: MIT License

Kotlin 99.30% Makefile 0.70%
android-template detekt detekt-plugin junit4 junit5 kotlin kotlin-android kotlin-template ktlint multimodule-android-app

android-base-skeleton's Introduction

android-base-skeleton

Build Android CI

This is your new Kotlin Android Project! Happy hacking!

Template ToDo list ๐Ÿ‘ฃ

  • Create a new template project.
  • Choose a LICENSE.
  • Set your ORG_GRADLE_PROJECT_NEXUS_USERNAME, ORG_GRADLE_PROJECT_NEXUS_PASSWORD , ORG_GRADLE_PROJECT_SIGNING_KEY and ORG_GRADLE_PROJECT_SIGNING_PWD secrets in Settings.
  • Code some cool apps and libraries ๐Ÿš€.

Features ๐ŸŽจ

  • 100% Kotlin-only template.
  • 3 Sample modules (Android app, Android library, Kotlin library).
  • Sample Espresso, Instrumentation & JUnit tests.
  • 100% Gradle Kotlin DSL setup.
  • CI Setup with GitHub Actions.
  • Publish to Maven Central with Github Actions.
  • Dependency versions managed via buildSrc.
  • Kotlin Static Analysis via detekt and ktlint.
  • Issues Template (bug report + feature request).
  • Pull Request Template.

Gradle Setup ๐Ÿ˜

This template is using Gradle Kotlin DSL as well as the Plugin DSL to setup the build.

Dependencies are centralized inside the Dependencies.kt file in the buildSrc folder. This provides convenient auto-completion when writing your gradle files.

Static Analysis ๐Ÿ”

This template is using detekt to analyze the source code, with the configuration that is stored in the detekt.yml file (the file has been generated with the detektGenerateConfig task). It also uses the detekt-formatting plugin which includes the ktlint rules (see https://detekt.dev/docs/rules/formatting/).

CI โš™๏ธ

This template is using GitHub Actions as CI. You don't need to setup any external service and you should have a running CI once you start using this template.

There are currently the following workflows available:

Publishing ๐Ÿš€

The template is setup to be ready to publish a library/artifact on a Maven Repository.

For every module you want to publish you simply have to add the publish plugin:

plugins {
    publish
}

To Maven Central

In order to use this template to publish on Maven Central, you need to configure some secrets on your repository:

Secret name Value
ORG_GRADLE_PROJECT_NEXUS_USERNAME The username you use to access Sonatype's services (such as Nexus and Jira)
ORG_GRADLE_PROJECT_NEXUS_PASSWORD The password you use to access Sonatype's services (such as Nexus and Jira)
ORG_GRADLE_PROJECT_SIGNING_KEY The GPG Private key to sign your artifacts. You can obtain it with gpg --armor --export-secret-keys <[email protected]> or you can create one key online on pgpkeygen.com. The key starts with a -----BEGIN PGP PRIVATE KEY BLOCK-----.
ORG_GRADLE_PROJECT_SIGNING_PWD The passphrase to unlock your private key (you picked it when creating the key).

The template already sets up Dokka for project documentation and attaches -sources.jar to your publications, via the new AGP publishing DSL.

Once set up, the following workflows will take care of publishing:

  • Publish Snapshot - To publish -SNAPSHOT versions to Sonatype. The workflow is setup to run either manually (with workflow_dispatch) or on every merge.
  • Publish Release - Will publish a new release version of the libraries to Maven Central on tag pushes. You can trigger the workflow also manually if needed.

To Jitpack

If you're using JitPack, you don't need any further configuration and you can just configure the repo on JitPack.

You probably want to disable the [Publish Snapshot] and Publish Release workflows (delete the files), as Jitpack will take care of that for you.

Contributing ๐Ÿค

Feel free to open a issue or submit a pull request for any bugs/improvements.

android-base-skeleton's People

Contributors

actions-user avatar ashtanko avatar

Watchers

 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.