All Projects → splatte → gradle-android-appiconoverlay

splatte / gradle-android-appiconoverlay

Licence: Apache-2.0 license
Plugin for Android Gradle to automatically overlay the app icon with the current git commit SHA1.

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to gradle-android-appiconoverlay

myrepo
continuous integration rep
Stars: ✭ 41 (-35.94%)
Mutual labels:  build, continuous-integration
old vespene
DISCONTINUED: a frozen fork will exist forever at mpdehaan/vespene
Stars: ✭ 672 (+950%)
Mutual labels:  build, continuous-integration
Platform Espressif32
Espressif 32: development platform for PlatformIO
Stars: ✭ 333 (+420.31%)
Mutual labels:  build, continuous-integration
Gaia
Build powerful pipelines in any programming language.
Stars: ✭ 4,534 (+6984.38%)
Mutual labels:  build, continuous-integration
Build
Netlify Build runs the build command, Build Plugins and bundles Netlify Functions.
Stars: ✭ 135 (+110.94%)
Mutual labels:  build, continuous-integration
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (-14.06%)
Mutual labels:  build, continuous-integration
Awesome Bazel
A curated list of Bazel rules, tooling and resources.
Stars: ✭ 640 (+900%)
Mutual labels:  build, continuous-integration
get-cmake
Install and Cache latest CMake and ninja executables for your workflows on your GitHub
Stars: ✭ 52 (-18.75%)
Mutual labels:  build, continuous-integration
Packcheck
Universal build and CI testing for Haskell packages
Stars: ✭ 91 (+42.19%)
Mutual labels:  build, continuous-integration
Androidsdk
🐳 Full-fledged Android SDK Docker Image
Stars: ✭ 776 (+1112.5%)
Mutual labels:  build, continuous-integration
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+985.94%)
Mutual labels:  build, continuous-integration
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (-59.37%)
Mutual labels:  build, continuous-integration
Buildhelpers
Helper functions for PowerShell CI/CD scenarios
Stars: ✭ 174 (+171.88%)
Mutual labels:  build, continuous-integration
Platform Ststm32
ST STM32: development platform for PlatformIO
Stars: ✭ 201 (+214.06%)
Mutual labels:  build, continuous-integration
Nginx-builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 143 (+123.44%)
Mutual labels:  build
vPAV
viadee Process Application Validator
Stars: ✭ 47 (-26.56%)
Mutual labels:  continuous-integration
b2
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 38 (-40.62%)
Mutual labels:  build
tagref
Tagref helps you maintain cross-references in your code.
Stars: ✭ 92 (+43.75%)
Mutual labels:  continuous-integration
defold-deployer
Universal build && deploy script for Defold projects
Stars: ✭ 23 (-64.06%)
Mutual labels:  build
ansiblecheck
One Stop Solution For Checking Your Ansible Roles and Playbooks
Stars: ✭ 56 (-12.5%)
Mutual labels:  continuous-integration

gradle-android-appiconoverlay

Plugin for Android Gradle to automatically overlay the app icon with information about the current build: git branch name and commit SHA1.

Example

Example: app icon with overlay

Usage

  1. This plugin is published on JCenter. Add dependency in your Android project's top-level build.gradle file:

    buildscript {
        dependencies {
            classpath 'com.github.splatte:gradle-android-appiconoverlay:2.0'
        }
    }
  2. Apply the plugin in your app module's build.gradle file:

    apply plugin: 'app-icon-overlay'
    appiconoverlay {
        /* then see below for configuration options */
    }
    
    android {
        /* project config */
    }
  3. For those using Gradle 3.+ disable aapt2 in your app module's gradle.properties file:

    android.enableAapt2=false
  4. You will need convert from the ImageMagick project to do the image processing. You can install it using a command along the lines of:

    # debian/ubuntu
    sudo apt-get install imagemagick
    
    # osx
    sudo port install imagemagick
    sudo brew install imagemagick
    
    # required on osx otherwise imagemagick (silently) goes into an infinite loop complaining about missing fonts
    sudo brew install ghostscript

The plugin will hook into your build process automatically and overwrite the target app icon files for debug builds. It will not mess with any files in your repository.

Customization

The plugin offers some options for customizing the appearance of the generated icon. Simply add a block to your app module's build.gradle:

appiconoverlay {
    textColor '#FFF'                  /* #rrggbbaa format */
    backgroundColor "#0008"           /* #rrggbbaa format */
    format '$build->$branch\n$commit' /* GString */
    imageMagick 'convert'             /* command to run ImageMagick */
}
Option Description
textColor Text color in #rrggbbaa format.
backgroundColor Background color for overlay in #rrggbbaa format.
format Format string to be used to create the text in the overlay.
Note: Use single quotes, it's a GString.
The following variables are available:
  • $branch name of git branch
  • $commit short SHA1 of latest commit in current branch
  • $build the name of the build variant ex. Debug
imageMagick Command to run ImageMagick's "convert".

Building locally

If you want to make changes to the plugin, here's how you can build it locally and test it with an Android app:

  1. Check out the project using git.
  2. In the root directory, run gradle jar.
  3. Find the generated .jar file in ./build/libs/.
  4. To reference your local .jar file in your Android project, declare the dependency as follows in the project's top-level build.gradle file:
    buildscript {
        dependencies {
            classpath files('/path/to/gradle-android-appiconoverlay/build/libs/gradle-android-appiconoverlay-2.0.jar')
        }
    }

Credits

Idea based on the IconOverlaying project by Krzysztof Zabłocki, which implements a similar feature for iOS builds.

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].