blipinsk / library-template-android

A Kotlin + Android library template (with a sample project).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library Template (ANDROID)

This repository can be used as a template to create new GitHub repositories for Kotlin/Android libraries.

Code Formatting

./gradlew spotlessApply

Make sure you update spotless.license.kt and LICENSE.md to reflect your own license and author info! Other settings for this plugin can be tweaked in gradle/spotless_plugin_config.gradle.

Check if Dependencies Are Up-to-Date

./gradlew dependencyUpdates

Settings can be tweaked for this plugin within gradle/versions_plugin_config.gradle.

Publishing the Library to Bintray -> jCenter

This repository is setup to automatically publish to Bintray when you create a new release from GitHub.

But there are some pre-requisites:

  1. Update library_info.gradle to contain your library's information (group, description, etc.).
  2. From your GitHub repository settings, add secrets for BINTRAY_ORG, BINTRAY_USER, and BINTRAY_API_KEY. These will be used by the Bintray Release GitHub Actions workflow.
  3. With each release, update the version name and code in library_info.gradle.
  4. Once you've deployed to Bintray for the first time, you can link your Bintray repository to jCenter so people can depend on your library from Android projects without having to add any special Maven repositories.

How does releasing work?

  1. Automatically when you create a Release in your GitHub repository.
  2. OR if you set the three environment variables mentioned above, and invoke ./gradlew bintrayUpload.

About

A Kotlin + Android library template (with a sample project).

License:Apache License 2.0


Languages

Language:Kotlin 100.0%