在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):fabiomsr/drawable-optimizer开源软件地址(OpenSource Url):https://github.com/fabiomsr/drawable-optimizer开源编程语言(OpenSource Language):Groovy 100.0%开源软件介绍(OpenSource Introduction):Drawable OptimizerGradle plugin to optimize png files and reduce resultant apk size within an Android project. How it works ?With this plugin you will be able to optimize the png files size inside your AndroidStudio project.
It works over the folder in which the resource merging was executed, by default in a Mac OSX system is By doing this, all original png files are kept under /res folder and this optimization could be undone just cleaning the project. In order to perform an optimization task, this plugin offers 2 different ways of file compression:
Why should I use this plugin ?You can find an explanation from Colt McAnlis about why you should optimize your pngs Reducing PNG file Size and Smaller PNGs, and Android’s AAPT tool Taste
UsageJust click on Sync project with gradle files button Download & InstallationIn buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.fabiomsr:drawable-optimizer-gradle-plugin:1.0.4'
}
} And in // Make sure this line comes *after* you apply the Android plugin (apply plugin: 'com.android.application')
apply plugin: 'org.fabiomsr.drawableoptimizer' ConfigurationNo configuration is needed by default, but if you want you can configure the following parameters. Every time the configuration changes the project must be cleaned. In drawableOptimizer {
optimizer = 'zopfli'
compressionLevel = 9
iterations = 15
onlyOnRelease = true
logLevel = 'info'
}
License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论