Skip to content

Commit

Permalink
Merge pull request #264 from Meituan-Dianping/update-version-for-bugf…
Browse files Browse the repository at this point in the history
…ix-2

Update version for bugfix 2
  • Loading branch information
hedex authored Apr 11, 2018
2 parents 3d09197 + 081547f commit aa8ee58
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

手机系统版本:如:Android 5.0 (如是编译异常,则可以不填)

Robust版本:如:0.4.80
Robust版本:如:0.4.81

Gradle版本:如:2.10

Expand Down
8 changes: 4 additions & 4 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Robust
[![Download](https://api.bintray.com/packages/meituan/maven/com.meituan.robust%3Apatch/images/download.svg?version=0.4.80) ](https://bintray.com/meituan/maven/com.meituan.robust%3Apatch/0.4.80/link)
[![Download](https://api.bintray.com/packages/meituan/maven/com.meituan.robust%3Apatch/images/download.svg?version=0.4.81) ](https://bintray.com/meituan/maven/com.meituan.robust%3Apatch/0.4.81/link)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Meituan-Dianping/Robust/pulls)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)

Expand Down Expand Up @@ -28,7 +28,7 @@
apply plugin: 'robust'
compile 'com.meituan.robust:robust:0.4.80'
compile 'com.meituan.robust:robust:0.4.81'
```
2. 在整个项目的build.gradle加入classpath
Expand All @@ -39,8 +39,8 @@
jcenter()
}
dependencies {
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
}
}
```
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Robust

[![Download](https://api.bintray.com/packages/meituan/maven/com.meituan.robust%3Apatch/images/download.svg?version=0.4.80) ](https://bintray.com/meituan/maven/com.meituan.robust%3Apatch/0.4.80/link)
[![Download](https://api.bintray.com/packages/meituan/maven/com.meituan.robust%3Apatch/images/download.svg?version=0.4.81) ](https://bintray.com/meituan/maven/com.meituan.robust%3Apatch/0.4.81/link)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Meituan-Dianping/Robust/pulls)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)

Expand All @@ -26,7 +26,7 @@ Robust is an Android HotFix solution with high compatibility and high stability.
//please uncomment fellow line before you build a patch
//apply plugin: 'auto-patch-plugin'
apply plugin: 'robust'
compile 'com.meituan.robust:robust:0.4.80'
compile 'com.meituan.robust:robust:0.4.81'
```
2. Add below codes in the outest project's build.gradle file.

Expand All @@ -36,8 +36,8 @@ Robust is an Android HotFix solution with high compatibility and high stability.
jcenter()
}
dependencies {
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ buildscript {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
classpath 'me.tatarka:gradle-retrolambda:3.2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,32 @@ class RobustApkHashAction implements Action<Project> {

public static boolean isGradlePlugin300orAbove() {
try {
String gradlePluginVersion = com.android.builder.Version.ANDROID_GRADLE_PLUGIN_VERSION
String gradlePluginVersion = getGradlePluginVersion()
return gradlePluginVersion.compareTo("3.0.0") >= 0;
} catch (Throwable throwable) {

}
return false;
}

static String getGradlePluginVersion() {
String version = null
try {
def clazz = Class.forName("com.android.builder.Version")
def field = clazz.getDeclaredField("ANDROID_GRADLE_PLUGIN_VERSION")
field.setAccessible(true)
version = field.get(null)
} catch (Exception ignore) {
}
if (version == null) {
try {
def clazz = Class.forName("com.android.builder.model.Version")
def field = clazz.getDeclaredField("ANDROID_GRADLE_PLUGIN_VERSION")
field.setAccessible(true)
version = field.get(null)
} catch (Exception ignore) {
}
}
return version
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
VERSION_NAME=0.4.80
VERSION_NAME=0.4.81
GROUP=com.meituan.robust

0 comments on commit aa8ee58

Please sign in to comment.