GithubHelp home page GithubHelp logo

duanhong169 / bintray-gradle Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 14 KB

Publish Android library to bintray (jcenter).

License: Apache License 2.0

bintray bintrayupload jcenter-bintray jcenter

bintray-gradle's Introduction

bintray gradle scripts

Publish your android library to bintray (jcenter).

Setup

1. add required plugins to the project's classpath

In you project's build.gradle, add

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

inside the buildscript > dependencies:

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' // this line
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // and this 
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

2. set your bintray user keys locally

In your project's local.properties:

bintray.user= # your user name
bintray.apikey= # your api key
bintray.gpg.password= # your password

3. define the library-specific properties

In your library module's build.gradle, add:

ext {
    bintrayRepo = 'Hong'
    bintrayName = 'checkerboarddrawable'

    publishedGroupId = 'com.github.duanhong169'
    artifact = 'checkerboarddrawable'

    libraryDescription = 'A custom Drawable to use as background which embody "transparent", AKA checkerboard grid.'
    libraryVersion = '1.0.0'
    
    gitUrl = 'https://github.com/duanhong169/CheckerboardDrawable.git'
    siteUrl = 'https://github.com/duanhong169/CheckerboardDrawable'

    licenseName = 'Apache License 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

Edit the values to yours as needed.

4. apply the script:

In your library module's build.gradle, add:

apply from: 'https://raw.githubusercontent.com/duanhong169/bintray-gradle/master/bintray.gradle'

Or you can copy the bintray.gradle file into your library module's root directory, and apply from it by add:

apply from: 'bintray.gradle'

4.1 No transient dependency version

The default bintray.gradle will add the 'implementation' dependencies for your library automatically, so the library users only need to specify the dependency of your library. If this is not what you want, use the 'no transient' version:

apply from: 'https://raw.githubusercontent.com/duanhong169/bintray-gradle/master/bintray-no-transient.gradle'

Or:

apply from: 'bintray-no-transient'

Publish!

Just run:

./gradlew clean install bintrayUpload

in your project root path.

Example

See the project CheckerboardDrawable for example.

bintray-gradle's People

Contributors

duanhong169 avatar

Watchers

 avatar  avatar  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.