代码拉取完成,页面将自动刷新
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
java
`java-library`
`maven-publish`
id("org.springframework.boot") version "2.4.5"
}
val projectVersion = "1.2.0-SNAPSHOT"
extra["projectVersion"] = projectVersion
extra["slf4jVersion"] = "1.7.30"
extra["spring.boot"] = "2.4.5"
allprojects {
repositories {
maven {
setUrl("https://maven.aliyun.com/repository/public/")
}
maven {
setUrl("https://maven.aliyun.com/repository/spring/")
}
mavenCentral()
}
}
repositories {
maven {
setUrl("https://maven.aliyun.com/repository/public/")
}
maven {
setUrl("https://maven.aliyun.com/repository/spring/")
}
mavenCentral()
}
subprojects {
apply(plugin = "maven-publish")
apply(plugin = "java")
publishing {
publications {
create<MavenPublication>("mavenJava"){
groupId = "org.myddd"
afterEvaluate {
artifactId = tasks.jar.get().archiveBaseName.get()
}
from(components["java"])
}
repositories {
maven {
val releasesRepoUrl = "sftp://ssh.myddd.org:10010/repository/releases"
val snapshotsRepoUrl = "sftp://ssh.myddd.org:10010/repository/snapshots"
version = projectVersion
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = if(project.hasProperty("username")) project.property("username") as String? else ""
password = if(project.hasProperty("password")) project.property("password") as String? else ""
}
}
}
}
}
}
tasks.bootJar {
enabled = false
}
tasks.jar {
enabled = true
}
group = "org.myddd"
version = extra["projectVersion"]!!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。