All Projects → vigidroid → Fat Aar Plugin

vigidroid / Fat Aar Plugin

Licence: mit
[DEPRECATED]A gradle plugin that helps to output fat aar from android library

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Fat Aar Plugin

Dexter
Manage multidexing using simple annotations and gradle tasks.
Stars: ✭ 41 (-86.2%)
Mutual labels:  gradle-plugin
android-retrofix
Backports Java 8 APIs (java.util.Optional, java.util.function, java.util.stream, java.util.concurrent.CompletableFuture, java.time) to Android below API 24 (Android 7.0 Nougat)
Stars: ✭ 51 (-82.83%)
Mutual labels:  gradle-plugin
Gradle Unused Resources Remover Plugin
Gradle Plugin that removes unused resources in Android projects.
Stars: ✭ 282 (-5.05%)
Mutual labels:  gradle-plugin
gradle-libraries-plugin
No description or website provided.
Stars: ✭ 29 (-90.24%)
Mutual labels:  gradle-plugin
change-tracker-plugin
A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.
Stars: ✭ 103 (-65.32%)
Mutual labels:  gradle-plugin
build-time-tracker
Gradle plugin that prints the time taken by the tasks in a build
Stars: ✭ 27 (-90.91%)
Mutual labels:  gradle-plugin
AndroidResourceTools
Android resource rename plugin.
Stars: ✭ 41 (-86.2%)
Mutual labels:  gradle-plugin
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (-4.04%)
Mutual labels:  gradle-plugin
kotlinx-resources
Kotlin Multiplatform (KMP) library for reading resources in tests
Stars: ✭ 15 (-94.95%)
Mutual labels:  gradle-plugin
Dependencycheck
OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
Stars: ✭ 3,571 (+1102.36%)
Mutual labels:  gradle-plugin
plugin-yml
A Gradle plugin that generates plugin.yml for Bukkit/BungeeCord/Nukkit plugins based on the Gradle project
Stars: ✭ 42 (-85.86%)
Mutual labels:  gradle-plugin
gradle-console-reporter
Gradle plugin to report various kinds of summaries to console.
Stars: ✭ 49 (-83.5%)
Mutual labels:  gradle-plugin
Androidsvgdrawable Plugin
Gradle plugin that generates qualified, density specific PNG drawables from SVG files at build time for your Android projects.
Stars: ✭ 263 (-11.45%)
Mutual labels:  gradle-plugin
GitQuery
Sync files and directories from a remote Git repo. CLI and Gradle Plugin.
Stars: ✭ 25 (-91.58%)
Mutual labels:  gradle-plugin
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-5.05%)
Mutual labels:  gradle-plugin
RocketXPlugin
🔥🔥 android 端编译加速插件🚀 自动识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
Stars: ✭ 408 (+37.37%)
Mutual labels:  gradle-plugin
schema-registry-plugin
Gradle plugin to interact with Confluent Schema-Registry.
Stars: ✭ 60 (-79.8%)
Mutual labels:  gradle-plugin
Androidlife
📔 CaMnter's android learning life and footprint.
Stars: ✭ 293 (-1.35%)
Mutual labels:  gradle-plugin
Gradle Nexus Plugin
Gradle plugin for configuring and uploading artifacts to Sonatype Nexus
Stars: ✭ 284 (-4.38%)
Mutual labels:  gradle-plugin
Gradle Aws Plugin
Gradle plugin to manage Amazon Web Services
Stars: ✭ 269 (-9.43%)
Mutual labels:  gradle-plugin

Deprecated

This repo is Deprecated. As the version of android gradle plugin keep increasing, I don't have enough time to keep supporting. And it stopped at 0.2.8, which supports android plugin at 2.2.3 and prior.

fat-aar-plugin

Download

This is a gradle plugin that helps to output fat aar from android library. I am inspired by android-fat-aar. And aim to make more flexible and functional. It's convenient to sdk developer(developer that provide a single aar library).

It works with the android gradle plugin, the android plugin's version of the development is 2.2.3, other revision is not tested actually. Commit an issue as you encounter some compatibility.

Update: Android plugin version 2.3.0 and later, is not well supported. disable build-cache may do the trick. So the recommend version is 2.2.3 and prior. Look this issue for more.

Essentially, fat-aar-plugin makes a hack way, to collect resources, jar files and something others in embedded dependencies, into the bundled output aar. Click here to know more about AAR.

[Features]

  • Support embed android library project, java project, android library and java library from maven repositories. Local jar file is not needed to use embed, compile is enough.
  • Work fine with the original features provided by android plugin. Such as multi build type, product flavor, manifest placeholder, proguard... If you find something wrong, commit an issue.
  • The jar files in embedded dependencies will be bundled into libs\ in aar when the proguard is off. Otherwise , they will be bundled into classes.jar in aar, it means classes in dependencies will also be obfuscated.

Getting Started

Step 1: Apply plugin

Add snippet below to your root build script file:

buildscript {
    repositories {
        maven {
            url  "http://dl.bintray.com/vigidroid/maven"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:xxx'
        classpath 'me.vigi:fat-aar-plugin:0.2.8'
    }
}

Add snippet below to the build.gradle of your android library:

apply plugin: 'me.vigi.fat-aar'

Step 2: Embed dependencies

change compile to embed while you want to embed the dependency in the library. Like this:

dependencies {
    // aar project
    embed project(':aar-lib')
    // java project
    embed project(':java-lib')
    // java dependency
    embed 'com.google.guava:guava:20.0'
    // aar dependency
    embed 'com.android.volley:volley:1.0.0'
  
    // other dependencies you don't want to embed in
    compile 'com.squareup.okhttp3:okhttp:3.6.0'
}

More usage see example.

About AAR File

AAR is a file format for android library. The file itself is a zip file that containing useful stuff in android. See anatomy of an aar file here.

support list for now:

  • [x] manifest merge
  • [x] classes jar and external jars merge
  • [x] res merge
  • [x] R.txt merge
  • [x] assets merge
  • [x] jni libs merge
  • [x] proguard.txt merge
  • [ ] lint.jar merge
  • [ ] aidl merge?
  • [ ] public.txt merge?

Known Defects or Issues

  • Proguard note. Produce lots of(maybe) Note: duplicate definition of library class, while proguard is on. A workaround is to add -dontnote in proguard-rules.pro.
  • The overlay order of res merge is changed: Embedded dependency has higher priority than other dependencies.
  • Res merge conflicts. If the library res folder and embedded dependencies res have the same res Id(mostly string/app_name). A duplicate resources build exception will be thrown. To avoid res conflicts, consider using a prefix to each res Id, both in library res and aar dependencies if possible.
  • More issue or defect is welcomed...

Thanks

android-fat-aar

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].