1 Star 0 Fork 4

沉默领主/myddd-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle.kts 1.99 KB
一键复制 编辑 原始数据 按行查看 历史
御剑 提交于 2021-05-07 19:40 . feat: 更新版本
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"]!!
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/sslAhpp/myddd-java.git
git@gitee.com:sslAhpp/myddd-java.git
sslAhpp
myddd-java
myddd-java
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385