Skip to content

Commit

Permalink
Merge pull request #7 from Aweme/develop
Browse files Browse the repository at this point in the history
Bug fix 修复了module无法使用的问题
  • Loading branch information
owenlongbo authored Oct 12, 2017
2 parents 3115fc9 + cd66803 commit 54a97de
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 deletions.
3 changes: 2 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ McImage是无侵入式的全量压缩资源图片插件

> v0.0.2以后的用户更新到0.0.2以上需要升级你的mctools文件夹,已经上传到release。
- 0.1.1 : Bug fix,修复了在module中apply无法编译通过的问题,修复了enableWhenDebug开关无法使用的问题
- 0.0.4 : 添加了自动识别操作系统的支持,去掉了webpQuality选项(设置不好对图片压缩会肉眼可见,强制使用默认值),优化了Log写法
- 0.0.3 : 添加了对webp的支持。会在压缩之后自动将你符合规则的图片转换为webp格式,并且会比对大小,如果转换之后更大则舍弃转换,并且插件对API 14 和API 18的webp问题进行了处理,具体问题请google查询。
- 0.0.2 : 完善了日志的输出
Expand All @@ -41,7 +42,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.smallsoho.mobcase:McImage:0.1.0'
classpath 'com.smallsoho.mobcase:McImage:0.1.1'
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Used algorithm

> The user use v0.0.2 update plugin need update your mctools dir together.
- 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.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 All @@ -43,7 +44,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.smallsoho.mobcase:McImage:0.1.0'
classpath 'com.smallsoho.mobcase:McImage:0.1.1'
}
}
```
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 = "0.1.0"
version = "0.1.1"

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
Expand Down
2 changes: 1 addition & 1 deletion publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'maven'
apply plugin: 'signing'

def DEBUG = false
def VERSION = '0.0.4-SNAPSHOT'
def VERSION = '0.1.1-SNAPSHOT'
def GROUP = 'com.smallsoho.mobcase'
def ARTIFACT = 'McImage'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.smallsoho.mcplugin.image.compress.CompressUtil
import com.smallsoho.mcplugin.image.models.Config
import com.smallsoho.mcplugin.image.utils.FileUtil
import com.smallsoho.mcplugin.image.utils.ImageUtil

import com.smallsoho.mcplugin.image.webp.WebpUtils
import org.gradle.api.GradleException
import org.gradle.api.Plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package com.smallsoho.mcplugin.image.utils

import com.android.build.gradle.AppPlugin
import com.android.build.gradle.BaseExtension
import org.gradle.api.Project

class AndroidUtil {

static BaseExtension getAndroidExtension(Project project) {
AppPlugin plugin = project.plugins.getPlugin(AppPlugin)
return plugin.extension
}


static int getMinSdkVersion(Project project) {
return getAndroidExtension(project).defaultConfig.minSdkVersion.apiLevel
return project.android.defaultConfig.minSdkVersion.apiLevel
}

}

0 comments on commit 54a97de

Please sign in to comment.