Skip to content

ArthurHub/release-android-library

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 1 commit ahead, 16 commits behind blundell:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

release-android-library

Remote script to create a maven compatible release of an android library (aar or jar) with optional dependency support.

This release comes in a zip or exploded form and is only created locally inside your own build folder. You can these use these files to release to JCenter or Maven Central.

Matching blog post: Publish Android library to BinTray (JCenter), AAR vs. JAR and optional dependency, update to original blog post by Blundell: Locally release an Android Library for JCenter or Maven Central inclusion.

####adding to your library

apply plugin: 'com.android.library'

ext {
    PUBLISH_GROUP_ID = 'com.namespace'
    PUBLISH_ARTIFACT_ID = 'example-library-name'
    PUBLISH_VERSION = '1.0.0'
}

android {
    // configs, flavors etc
}

// for AAR package
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-aar.gradle'

// or JAR package
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-jar.gradle'

dependencies {
    // dependencies
    // optional dependencies
}

####useage

./gradlew clean build generateRelease

####example output

 :engine:zipRelease
 :engine:generateRelease
 Release 1.0.0 can be found at /Users/Blundell/Developer/git_repo/ExampleAndroidLibrary/build/release/1.0.0/
 Release 1.0.0 zipped can be found /Users/Blundell/Developer/git_repo/ExampleAndroidLibrary/build/release-1.0.0.zip

 BUILD SUCCESSFUL
 
 Total time: 23.609 secs

About

Remote script to create a maven compatible release of an android library (aar or jar)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published