mirror of
https://gitee.com/replugin/RePlugin.git
synced 2024-12-02 11:48:02 +08:00
Plugin gradle automatically synchronizes the version number
This commit is contained in:
parent
8fac381ea0
commit
8d8c781bab
@ -40,7 +40,13 @@ buildscript {
|
||||
}
|
||||
|
||||
group = 'com.qihoo360.replugin' // 组名
|
||||
version = '2.1.4' // 版本
|
||||
|
||||
String classPath = ".src.main.groovy.com.qihoo360.replugin.gradle.plugin.AppConstant".replace(".", java.io.File.separator)
|
||||
String verPath = "${project.projectDir}" + classPath + ".groovy"
|
||||
String verLine = new File(verPath).filterLine { it =~ /def static final VER =/ }
|
||||
version = "${verLine.split("\"")[1]}" // 版本
|
||||
//红色醒目打印显示版本号
|
||||
java.lang.System.err.println "version=${version}"
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.tools.build:gradle:2.1.3'
|
||||
@ -106,4 +112,4 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'bintray.gradle'
|
||||
apply from: 'bintray.gradle'
|
@ -22,8 +22,11 @@ package com.qihoo360.replugin.gradle.plugin
|
||||
*/
|
||||
class AppConstant {
|
||||
|
||||
/** 版本号 */
|
||||
def static final VER = "2.1.5"
|
||||
|
||||
/** 打印信息时候的前缀 */
|
||||
def static final TAG = "< replugin-plugin-v2.1.1 >"
|
||||
def static final TAG = "< replugin-plugin-v${VER} >"
|
||||
|
||||
/** 外部用户配置信息 */
|
||||
def static final USER_CONFIG = "repluginPluginConfig"
|
||||
|
Loading…
Reference in New Issue
Block a user