Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yuebinyun/debug-badge

Add badge(version code, version name, etc) for your DEBUG APK.
https://github.com/yuebinyun/debug-badge

android android-development android-studio gradle-plugin groovy

Last synced: about 2 months ago
JSON representation

Add badge(version code, version name, etc) for your DEBUG APK.

Awesome Lists containing this project

README

        

## Add badge(version code, version name, etc) for your **DEBUG APK**.

![screenshot](attr/badge.png)

Add it to your project!

### Clean your project
![clean](attr/clean.png)

or
```bash
./gradlew clean
## or
## gradle clean
```

### Add gradle plugin

```gradle
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.github.yuebinyun.debug-badge:debug-badge:0.1.3'
}
}

apply plugin: 'com.android.application'
apply plugin: 'com.yuebinyun.badge'

android {
//...
//
}

dependencies {
//...
}

// if you don't set flavor
badge {
// label = "Debug"
// label = "Dev" // optional. Defualt text is `Debug`
label = "${project.android.defaultConfig.versionName}"
labelColor = 0xFFFFFF // optional. Default color is WHITE
labelBgColor = 0x0099FF // optional. Defualt color is RED
}
```

```gradle
// if you want to add badge for flavor-debug-version app
badgeFlavor {

demo {
label = "demo"
// label = "Dev" // optional. Defualt text is `Debug`
// label = "${project.android.defaultConfig.versionName}"
// labelColor = 0x000000 // optional. Default color is WHITE
// labelBgColor = 0x0099FF // optional. Defualt color is RED
}

full {
label = "full"
// label = "Dev" // optional. Defualt text is `Debug`
// label = "${project.android.defaultConfig.versionName}"
// labelColor = 0x000000 // optional. Default color is WHITE
// labelBgColor = 0x0099FF // optional. Defualt color is RED
}

// NOT SET
// flavor1 {
// label = "flavor1"
// }

flavor2 {
label = "flavor2"
labelColor = 0xFF00FF // optional. Default color is WHITE
labelBgColor = 0x0099FF // optional. Defualt color is RED
}
}
```