Commit 3ec3d15c by 万齐军

tuicore 修改与source分flavor

parent 7bd18f12
...@@ -3,12 +3,15 @@ apply plugin: 'maven-publish' ...@@ -3,12 +3,15 @@ apply plugin: 'maven-publish'
def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/" def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
def mavenRepositoryUrl2 = "http://nexus.yidianling.com/repository/AndroidSnapshots/" def mavenRepositoryUrl2 = "http://nexus.yidianling.com/repository/AndroidSnapshots/"
def sourceJar(String name, String path) { def sourceJar(String name, String path, String ext) {
return project.tasks.create("source${name.capitalize()}Jar", Jar) { return project.tasks.create("source${name.capitalize()}Jar", Jar) {
group = "publishing" group = "publishing"
description = "package ${name} source to jar" description = "package ${name} source to jar"
from "$path/src/main/java" from "$path/src/main/java"
from "$path/src/main/kotlin" from "$path/src/main/kotlin"
if (!ext.isEmpty()) {
from "$path/src/${ext}/java"
}
destinationDir = file("$path/build/libs/") destinationDir = file("$path/build/libs/")
classifier = 'sources' classifier = 'sources'
} }
...@@ -60,14 +63,14 @@ afterEvaluate { ...@@ -60,14 +63,14 @@ afterEvaluate {
group 'com.ydl' group 'com.ydl'
version pVersion + "-ydl" version pVersion + "-ydl"
from components.ydlRelease from components.ydlRelease
artifact sourceJar(getName(), "${project.projectDir}") artifact sourceJar(getName(), "${project.projectDir}", "ydl")
pom.withXml(checkPomVersion) pom.withXml(checkPomVersion)
} }
xlzxComponent(MavenPublication) { xlzxComponent(MavenPublication) {
group 'com.ydl' group 'com.ydl'
version pVersion + "-xlzx" version pVersion + "-xlzx"
from components.xlzxRelease from components.xlzxRelease
artifact sourceJar(getName(), "${project.projectDir}") artifact sourceJar(getName(), "${project.projectDir}", "xlzx")
pom.withXml(checkPomVersion) pom.withXml(checkPomVersion)
} }
} else { } else {
...@@ -75,7 +78,7 @@ afterEvaluate { ...@@ -75,7 +78,7 @@ afterEvaluate {
group isApiModule ? 'com.ydl.api' : 'com.ydl' group isApiModule ? 'com.ydl.api' : 'com.ydl'
version pVersion version pVersion
from components.release from components.release
artifact sourceJar(getName(), "${project.projectDir}") artifact sourceJar(getName(), "${project.projectDir}", "")
pom.withXml(checkPomVersion) pom.withXml(checkPomVersion)
} }
} }
......
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply from: "../publish.gradle" //apply from: "../publish.gradle"
android { android {
compileSdkVersion 28 compileSdkVersion 28
......
...@@ -6,7 +6,7 @@ apply plugin: 'kotlin-android' ...@@ -6,7 +6,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply from: 'publish.gradle' apply from: "../publish.gradle"
android { android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"] compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......
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