Commit 54b27459 authored by maweidong's avatar maweidong

feat:新增APP版本

parent 6b7547a9
......@@ -94,12 +94,12 @@ def isSnapshot() {
return "SNAPSHOT" == getChannelString()
}
task printenv() {
// for (Map.Entry<String, String> entry : System.getenv()) {
// println("key:${entry.key},value:${entry.value}")
// }
getBizModuleLastVersion()
}
//task printenv() {
//// for (Map.Entry<String, String> entry : System.getenv()) {
//// println("key:${entry.key},value:${entry.value}")
//// }
// getBizModuleLastVersion()
//}
def getBizModuleLastVersion() {
......@@ -136,49 +136,49 @@ def getBizModuleLastVersion() {
def getHttpVersion(def group, def module) {
def group_path = group.replace(".", "/")
HttpURLConnection connection = null;
InputStream is = null;
BufferedReader br = null;
String result = null;// 返回结果字符串
HttpURLConnection connection = null
InputStream is = null
BufferedReader br = null
String result = null// 返回结果字符串
try {
// 创建远程url连接对象
URL url = new URL("https://nexus3.yit.com/repository/maven-public/$group_path/$module/maven-metadata.xml");
URL url = new URL("https://nexus3.yit.com/repository/maven-public/$group_path/$module/maven-metadata.xml")
// 通过远程url连接对象打开一个连接 , 强转成httpURLConnection类
connection = (HttpURLConnection) url.openConnection();
connection = (HttpURLConnection) url.openConnection()
// 设置连接方式:get
connection.setRequestMethod("GET");
connection.setRequestMethod("GET")
// 设置连接主机服务器的超时时间:15000毫秒
connection.setConnectTimeout(15000);
connection.setConnectTimeout(15000)
// 设置读取远程返回的数据时间:60000毫秒
connection.setReadTimeout(60000);
connection.setReadTimeout(60000)
// 发送请求
connection.connect();
connection.connect()
// 通过connection连接,获取输入流
if (connection.getResponseCode() == 200) {
is = connection.getInputStream();
is = connection.getInputStream()
// 封装输入流is,并指定字符集
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
br = new BufferedReader(new InputStreamReader(is, "UTF-8"))
// 存放数据
StringBuffer sbf = new StringBuffer();
String temp = null;
StringBuffer sbf = new StringBuffer()
String temp = null
while ((temp = br.readLine()) != null) {
sbf.append(temp);
sbf.append("\r\n");
sbf.append(temp)
sbf.append("\r\n")
}
result = sbf.toString();
result = sbf.toString()
}
} catch (MalformedURLException e) {
e.printStackTrace();
e.printStackTrace()
} catch (IOException e) {
e.printStackTrace();
e.printStackTrace()
} finally {
// 关闭资源
if (null != br) {
try {
br.close();
br.close()
} catch (IOException e) {
e.printStackTrace();
e.printStackTrace()
}
}
......@@ -186,15 +186,15 @@ def getHttpVersion(def group, def module) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
e.printStackTrace()
}
}
connection.disconnect();// 关闭远程连接
connection.disconnect()// 关闭远程连接
}
def xmlSlurper = new XmlSlurper()
def response = xmlSlurper.parseText(result)
println("$module ${response.versioning.latest}")
println("$module=${response.versioning.latest}")
}
......
ext {
android_app_version="4.0.0"
module_qr_version = ""
module_imagepicker_version = ""
module_productinfo_version = ""
module_share_version = ""
module_auction_version = ""
module_post_version = ""
module_login_version = ""
module_category_version = ""
module_live_version = ""
module_search_version = ""
module_shop_version = ""
module_picker_version = ""
module_social_version = ""
module_cart_version = ""
module_mine_version = ""
module_base_version = ""
module_shell_version = ""
module_cms_version = ""
module_browser_version = ""
app_version = "4.0.0"
shell = "4.0.0.3-SNAPSHOT"
shop = "4.0.0.2"
live = "4.0.0.2"
cms = "4.0.0.3-SNAPSHOT"
base = "4.0.0.10-SNAPSHOT"
food = "3.2.0.6"
browser = "4.0.0.4"
category = "4.0.0.2"
qr = "4.0.0.1"
productinfo = "4.0.0.10"
mine = "4.0.0.2"
search = "4.0.0.2"
cart = "4.0.0.2"
post = "4.0.0.1"
login = "4.0.0.1"
auction = "4.0.0.4"
social = "4.0.0.1"
imagepicker = "4.0.0.1"
share = "4.0.0.2"
picker = "4.0.0.1"
flutter = "4.0.0.5"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment