Skip to content

Commit

Permalink
Merge pull request #29 from smallSohoSolo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
smallSohoSolo committed Oct 21, 2019
2 parents 7cbfee9 + aca2bb6 commit 01e0d6d
Show file tree
Hide file tree
Showing 23 changed files with 524 additions and 165 deletions.
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
.idea/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
.gradle

build/
out/
local.properties
.DS_Store
gradlew
gradlew.bat
gradle
*.iml

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
116 changes: 116 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ McImage是无侵入式的全量压缩资源图片插件
### Update Log

> v0.0.2以后的用户更新到0.0.2以上需要升级你的mctools文件夹,已经上传到release。
- 1.5.0 : 更新gradle plugin 到 3.5.0 ,更新获取android资源方式,修复了不支持缩写(assembleDebug 缩写 aD)的问题
- 1.4.0 : 区分优化类型,可选择ConvertWep或Compress, 默认选择Compress. 使用ConvertWep需要min sdk >= 18.但是压缩效果更好
- 1.3.0 : 支持多线程压缩,缩短执行时间
- 1.2.0 : 优先从系统获取压缩命令, 不存在使用本地文件命令
Expand Down Expand Up @@ -84,20 +85,19 @@ mctools
```groovy
McImageConfig {
isCheckSize true //是否检测图片大小,默认为true
optimizeType "ConertWebp" //优化类型,可选"ConvertWebp","Compress",转换为webp或原图压缩,默认Compress,使用ConvertWep需要min sdk >= 18.但是压缩效果更好
optimizeType "Compress" //优化类型,可选"ConvertWebp","Compress",转换为webp或原图压缩,默认Compress,使用ConvertWep需要min sdk >= 18.但是压缩效果更好
maxSize 1*1024*1024 //大图片阈值,default 1MB
enableWhenDebug false //debug下是否可用,default true
isCheckPixels true // 是否检测大像素图片,default true
maxWidth 1000 //defualt 1000 如果开启图片宽高检查,默认的最大宽度
maxHeight 1000 //defualt 1000 如果开启图片宽高检查,默认的最大高度
maxWidth 1000 //default 1000 如果开启图片宽高检查,默认的最大宽度
maxHeight 1000 //default 1000 如果开启图片宽高检查,默认的最大高度
whiteList = [ //默认为空,如果添加,对图片不进行任何处理
"icon_launcher.png"
]
mctoolsDir "$rootDir/tools"
mctoolsDir "$rootDir"
isSupportAlphaWebp false //是否支持带有透明度的webp,default false,带有透明图的图片会进行压缩
multiThread true //是否开启多线程处理图片,default true
bigImageWhiteList = [ //默认为空,如果添加,大图检测将跳过这些图片
]
bigImageWhiteList = [] //默认为空,如果添加,大图检测将跳过这些图片
}
```

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ The version 1.0.1 now support all build.gradle version!
### Update Log

> The user use v0.0.2 update plugin need update your mctools dir together.
- 1.4.0 : Featrue, Support for selecting different optimization types,"ConvertWebp" or "Compress" can be chosen.Default "Compress". "CompressWebp" is a better compression ratio but it don't support api < 18
- 1.3.0 : Featrue, Support multi-thread processing
- 1.5.0 : Update gradle plugin to 3.5.0 , change the get android resources way,fix not support abbreviation(such as assembleDebug use aD) bug.
- 1.4.0 : Feature, Support for selecting different optimization types,"ConvertWebp" or "Compress" can be chosen.Default "Compress". "CompressWebp" is a better compression ratio but it don't support api < 18
- 1.3.0 : Feature, Support multi-thread processing
- 1.2.0 : Feature, get compress command from system environment prior to local file
- 1.0.1 : Bug fix, fix maxSize float error
- 1.0.0 : Support AAPT2 , now don't need to close aapt2 with "android.enableAapt2=false", you can delete this line in gradle.properties.
- 0.1.4 : Bug fix, add the white list feature, add the img width and height check feature.
- 0.1.2 : Bug fix(Fix the problem that check image size not work)
- 0.1.1 : Bug fix(Fix the problem not work for module and fix the problem of enableWhenDebug not work)
- 0.0.4 : Add auto choose system future.Remove webpQualitu config (Set inappropriate will result the img lossless)
- 0.0.4 : Add auto choose system future.Remove webpQuality config (Set inappropriate will result the img lossless)
- 0.0.3 : Add webp ! It will auto convert your png (without alpha in min API < 18 and not work in min API < 14) and jpg to webp if it will become more small.
- 0.0.2 : Improve the log.

Expand Down Expand Up @@ -85,20 +86,19 @@ You can set the config in build.gradle.If you not set this,all config will use d
```groovy
McImageConfig {
isCheckSize true //Whether to detect image size,default true
optimizeType "ConertWebp" //Optimize Type,"ConvertWebp" or "Compress",default "Compress", "CompressWebp" is a better compression ratio but it don't support api < 18
optimizeType "Compress" //Optimize Type,"ConvertWebp" or "Compress",default "Compress", "CompressWebp" is a better compression ratio but it don't support api < 18
maxSize 1*1024*1024 //big image size threshold,default 1MB
enableWhenDebug false //swithc in debug build,default true
enableWhenDebug false //switch in debug build,default true
isCheckPixels true // Whether to detect image pixels of width and height,default true
maxWidth 1000 //defualt 1000
maxHeight 1000 //defualt 1000
maxWidth 1000 //default 1000
maxHeight 1000 //default 1000
whiteList = [ //do not do any optimization for the images who in the list
"icon_launcher.png"
]
mctoolsDir "$rootDir/tools"
mctoolsDir "$rootDir"
isSupportAlphaWebp false //Whether support convert the Image with Alpha chanel to Webp,default false, the images with alpha chanels will be compressed.if config true, its need api level >=18 or do some compatible measures
multiThread true //Whether open muti-thread processing,default true
bigImageWhiteList = [ //do not detect big size or large pixels for the images who in the list
]
multiThread true //Whether open multi-thread processing,default true
bigImageWhiteList = [] //do not detect big size or large pixels for the images who in the list
}
```

Expand Down
2 changes: 1 addition & 1 deletion bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'com.jfrog.bintray'
def siteUrl = 'https://github.com/Aweme/McImage'
def gitUrl = 'https://github.com/Aweme/McImage.git'
group = "com.smallsoho.mobcase"
version = "1.4.0"
version = "1.5.0"

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ buildscript {
}

dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.60"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
}
}

Expand All @@ -22,7 +22,7 @@ allprojects {
}

dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.android.tools.build:gradle:3.1.2'
implementation gradleApi()
implementation localGroovy()
implementation 'com.android.tools.build:gradle:3.5.0'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Oct 18 12:32:35 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Loading

0 comments on commit 01e0d6d

Please sign in to comment.