Commit 3ec3d15c by 万齐军

tuicore 修改与source分flavor

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