RuoYi-Cloud/build-config/build-publish.gradle

33 lines
881 B
Groovy
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

apply plugin: "maven-publish"
group = "com.ruoyi"
archivesBaseName = "${project.name}"
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = "sources"
}
publishing.publications {
mavenJava(MavenPublication) {
artifactId "${archivesBaseName}"
version project.version
//如果是war包填写components.web如果是jar包填写components.java
from components.java
artifact sourcesJar
}
}
publishing.repositories {
maven {
def releasesRepoUrl = "${repoUrl}/releases"
def snapshotsRepoUrl = "${repoUrl}/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
println "${group} ${archivesBaseName} publishing version is ${version}"
credentials {
username "developer"
password "dev123"
}
}
}