Commit defcce19 by 万齐军

feat: 添加统一发布

parent 36214831
......@@ -182,7 +182,7 @@ dependencies {
implementation(rootProject.ext.dependencies["appcompat-v7"])
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
implementation "com.ydl.aar:resource:0.0.1-xlzx"
// implementation "com.ydl.aar:resource:0.0.1-xlzx"
// kapt rootProject.ext.dependencies["dagger2-compiler"]
implementation(rootProject.ext.dependencies["design"])
......
......@@ -58,6 +58,16 @@ task clean(type: Delete) {
delete rootProject.buildDir
}
task packYdl{
doLast {
println("doLast packYdl!!!!")
}
}
task packM{
doLast {
println("doLast packM!!!!")
}
}
subprojects {
project.configurations.all {
......
ext {
dev_mode = false
ydl2PublishVersion = "0.0.2-a"
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
......@@ -211,22 +211,22 @@ ext {
"ydl-hnet" : "com.ydl:h-net:0.0.8",
"ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar",
"ydl-device" : "com.ydl:device-id:0.0.30@aar",
"ydl-net" : "com.ydl:ydl-net:${ydlPublishVersion["ydl-net"]}",
"ydl-utils" : "com.ydl:ydl-utils:${ydlPublishVersion["ydl-utils"]}",
"ydl-net" : "com.ydl:ydl-net:${ydl2PublishVersion}",
"ydl-utils" : "com.ydl:ydl-utils:${ydl2PublishVersion}",
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlPublishVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydl2PublishVersion}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.44@aar", //flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : "com.ydl:ydl-platform:${ydlPublishVersion["ydl-platform"]}@aar",
"ydl-tuicore" : "com.ydl:ydl-tuicore:${ydlPublishVersion["ydl-tuicore"]}@aar",
"ydl-platform" : "com.ydl:ydl-platform:${ydl2PublishVersion}",
"ydl-tuicore" : "com.ydl:ydl-tuicore:${ydlPublishVersion["ydl-tuicore"]}",
//功能组件 <<--- 再发这些,发完改这里的版本号
"ydl-webview" : "com.ydl:ydl-webview:${ydlPublishVersion["ydl-webview"]}@aar",
"ydl-media" : "com.ydl:ydl-media:${ydlPublishVersion["ydl-media"]}@aar",
"ydl-pay" : "com.ydl:ydl-pay:${ydlPublishVersion["ydl-pay"]}@aar",
"m-audioim" : "com.ydl:m-audioim:${ydlPublishVersion["m-audioim"]}@aar",
"ydl-webview" : "com.ydl:ydl-webview:${ydl2PublishVersion}",
"ydl-media" : "com.ydl:ydl-media:${ydl2PublishVersion}",
"ydl-pay" : "com.ydl:ydl-pay:${ydl2PublishVersion}",
"m-audioim" : "com.ydl:m-audioim:${ydl2PublishVersion}",
//业务组件 <<--- 最后发这些(只发改过的)
"ydl-m-user-api" : "com.ydl:m-user-api:1.0.0",
......
......@@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
kapt {
arguments {
......
......@@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
kapt {
arguments {
......
......@@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
kapt {
arguments {
......
......@@ -3,7 +3,14 @@ apply plugin: 'maven'
def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
return rootProject.ext.ydl2PublishVersion
}
def isLocal(){
Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
properties.load(inputStream)
def local = properties.getProperty("packageLocal")
return local
}
task sourceJar(type:Jar){
classifier = 'source'
......@@ -19,11 +26,14 @@ afterEvaluate { project ->
mavenDeployer {
pom.artifactId = project.getName().replace('_', "-")
pom.groupId = "com.ydl"
pom.version = getVersionName()
repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@")
pom.version = getVersionName()
if (isLocal() == "true") {
repository(url: mavenLocal().url)
} else {
repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@")
}
}
// repository(url:mavenLocal().url)
}
}
}
......@@ -37,4 +47,10 @@ afterEvaluate { project ->
, "release"
)
}
// rootProject.getTasksByName("aa",false).forEach{println(it)}
if (project.name.startsWith("ydl")) {
rootProject.getTasksByName("packYdl", false).forEach { it.dependsOn(uploadArchives) }
} else {
rootProject.getTasksByName("packM", false).forEach { it.dependsOn(uploadArchives) }
}
}
\ 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