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

Overview

release-android-library

🚨 Deprecated 🚨

This script is deprecated in favour of: novoda/bintray-release


Remote script to create a maven compatible release of an android library (aar). 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 here: http://blog.blundellapps.co.uk/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.blundell'
    PUBLISH_ARTIFACT_ID = 'example-library-name'
    PUBLISH_VERSION = '1.0.0'
}

android {
    // configs, flavors etc
}

dependencies {
    // dependencies
}

// Copy the file locally and use
apply from: 'android-release-aar.gradle'
// or use the remote copy to keep update with latest changes
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'

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
Comments
  • Gradle plugin 1.1.0 -- Cannot call getBootClasspath() before setTargetInfo() is called

    Gradle plugin 1.1.0 -- Cannot call getBootClasspath() before setTargetInfo() is called

    I'm having an issue syncing my project with my gradle files.

    Here's my library module's build.gradle file:

    apply plugin: 'com.android.library'
    
    ext {
        PUBLISH_GROUP_ID = 'me.mattlogan.artiste'
        PUBLISH_ARTIFACT_ID = 'artiste'
        PUBLISH_VERSION = '2.0.1'
    }
    
    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.2"
    
        defaultConfig {
            minSdkVersion 10
            targetSdkVersion 21
            versionCode 2
            versionName "2.0.1"
        }
    }
    
    apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
    

    When I try to sync my project, I see the following error:

    screen shot 2015-02-22 at 2 56 32 pm

    This is definitely caused by the android-release-aar task, as the error goes away when I comment out that line.

    opened by mattlogan 3
  • Bintray error - Add a POM file to the latest version of your package

    Bintray error - Add a POM file to the latest version of your package

    I am trying to use your remote gradle script and it seems to work great. A zip file is created with the structure as described in the blog post.

    But when I try to add my package to JCenter (manually from the Bintray site) I get the "Add a POM file to the latest version of your package" error.

    I can see the pom inside the zip but still something is wrong.. maybe the name of the pom file? Any help will be appreciated

    opened by rankorn 3
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 2
  • Include local project library

    Include local project library

    I have a project library included in my library. Is there a way to have it include in the release ?

    Just to be clear, how will gradle manage library dependencies like compile 'com.squareup.picasso:picasso:2.5.0' ? Will gradle download it ?

    opened by HugoGresse 2
  • Task 'generateRelease' is ambiguous in root project

    Task 'generateRelease' is ambiguous in root project

    After running ./gradlew clean build generateRelease I get the following error message:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Task 'generateRelease' is ambiguous in root project <my project name>. Candidates are: 'generateReleaseAssets', 'generateReleaseBuildConfig', 'generateReleaseResValues', 'generateReleaseResources', 'generateReleaseSources'.
    
    * Try:
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 4.09 secs
    
    opened by mattlogan 2
  • Task ordering

    Task ordering

    I am not sure this is really a bug, and I must admit I haven't tried your gradle script yet. But reading the source, I am wondering: Shouldn't you put zipRelease.mustRunAfter uploadArchives somewhere? I have the impression that with the current code, the zipping could happen before the 'mavening'.

    opened by BoD 2
  • Remove parts not required from zip

    Remove parts not required from zip

    Hi,

    maybe a simple question: Is there a way to exclude artifacts from being bundled into the final ZIP? E.g. I don't want to publish sources and javadoc and debug AAR, so it is a bit cumbersome and error prone to remove them later on from the ZIP

    opened by ghost 1
  • Add script for building jars from java modules

    Add script for building jars from java modules

    As far as I can tell, the existing scripts in this repo only work for android modules. This slightly-modified script should do the same thing, but for java-only modules.

    opened by mattlogan 1
  • Build fails at generating javadoc if custom libs included

    Build fails at generating javadoc if custom libs included

    I use recyclerview lib and get an errors like "package android.support.v7.widget not found", "cannot resolve RecyclerView" etc. when run "gradlew clean build generateRelease". Process fails on javadoc task.

    opened by j2esu 1
  • optional dependency and JAR support

    optional dependency and JAR support

    • added support for optional dependency
    • created android-release-jar.gradle that create package with jar to deploy jar package and not aar

    more info: http://theartofdev.com/2015/02/19/publish-android-library-to-bintray-jcenter-aar-vs-jar-and-optional-dependency/

    Thx for the script, it was really helpful.

    opened by ArthurHub 1
