Commit f0f55437 by konghaorui

修改组件版本定义方式

parent e713208c
ext { ext {
kotlin_version = '1.3.21' kotlin_version = "1.3.21"
dev_mode = true dev_mode = true
ydl_app = [ ydl_app = [
...@@ -38,6 +38,67 @@ ext { ...@@ -38,6 +38,67 @@ ext {
canarySdkVersion : "1.5.4" canarySdkVersion : "1.5.4"
] ]
ydlPublishVersion = [
// -------------- 业务模块 --------------
"m-audioim" : "0.0.11",
"m-confide" : "0.0.14",
"m-consultant" : "0.0.21",
"m-course" : "0.0.5",
"m-fm" : "0.0.10",
"m-muse" : "0.0.6",
"m-tests" : "0.0.3",
"m-user" : "0.0.24",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-confide-api" : "0.0.1",
"m-consultant-api": "0.0.3",
"m-course-api" : "0.0.2",
"m-fm-api" : "0.0.2",
"m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.6",
//-------------- 功能组件 --------------
"ydl-flutter-base": "0.0.3",
"ydl-media" : "0.0.8",
"ydl-net" : "0.0.1",
"ydl-pay" : "0.0.3",
"ydl-platform" : "0.0.19",
"ydl-utils" : "0.0.2",
"ydl-webview" : "0.0.19",
"router" : "0.0.1",
]
ydlCompileVersion = [
// -------------- 业务模块 --------------
"m-audioim" : "0.0.11",
"m-confide" : "0.0.14",
"m-consultant" : "0.0.21",
"m-course" : "0.0.5",
"m-fm" : "0.0.10",
"m-muse" : "0.0.6",
"m-tests" : "0.0.3",
"m-user" : "0.0.23",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-confide-api" : "0.0.1",
"m-consultant-api": "0.0.3",
"m-course-api" : "0.0.2",
"m-fm-api" : "0.0.2",
"m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.5",
//-------------- 功能组件 --------------
"ydl-flutter-base": "0.0.3",
"ydl-media" : "0.0.8",
"ydl-net" : "0.0.1",
"ydl-pay" : "0.0.3",
"ydl-platform" : "0.0.19",
"ydl-utils" : "0.0.2",
"ydl-webview" : "0.0.19",
"router" : "0.0.1",
]
dependencies = [ dependencies = [
//support //support
"appcompat-v7" : "com.android.support:appcompat-v7:${version["androidSupportSdkVersion"]}", "appcompat-v7" : "com.android.support:appcompat-v7:${version["androidSupportSdkVersion"]}",
...@@ -130,68 +191,66 @@ ext { ...@@ -130,68 +191,66 @@ ext {
//YDL //YDL
"ptr-lib-release" : "com.ydl:ptr-lib-release:1.0.0@aar", "ptr-lib-release" : "com.ydl:ptr-lib-release:1.0.0@aar",
"systembartint" : "com.readystatesoftware.systembartint:systembartint:1.0.3", "systembartint" : "com.readystatesoftware.systembartint:systembartint:1.0.3",
"cube" : 'in.srain.cube:cube-sdk:1.0.44@aar', "cube" : "in.srain.cube:cube-sdk:1.0.44@aar",
"support-multidex" : 'com.android.support:multidex:1.0.2', "support-multidex" : "com.android.support:multidex:1.0.2",
"ydl-ijkplayer-jjdxm" : 'com.ydl:jjdxm-ijkplayer:0.0.3', "ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.3",
"robust" : 'com.meituan.robust:robust:0.4.87', "robust" : "com.meituan.robust:robust:0.4.87",
"walle" : 'com.meituan.android.walle:library:1.1.5', "walle" : "com.meituan.android.walle:library:1.1.5",
"jpush" : 'cn.jiguang.sdk:jpush:3.2.0', "jpush" : "cn.jiguang.sdk:jpush:3.2.0",
"jcore" : 'cn.jiguang.sdk:jcore:1.2.7', "jcore" : "cn.jiguang.sdk:jcore:1.2.7",
"eventbus" : 'de.greenrobot:eventbus:2.4.0', "eventbus" : "de.greenrobot:eventbus:2.4.0",
"BaseRecyclerViewAdapterHelper": 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34', "BaseRecyclerViewAdapterHelper": "com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34",
"flowlayout" : 'cn.lankton:flowlayout:3.1.0', "flowlayout" : "cn.lankton:flowlayout:3.1.0",
"androidanimations" : 'com.daimajia.androidanimations:library:2.3@aar', "androidanimations" : "com.daimajia.androidanimations:library:2.3@aar",
"umeng-common" : 'com.umeng.sdk:common:1.5.1', "umeng-common" : "com.umeng.sdk:common:1.5.1",
"umeng-analytics" : 'com.umeng.sdk:analytics:7.5.1', "umeng-analytics" : "com.umeng.sdk:analytics:7.5.1",
"umeng-share-core" : 'com.umeng.sdk:share-core:6.9.1', "umeng-share-core" : "com.umeng.sdk:share-core:6.9.1",
"umeng-share-qq" : 'com.umeng.sdk:share-qq:6.9.1.1', "umeng-share-qq" : "com.umeng.sdk:share-qq:6.9.1.1",
"umeng-share-wechat" : 'com.umeng.sdk:share-wechat:6.9.1', "umeng-share-wechat" : "com.umeng.sdk:share-wechat:6.9.1",
"umeng-shareboard" : 'com.umeng.sdk:shareboard-widget:6.9.1', "umeng-shareboard" : "com.umeng.sdk:shareboard-widget:6.9.1",
"umeng-debug" : 'com.umeng.sdk:debug:1.0.0', "umeng-debug" : "com.umeng.sdk:debug:1.0.0",
"tablayout" : 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar', "tablayout" : "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar",
"stetho" : 'com.facebook.stetho:stetho:1.5.0', "stetho" : "com.facebook.stetho:stetho:1.5.0",
"stetho-okhttp3" : 'com.facebook.stetho:stetho-okhttp3:1.4.1', "stetho-okhttp3" : "com.facebook.stetho:stetho-okhttp3:1.4.1",
"aspectjrt" : 'org.aspectj:aspectjrt:1.8.9', "aspectjrt" : "org.aspectj:aspectjrt:1.8.9",
"bugly-crashreport" : 'com.tencent.bugly:crashreport:2.8.6.0', "bugly-crashreport" : "com.tencent.bugly:crashreport:2.8.6.0",
"bugly-nativecrashreport" : 'com.tencent.bugly:nativecrashreport:3.6.0.1', "bugly-nativecrashreport" : "com.tencent.bugly:nativecrashreport:3.6.0.1",
"ydl-image" : 'com.ydl:ydl-image:1.0.7-SNAPSHOT@aar', "ydl-image" : "com.ydl:ydl-image:1.0.7-SNAPSHOT@aar",
"ydl-pushagent" : 'com.ydl:ydl-pushagent:0.1.9', "ydl-pushagent" : "com.ydl:ydl-pushagent:0.1.9",
"ydl-notracepoint" : 'com.ydl:notracepoint-lib:0.1.8@aar', "ydl-notracepoint" : "com.ydl:notracepoint-lib:0.1.8@aar",
"ydl-js" : 'com.ydl:ydl-js:1.0.7-SNAPSHOT@aar', "ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : 'com.ydl:ydl-router:1.3.2-SNAPSHOT@aar', "ydl-router" : "com.ydl:ydl-router:1.3.2-SNAPSHOT@aar",
"xrecyclerview" : 'com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar', "xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar",
"arouter-api" : "com.alibaba:arouter-api:1.4.1", "arouter-api" : "com.alibaba:arouter-api:1.4.1",
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2", "arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
"exoplayer" : 'com.google.android.exoplayer:exoplayer:2.9.0', "exoplayer" : "com.google.android.exoplayer:exoplayer:2.9.0",
"free_reflection" : 'me.weishu:free_reflection:2.0.0', "free_reflection" : "me.weishu:free_reflection:2.0.0",
"imagepicker" : 'com.ydl:imagepicker:1.0.6', "imagepicker" : "com.ydl:imagepicker:1.0.6",
"protector" : 'com.ydl:protector:1.0.1-SNAPSHOT@aar', "protector" : "com.ydl:protector:1.0.1-SNAPSHOT@aar",
"ydl-hnet" : 'com.ydl:h-net:0.0.8', "ydl-hnet" : "com.ydl:h-net:0.0.8",
"ydl-utils" : 'com.ydl:ydl-utils:0.0.2', "ydl-utils" : "com.ydl:ydl-utils:0.0.2",
"ydl-net" : 'com.ydl:ydl-net:0.0.1', "ydl-net" : "com.ydl:ydl-net:0.0.1",
"ydl-user-router" : 'com.ydl:router:1.0.0-SNAPSHOT@aar', "ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar",
"ydl-device" : 'com.ydl:device-id:0.0.7@aar', "ydl-device" : "com.ydl:device-id:0.0.7@aar",
//flutter功能组件升级===>发布ydl-flutter-base组件===>引用flutter相关的业务模块 //flutter功能组件升级===>发布ydl-flutter-base组件===>引用flutter相关的业务模块
"ydl-flutter" : 'com.ydl:ydl-flutter:0.0.6@aar', "ydl-flutter" : "com.ydl:ydl-flutter:0.0.6@aar",
"ydl-flutter-base" : 'com.ydl:ydl-flutter-base:0.0.2@aar', "ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}@aar",
//基础组件 <<--- 先发这个,发完改这里的版本号 //基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : 'com.ydl:ydl-platform:0.0.19@aar', "ydl-platform" : "com.ydl:ydl-platform:${ydlCompileVersion["ydl-platform"]}@aar",
//功能组件 <<--- 再发这些,发完改这里的版本号 //功能组件 <<--- 再发这些,发完改这里的版本号
"ydl-webview" : 'com.ydl:ydl-webview:0.0.19@aar', "ydl-webview" : "com.ydl:ydl-webview:${ydlCompileVersion["ydl-webview"]}@aar",
"ydl-media" : 'com.ydl:ydl-media:0.0.8@aar', "ydl-media" : "com.ydl:ydl-media:${ydlCompileVersion["ydl-media"]}@aar",
"ydl-audioim" : 'com.ydl:m-audioim:0.0.11@aar', "ydl-pay" : "com.ydl:ydl-pay:${ydlCompileVersion["ydl-pay"]}@aar",
"ydl-pay" : 'com.ydl:ydl-pay:0.0.3@aar', "m-audioim" : "com.ydl:m-audioim:${ydlCompileVersion["m-audioim"]}@aar",
//业务组件 <<--- 最后发这些(只发改过的) //业务组件 <<--- 最后发这些(只发改过的)
"ydl-m-user-api" : 'com.ydl:m-user-api:0.0.5', "ydl-m-user-api" : "com.ydl:m-user-api:${ydlCompileVersion["m-user-api"]}",
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1', "ydl-m-muse-api" : "com.ydl:m-muse-api:${ydlCompileVersion["m-muse-api"]}",
"ydl-m-fm-api" : 'com.ydl:m-fm-api:0.0.2', "ydl-m-fm-api" : "com.ydl:m-fm-api:${ydlCompileVersion["m-fm-api"]}",
"ydl-m-fm-module-ydl" : 'com.ydl:m-fm-module-ydl:0.0.6@aar', "ydl-m-tests-api" : "com.ydl:m-tests-api:${ydlCompileVersion["m-tests-api"]}",
"ydl-m-course-module-ydl" : 'com.ydl:m-course-module-ydl:0.0.1@aar',
"ydl-m-tests-api" : 'com.ydl:m-tests-api:0.0.1',
] ]
} }
IS_PUBLISH=true
VERSION_NAME=0.0.11
\ No newline at end of file
...@@ -88,7 +88,7 @@ dependencies { ...@@ -88,7 +88,7 @@ dependencies {
}else { }else {
//发布时使用 //发布时使用
api rootProject.ext.dependencies["ydl-media"] api rootProject.ext.dependencies["ydl-media"]
api(rootProject.ext.dependencies["ydl-audioim"]){ api(rootProject.ext.dependencies["m-audioim"]){
transitive = true transitive = true
} }
api(rootProject.ext.dependencies["ydl-platform"]) { api(rootProject.ext.dependencies["ydl-platform"]) {
......
...@@ -8,7 +8,7 @@ modular { ...@@ -8,7 +8,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-confide-module-xlzx" artifactId = "m-confide-module-xlzx"
// 上报的业务模块 aar 包的版本号 // 上报的业务模块 aar 包的版本号
version = "0.0.12" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
...@@ -16,7 +16,7 @@ modular { ...@@ -16,7 +16,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-confide-module-ydl" artifactId = "m-confide-module-ydl"
// 上报的业务模块 aar 包的版本号 // 上报的业务模块 aar 包的版本号
version = "0.0.12" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
//发布信息 module/api 通用 //发布信息 module/api 通用
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-confide-api" artifactId = "m-confide-api"
// version = "0.0.1" version = rootProject.ext.ydlPublishVersion["${childProject.getName()}-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-consultant-module-xlzx" artifactId = "m-consultant-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.15" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-consultant-module-ydl" artifactId = "m-consultant-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.19" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-consultant-api" artifactId = "m-consultant-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
version = "0.0.3" version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-course-module-xlzx" artifactId = "m-course-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.1" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-course-module-ydl" artifactId = "m-course-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.1" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-course-api" artifactId = "m-course-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
version = "0.0.1" version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-fm-module-xlzx" artifactId = "m-fm-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.8" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-fm-module-ydl" artifactId = "m-fm-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.8" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-fm-api" artifactId = "m-fm-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
version = "0.0.2" version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-muse-module-xlzx" artifactId = "m-muse-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.5" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-muse-module-ydl" artifactId = "m-muse-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.5" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-muse-api" artifactId = "m-muse-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
//version = "0.0.1" //version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-tests-module-xlzx" artifactId = "m-tests-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.2" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-tests-module-ydl" artifactId = "m-tests-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.2" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-tests-api" artifactId = "m-tests-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
version = "0.0.1" version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
...@@ -8,14 +8,14 @@ modular { ...@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-user-module-xlzx" artifactId = "m-user-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号 // 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.22" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
ydl{ ydl{
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-user-module-ydl" artifactId = "m-user-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号 // 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.22" version = rootProject.ext.ydlPublishVersion[childProject.getName()]
} }
} }
...@@ -24,7 +24,7 @@ modular { ...@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl" groupId = "com.ydl"
artifactId = "m-user-api" artifactId = "m-user-api"
//开发时注释掉版本号,发布api时打开 //开发时注释掉版本号,发布api时打开
// version = "0.0.5" version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖 // API 层打包时需要引入的依赖
apiDependencies { apiDependencies {
implementation "com.google.code.gson:gson:2.8.2" implementation "com.google.code.gson:gson:2.8.2"
......
apply plugin: 'maven' apply plugin: 'maven'
def mavenRepositoryUrl def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
if (isReleaseBuild()) { def getVersionName() {
println 'RELEASE BUILD' return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
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();
} }
afterEvaluate { project -> afterEvaluate { project ->
...@@ -28,9 +12,9 @@ afterEvaluate { project -> ...@@ -28,9 +12,9 @@ afterEvaluate { project ->
mavenDeployer { mavenDeployer {
pom.artifactId = project.getName().replace('_', "-") pom.artifactId = project.getName().replace('_', "-")
pom.groupId = "com.ydl" pom.groupId = "com.ydl"
pom.version = isReleaseBuild() ? VERSION_NAME : VERSION_NAME + "-SNAPSHOT" pom.version = getVersionName()
repository(url: mavenRepositoryUrl) { repository(url: mavenRepositoryUrl) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) authentication(userName: "admin", password: "fjoi#1+#@")
} }
} }
} }
...@@ -40,9 +24,9 @@ afterEvaluate { project -> ...@@ -40,9 +24,9 @@ afterEvaluate { project ->
// log // log
println String.format(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n>>>>> [%s] 正在将[%s]版本的[%s]包上传到Maven的[%s]仓库 >>>>>\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" println String.format(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n>>>>> [%s] 正在将[%s]版本的[%s]包上传到Maven的[%s]仓库 >>>>>\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
, project.getName() , project.getName()
, VERSION_NAME , getVersionName()
, "aar" , "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