You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by lu...@apache.org on 2019/07/04 03:41:28 UTC
[incubator-weex] branch master updated: [Android] Supply message
for version check tool failure. (#2649)
This is an automated email from the ASF dual-hosted git repository.
luckychen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new d8bbe74 [Android] Supply message for version check tool failure. (#2649)
d8bbe74 is described below
commit d8bbe7453e0f0ffd3a4c21e5141112cf5eff56f2
Author: YorkShen <sh...@gmail.com>
AuthorDate: Thu Jul 4 11:41:24 2019 +0800
[Android] Supply message for version check tool failure. (#2649)
* [Android] Supply message for version check tool failure.
* Add google repo for Travis purpose
---
android/build.gradle | 6 +++---
android/sdk/build.gradle | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/android/build.gradle b/android/build.gradle
index 23a83f1..626b343 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,7 +1,7 @@
buildscript {
repositories {
- mavenLocal()
+ google()
maven(){
url 'https://maven.aliyun.com/repository/google'
}
@@ -26,12 +26,12 @@ subprojects {
}
}
repositories {
- mavenLocal()
if(project.hasProperty('external_repositories')){
maven {
url external_repositories
}
}
+ google()
maven(){
url 'https://maven.aliyun.com/repository/google'
}
@@ -45,7 +45,7 @@ subprojects {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
repositories {
- mavenLocal()
+ google()
maven(){
url 'https://maven.aliyun.com/repository/google'
}
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index ba80f68..cce843a 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -51,21 +51,21 @@ version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion'
//Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string.
if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) {
- assert version.tokenize('.').eachWithIndex { it, i ->
+ version.tokenize('.').eachWithIndex { it, i ->
if (i < 3) {
- assert it.isNumber()
+ assert it.isNumber() : "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead."
} else if (i == 3) {
- it.split("-|_").toList().eachWithIndex { inner_it, inner_i ->
+ it.split("[-_]").toList().eachWithIndex { inner_it, inner_i ->
if (inner_i == 0) {
- assert inner_it.isNumber() && inner_it.toInteger() % 2
+ assert inner_it.isNumber() && inner_it.toInteger() % 2 : "The 4th dight in the versioning number must be a odd number, and it is ${inner_it} currently."
} else {
- assert !inner_it.isNumber()
+ assert !inner_it.isNumber() : "The suffix of the versioning number is not allowed to contain any number, and it is ${inner_it} currently."
}
}.size == 4
} else {
- assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead"
+ assert false: "Please use semantic versioning witch 4 sections, you are using ${$ { i } + 1} section instead."
}
- }.size == 4
+ }
}
android {