GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - deepmedia/Grease: Fat AARs for Android, to distribute multiple library modules in a single file with no dependencies, with relocation support.

BranchesTags
Open more actions menu

Latest commit

 

History

47 Commits
47 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
gradle
gradle
 
 
grease
grease
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Build Status Release Issues

Grease

A Gradle plugin for creating fat AARs, useful for distributing multiple modules in a single file. To install the plugin, apply it to your Android project:

// settings.gradle.kts
pluginManagement {
    repositories {
        mavenCentral()
    }
}

// build.gradle.kts
plugins {
    id("com.android.library")
    id("io.deepmedia.tools.grease") version "0.3.7"
}

Note: The minimum required version of Gradle is 8.3

Usage

Once applied, Grease will create Gradle configurations that you can use to select which of your dependencies should be bundled in the final fat AAR.

dependencies {
    // Api dependency. This will not be bundled.
    api("androidx.core:core:1.3.1")

    // Implementation dependency. This will not be bundled.
    implementation("androidx.core:core:1.3.1")

    // Grease dependency! This will be bundled into the final AAR.
    grease("androidx.core:core:1.3.1")

    // Build-type, product flavour and variant specific configurations.
    // Can be used to enable grease only on specific library variants.
    greaseRelease("androidx.core:core:1.3.1")
    greaseDebug("androidx.core:core:1.3.1")
    greaseBlueCircleDebug("androidx.core:core:1.3.1")
    greaseGreenTriangleRelease("androidx.core:core:1.3.1")
}

Note that we used androidx.core:core:1.3.1 as an example, but that is not recommended as it will likely cause compile issue on projects that consume the Grease AAR, if they already depend on the androidx.core:core:1.3.1 (as most project do).

If you don't control the projects that will consume the Grease AAR, you should only bundle in dependencies that you own, to be sure that they won't be present in the classpath of the consumer.

Transitivity

By default, declaring a specific grease dependency will not include transitive dependencies. To do so, you can use grease configurations ending in Tree:

dependencies {
    grease("my-package:artifact:1.0.0") // not transitive
    greaseTree("my-other-package:other-artifact:1.0.0") // transitive
}

Relocations

We support relocations through the popular Shadow plugin. Inside the grease extension, you can use:

  • relocate(prefix: String) to relocate all included packages by prefixing them with the given prefix. Defaults to "grease".
  • relocate(from: String, to: String, configure: Action<SimpleRelocator>) to register a package-specific relocator, as described in the shadow plugin docs

About

Fat AARs for Android, to distribute multiple library modules in a single file with no dependencies, with relocation support.

Topics

aarandroidandroid-libandroid-libraryandroid-library-managementandroid-studiofatfatjarfatjar-generatorgradlegradle-plugin

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

107 stars

Watchers

4 watching

Forks

11 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.