Skip to content

Commit aa8ee58

Browse files
authored
Merge pull request #264 from Meituan-Dianping/update-version-for-bugfix-2
Update version for bugfix 2
2 parents 3d09197 + 081547f commit aa8ee58

6 files changed

Lines changed: 34 additions & 13 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

9-
Robust版本:如:0.4.80
9+
Robust版本:如:0.4.81
1010

1111
Gradle版本:如:2.10
1212

README-zh.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Robust
3-
[![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)
3+
[![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)
44
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Meituan-Dianping/Robust/pulls)
55
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)
66

@@ -28,7 +28,7 @@
2828
apply plugin: 'robust'
2929
3030
31-
compile 'com.meituan.robust:robust:0.4.80'
31+
compile 'com.meituan.robust:robust:0.4.81'
3232
3333
```
3434
2. 在整个项目的build.gradle加入classpath
@@ -39,8 +39,8 @@
3939
jcenter()
4040
}
4141
dependencies {
42-
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
43-
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
42+
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
43+
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
4444
}
4545
}
4646
```

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Robust
33

4-
[![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)
4+
[![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)
55
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Meituan-Dianping/Robust/pulls)
66
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)
77

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

@@ -36,8 +36,8 @@ Robust is an Android HotFix solution with high compatibility and high stability.
3636
jcenter()
3737
}
3838
dependencies {
39-
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
40-
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
39+
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
40+
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
4141
}
4242
}
4343
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ buildscript {
99
classpath 'com.android.tools.build:gradle:2.1.0'
1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
12-
classpath 'com.meituan.robust:gradle-plugin:0.4.80'
13-
classpath 'com.meituan.robust:auto-patch-plugin:0.4.80'
12+
classpath 'com.meituan.robust:gradle-plugin:0.4.81'
13+
classpath 'com.meituan.robust:auto-patch-plugin:0.4.81'
1414
classpath 'me.tatarka:gradle-retrolambda:3.2.0'
1515
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
1616
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'

gradle-plugin/src/main/groovy/robust/gradle/plugin/RobustApkHashAction.groovy

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,32 @@ class RobustApkHashAction implements Action<Project> {
204204

205205
public static boolean isGradlePlugin300orAbove() {
206206
try {
207-
String gradlePluginVersion = com.android.builder.Version.ANDROID_GRADLE_PLUGIN_VERSION
207+
String gradlePluginVersion = getGradlePluginVersion()
208208
return gradlePluginVersion.compareTo("3.0.0") >= 0;
209209
} catch (Throwable throwable) {
210210

211211
}
212212
return false;
213213
}
214+
215+
static String getGradlePluginVersion() {
216+
String version = null
217+
try {
218+
def clazz = Class.forName("com.android.builder.Version")
219+
def field = clazz.getDeclaredField("ANDROID_GRADLE_PLUGIN_VERSION")
220+
field.setAccessible(true)
221+
version = field.get(null)
222+
} catch (Exception ignore) {
223+
}
224+
if (version == null) {
225+
try {
226+
def clazz = Class.forName("com.android.builder.model.Version")
227+
def field = clazz.getDeclaredField("ANDROID_GRADLE_PLUGIN_VERSION")
228+
field.setAccessible(true)
229+
version = field.get(null)
230+
} catch (Exception ignore) {
231+
}
232+
}
233+
return version
234+
}
214235
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19-
VERSION_NAME=0.4.80
19+
VERSION_NAME=0.4.81
2020
GROUP=com.meituan.robust
2121

0 commit comments

Comments
 (0)