1 Star 0 Fork 10

qsonxu/Resilience4j

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
publishing.gradle 2.93 KB
一键复制 编辑 原始数据 按行查看 历史
Ryan Dens 提交于 2022-05-27 00:58 . :zap:Gradle optimizations (#1695)
import java.text.SimpleDateFormat
Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}
def projectArtifactId = 'resilience4j'
def url = "https://resilience4j.readme.io"
normalization {
runtimeClasspath {
metaInf {
ignoreAttribute("Build-Time")
ignoreAttribute("Build-Date")
}
}
}
jar {
manifest {
attributes(
'Built-By': 'Robert Winkler',
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Specification-Title': projectArtifactId,
'Specification-Version': project.version,
'Implementation-Title': projectArtifactId,
'Implementation-Version': project.version,
)
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
tasks.withType(Sign) {
onlyIf { !version.endsWith("SNAPSHOT") }
}
signing {
sign publishing.publications
}
publishing {
publications {
resilience4j(MavenPublication) {
from components.java
pom.withXml {
def devs = ['RobWin': 'Robert Winkler',
'storozhukBM': 'Bogdan Storozhuk',
'Romeh': 'Mahmoud Romeh',
'dlsrb6342': 'Ingyu Hwhang',
'Hexmind': 'Tomasz Skowroński',
'drmaas': 'Dan Maas']
def root = asNode()
root.appendNode('name', "${projectArtifactId}")
root.appendNode('packaging', 'jar')
root.appendNode('url', "${url}")
root.appendNode('description', project.description)
def license = root.appendNode('licenses').appendNode('license')
license.appendNode('name', 'Apache-2.0')
license.appendNode('url', 'https://github.com/resilience4j/resilience4j/blob/master/LICENSE.txt')
license.appendNode('distribution', 'repo')
root.appendNode('scm').appendNode('url', 'https://github.com/resilience4j/resilience4j.git')
def developers = root.appendNode('developers')
devs.each {
def d = developers.appendNode('developer')
d.appendNode('id', it.key)
d.appendNode('name', it.value)
}
}
artifact sourcesJar
artifact javadocJar
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/qsonxu/Resilience4j.git
[email protected]:qsonxu/Resilience4j.git
qsonxu
Resilience4j
Resilience4j
master

搜索帮助