Commit f0f55437 by konghaorui

修改组件版本定义方式

parent e713208c
IS_PUBLISH=true
VERSION_NAME=0.0.11
\ No newline at end of file
......@@ -88,7 +88,7 @@ dependencies {
}else {
//发布时使用
api rootProject.ext.dependencies["ydl-media"]
api(rootProject.ext.dependencies["ydl-audioim"]){
api(rootProject.ext.dependencies["m-audioim"]){
transitive = true
}
api(rootProject.ext.dependencies["ydl-platform"]) {
......
......@@ -8,7 +8,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-confide-module-xlzx"
// 上报的业务模块 aar 包的版本号
version = "0.0.12"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
......@@ -16,7 +16,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-confide-module-ydl"
// 上报的业务模块 aar 包的版本号
version = "0.0.12"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-confide-api"
// version = "0.0.1"
version = rootProject.ext.ydlPublishVersion["${childProject.getName()}-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.15"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-consultant-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.19"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-api"
//开发时注释掉版本号,发布api时打开
version = "0.0.3"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-course-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.1"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-course-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.1"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-course-api"
//开发时注释掉版本号,发布api时打开
version = "0.0.1"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.8"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-fm-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.8"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-api"
//开发时注释掉版本号,发布api时打开
version = "0.0.2"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-muse-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.5"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-muse-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.5"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-muse-api"
//开发时注释掉版本号,发布api时打开
//version = "0.0.1"
//version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-tests-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.2"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-tests-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.2"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-tests-api"
//开发时注释掉版本号,发布api时打开
version = "0.0.1"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.22"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-user-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.22"
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-api"
//开发时注释掉版本号,发布api时打开
// version = "0.0.5"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
apply plugin: 'maven'
def mavenRepositoryUrl
def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
if (isReleaseBuild()) {
println 'RELEASE BUILD'
mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
} else {
println 'SNAPSHOTS BUILD'
mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidSnapshots/"
}
def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "admin"
}
def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "fjoi#1+#@"
}
def isReleaseBuild() {
return IS_PUBLISH.toBoolean();
def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
}
afterEvaluate { project ->
......@@ -28,9 +12,9 @@ afterEvaluate { project ->
mavenDeployer {
pom.artifactId = project.getName().replace('_', "-")
pom.groupId = "com.ydl"
pom.version = isReleaseBuild() ? VERSION_NAME : VERSION_NAME + "-SNAPSHOT"
pom.version = getVersionName()
repository(url: mavenRepositoryUrl) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
authentication(userName: "admin", password: "fjoi#1+#@")
}
}
}
......@@ -40,9 +24,9 @@ afterEvaluate { project ->
// log
println String.format(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n>>>>> [%s] 正在将[%s]版本的[%s]包上传到Maven的[%s]仓库 >>>>>\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
, project.getName()
, VERSION_NAME
, getVersionName()
, "aar"
, IS_PUBLISH.toBoolean() ? "release" : "snapshot"
, "release"
)
}
}
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.2
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.8
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.1
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.3
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.19
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.2
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.19
\ No newline at end of file
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