Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/yuebinyun/debug-badge
- Owner: yuebinyun
- Created: 2017-02-06T11:27:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-12T15:59:55.000Z (over 6 years ago)
- Last Synced: 2024-10-28T07:21:52.057Z (about 2 months ago)
- Topics: android, android-development, android-studio, gradle-plugin, groovy
- Language: Groovy
- Homepage:
- Size: 637 KB
- Stars: 74
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
}
}
```