在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):akaita/easylauncher-gradle-plugin开源软件地址(OpenSource Url):https://github.com/akaita/easylauncher-gradle-plugin开源编程语言(OpenSource Language):Java 59.2%开源软件介绍(OpenSource Introduction):Easylauncher gradle plugin for AndroidModify 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, ... UsageBasic usage// in build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.akaita.android:easylauncher:1.3.1'
}
} // in app/build.gradle
apply plugin: 'com.akaita.android.easylauncher' Adaptive launcher icons (Android 8.0+)Additionally to the set up from // in app/build.gradle
easylauncher {
foregroundIconNames "@mipmap/ic_launcher_foreground" // Foreground of adaptive launcher icon
} Warning: please not that Advanced usageYou can customize the filters applied to each type, flavor and variant of your app. Imagin these are the type and flavors of your app: // in app/build.gradle
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 {}
}
} You could customize the plugin's behaviour like this: 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 filtersGrayscale filter
Overlay filter
Ribbon filtersAdvanced Ribbon filterAvailable options
Project Structure
ContributingYou can already see my plans for the plugin in the project's Issues section. Still, I'm open to feature-requests and suggestions. CreditsEasylauncher started as an extension of Fuji Goro's |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论