MCPcopy Index your code
hub / github.com/akaita/easylauncher-gradle-plugin

github.com/akaita/easylauncher-gradle-plugin @v1.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.1 ↗ · + Follow
59 symbols 78 edges 10 files 12 documented · 20% updated 5y agov1.3.1 · 2018-11-24★ 94823 open issues

Browse by type

Functions 48 Types & classes 11
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Easylauncher gradle plugin for Android

Modify the launcher icon of each of your app-variants using simple gradle rules. Add ribbons of any color, overlay your own images, change the colors of the icon, ...

Usage

// in build.gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.akaita.android:easylauncher:1.3.1'
    }
}
// in app/build.gradle
apply plugin: 'com.akaita.android.easylauncher'

android {
    buildTypes {
        debug {
            //Debuggable, will get a default ribbon in the launcher icon
        }
        beta {
            //Debuggable, will get a default ribbon in the launcher icon
            debuggable true
        }
        canary {
            //Non-debuggable, will not get any default ribbon
            debuggable false
        }
        release {
            //Non-debuggable, will not get any default ribbon
        }
    }
    productFlavors {
        local {}
        qa {}
        staging {}
        production {}
    }
}

Optionally, customize the plugin's behaviour

easylauncher {
    // "manifest application[android:icon]" is automatically added to the list
    iconNames "@mipmap/ic_launcher_foreground" // Traditional launcher icon
    foregroundIconNames "@mipmap/ic_launcher_foreground" // Foreground of adaptive launcher icon

    defaultFlavorNaming = true // Use flavor name for default ribbon, instead of the type name

    productFlavors {
        local {}
        qa {
            // Add one more filter to all `qa` variants
            filters = redRibbonFilter()
        }
        staging {}
        production {}
    }

    buildTypes {
        beta {
            // Add two more filters to all `beta` variants
            filters = [
                    customColorRibbonFilter("#0000FF"),
                    overlayFilter(new File("example-custom/launcherOverlay/beta.png"))
            ]
        }
        canary {
            // Remove ALL filters to `canary` variants
            enable false
        }
        release {}
    }

    variants {
        productionDebug {
            // OVERRIDE all previous filters defined for `productionDebug` variant
            filters = orangeRibbonFilter("custom")
        }
    }
}

Available filters

Grayscale filter

Command Result
grayscaleFilter()

Overlay filter

Command Result
overlayFilter(new File("example-custom/launcherOverlay/beta.png"))

Ribbon filters

Filter Command Result
Gray ribbon grayRibbonFilter()
Green ribbon greenRibbonFilter()
Yellow ribbon yellowRibbonFilter()
Orange ribbon orangeRibbonFilter()
Red ribbon redRibbonFilter()
Blue ribbon blueRibbonFilter()

Advanced Ribbon filter

Description Command Result
Custom background color customColorRibbonFilter("#6600CC")
Custom label customColorRibbonFilter("label", "#DCDCDC")
Custom text color customColorRibbonFilter("label", "#DCDCDC", "#000000")
Custom gravity - Top customColorRibbonFilter("custom", "#556600CC", "#FFFFFF", "top")
Custom gravity - Bottom customColorRibbonFilter("custom", "#556600CC", "#FFFFFF", "bottom"))
Custom gravity - TopLeft customColorRibbonFilter("custom", "#556600CC", "#FFFFFF", "topLeft"))
Custom gravity - TopRight customColorRibbonFilter("custom", "#556600CC", "#FFFFFF", "topRight"))
Custom text size (relative to the icon size) customColorRibbonFilter("custom", "#556600CC", "#FFFFFF", "bottom", 0.2))

Available options

  • iconNames: list of icons to modify (already includes "manifest application[android:icon]")
  • foregroundIconNames: list of adaptive icons to modify
  • defaultFlavorNaming: use flavor name in default ribbons, instead of using buildType
  • enable: enable/disable all filters for a flavor/type/variant
  • productFlavors: define filters for flavors (will be added to filters defined for types)
  • buildTypes: define filters for types (will be added to filter defined for flavors)
  • variants: define filters for variants (will override any other filters)

Project Structure

plugin/          - Gradle plugin
example-simple/  - Example Android application using easylauncher with the default behaviour
example-custom/  - Example Android application using easylauncher with the custom configuration
buildSrc/        - Helper module to use this plugin in example modules
icons/           - Examples of icons generated by this plugin

Contributing

You can already see my plans for the plugin in the project's Issues section.

Still, I'm open to feature-requests and suggestions.
Of course, a PR is the best way to get something you want into the plugin ;)

Credits

Easylauncher started as an extension of Fuji Goro's ribbonizer plugin. As it evolved, I decided it changed enough to be worth releasing as a separate plugin.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 48
Class 9
Enum 1
Interface 1

Languages

Java97%
Kotlin3%

Modules by API surface

plugin/src/main/groovy/com/akaita/android/easylauncher/plugin/EasyLauncherConfig.java16 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/plugin/EasyLauncherExtension.java13 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/filter/ColorRibbonFilter.java7 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/plugin/EasyLauncher.java4 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/filter/OverlayFilter.java4 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/filter/GrayscaleFilter.java4 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/plugin/Resources.java3 symbols
plugin/src/main/groovy/com/akaita/android/easylauncher/filter/EasyLauncherFilter.java3 symbols
example-simple/src/main/java/com/akaita/android/easylauncher/example/MainActivity.java3 symbols
example-custom/src/main/java/com/akaita/android/easylauncher/example/MainActivity.kt2 symbols

For agents

$ claude mcp add easylauncher-gradle-plugin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page