Code Monkey home page Code Monkey logo

android-base-library's Introduction

Android Base Library Template

Template project to create an Android library, which is ready to be published locally and on Maven Central.

What's in this project template

  • Kotlin 1.4.32
  • KtLint
  • Android Testing setup for both unit and integration tests
  • Library project
  • Example app project which imports the library project
  • manifest.gradle which contains library metadata information and common dependencies between library project and demo app project.

Getting started

  • Fork this project
  • Clone it locally
  • Run ./rename and enter the required information
  • Done! Open example/build.gradle from your Android Studio and start writing your next awesome library!

Maven Central

Follow this guide: https://github.com/sky-uk/gradle-maven-plugin/#maven-central-publish

Release

You can release the library:

  • locally: ./release local. This is going to create a releases directory which can be used as a Maven Repository.
  • MavenCentral: ./release

Using the library

Once the library is published, you can use it like this:

implementation 'LIBRARY_PROJECT_GROUP:LIBRARY_NAME:1.0.0'

Using your GitHub Repository as a Maven Repository

Perform ./release local and then push the releases directory. In your dependencies, add this to your repositories section:

maven {
    content { includeGroup "LIBRARY_PROJECT_GROUP" }
    credentials(HttpHeaderCredentials.class) {
        name = "Authorization"
        value = "Bearer ${ System.getenv('GITHUB_TOKEN') }"
    }
    authentication { register("header", HttpHeaderAuthentication.class) }
    url "https://raw.githubusercontent.com/GITHUB_USER/GITHUB_REPOSITORY_NAME/master/releases"
}

You need to add an environment variable in your .bash_profile for the github repo to work:

export GITHUB_TOKEN="YOUR_TOKEN"

And then source .bash_profile

android-base-library's People

Contributors

gotev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

android-base-library's Issues

change bintray url

the url of bintray.com on readme is wrong, it is relative to github project

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.