Owner
Paul Blundell
hacker, mostly Android apps and libs, check the code it don't lie
Paul Blundell
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
知乎 Android 团队使用的 Java 库静态代码检查工具,支持目录、.jar、.aar 格式,可通过配置文件添加检查策略

SimpleWalker 知乎 Android 团队使用的 Java 库静态代码检查工具,支持目录、.zip、.aar 格式,可通过配置文件添加检查策略。 主要用于检查 Android 应用的三方依赖是否有调用隐私接口。 使用方法 项目工程中 release/ 目录下是最新版本的可执行文件,help

zkw周柯文 87 Dec 20, 2022
Modulearchive - Improve the efficiency of compiling Android.Package module as AAR and cache it

ModuleArchive 一个可以提升Android编译效率的Gradle小插件 在多module工程下,大多数情况我们若干子module是不会变动的 但是在当前gradle版本偶尔会触发联动编译进而影响编译效率。 本插件会自动缓存编译后的子模块生产物(xxx.aar),且会自动替换依赖为aar依

JackFan 3 Feb 11, 2022
Use a jar executable to create a Drawable class to display a SVG on Android.

SVG2Drawable Use a jar executable to create a Drawable class to display a SVG on Android. This is a standalone library, not a Runtime Android library.

Stan Kocken 202 Nov 28, 2022
Create GIFs from Android devices (pronounced "gif cap")

gifcap A shell script to record GIFs from your Android devices A picture is worth 1,000 words - and, when prototyping animations, recording visual gli

Outlook 207 Nov 26, 2022
Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images)

VectAlign VectAlign (a.k.a. VectorDrawableAlign) is a developer's tool which automagically aligns two VectorDrawable "pathData" strings (or SVG images

Stefano Bonetta 2k Dec 29, 2022
Android Library Finder

alfi Android Library Finder Search through thousands of android libraries that can help you scale your projects elegantly Usage Search for something a

César Ferreira 509 Dec 8, 2022
Simple library to generate and view PDF in Android

PDFCreatorAndroid Simple library to generate and view PDF in Android A simple library to create and view PDF with zero dependency Or native code. Add

Tej Pratap Singh 234 Dec 11, 2022
:inbox_tray: [Android Library] Hunt down all package information

Android library to hunt down package information. The library is built for simplicity and approachability. It not only eliminates most boilerplate cod

Nishant Srivastava 141 Nov 17, 2022
An android library that handles the closing of your app interactively.

Shutdown A library that handles the closing of your app interactively. Overview of Shutdown library Shutdown library handles the closing of your app i

Emmanuel Kehinde 56 Oct 5, 2022
Android Material Design Theme UI and Tool Library. Support: 4.0.3~O

GitHub OSChina 中文 English Genius-Android Genius-Android: by Material Design style and some commonly used packages. Starting in 2015, The divided into

Qiujuer 2.3k Dec 27, 2022
Android USB host serial driver library for CDC, FTDI, Arduino and other devices.

usb-serial-for-android This is a driver library for communication with Arduinos and other USB serial hardware on Android, using the Android USB Host M

mike w 3.8k Dec 30, 2022
Library that makes it possible to read, edit and write CSV files

AdaptiveTableLayout Welcome the new CSV Library AdaptiveTableLayout for Android by Cleveroad Pay your attention to our new library that makes it possi

Cleveroad 1.9k Jan 6, 2023
TaggerString is very light library which allows to build dynamic string resource in much more readable way.

TaggerString TaggerString is very light library which allows to build dynamic string resource in much more readable way. I guess that every Android de

polok 241 Jun 3, 2022
A library which will save you a lot of time from writing the same intent creation code. it consist of many intent creation codes like Share, Contacts, Email and etc, which you can easily use.

Android-Intent-Library A library which will save you a lot of time from writing the same intent creation code. it consist of many intent creation code

Next 67 Aug 24, 2022
The Kotlin fake data generator library!

Fakeit This library is a port of the Ruby gem Faker. It generates realistic fake data — like names, emails, dates, countries — for a variety of scenar

Moove It 517 Nov 20, 2022
A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output.

android-resource-remover android-resource-remover is utility that removes unused resources reported by Android Lint from your project. The goal is to

Keepsafe 1.3k Dec 16, 2022
This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically.

#Android Localizationer This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically. T

Wesley Lin 822 Dec 8, 2022