xpipe-mirror/jreleaser.gradle

93 lines
2.6 KiB
Groovy
Raw Normal View History

2022-08-13 07:14:20 +00:00
def isFullRelease = !project.version.endsWith('-SNAPSHOT')
2022-06-17 22:29:41 +00:00
def proj = project
jreleaser {
environment {
2022-08-12 15:26:01 +00:00
properties.put('rawChangelog', file("misc/changelogs/${version}.txt").exists() ?
file("misc/changelogs/${version}.txt").text.replace('\r\n', '\n') : "")
2022-06-17 22:29:41 +00:00
}
project {
2022-06-17 23:17:08 +00:00
name = 'X-Pipe Java'
description = '<TODO>'
longDescription = '<TODO>'
website = 'https://github.com/xpipe-io/xpipe_java'
2022-06-17 22:29:41 +00:00
authors = ['Christopher Schnick']
2022-06-17 23:17:08 +00:00
license = 'MIT'
copyright = '2022, Christopher Schnick'
2022-06-17 22:29:41 +00:00
java {
2022-06-17 23:17:08 +00:00
groupId = 'io.xpipe'
2022-06-17 22:29:41 +00:00
version = '17'
multiProject = true
}
}
release {
github {
2022-08-13 07:14:20 +00:00
skipTag = !isFullRelease
2022-10-11 17:07:28 +00:00
repoOwner = 'xpipe-io'
overwrite = true
2022-06-17 22:29:41 +00:00
tagName = '{{projectVersion}}'
releaseName = '{{tagName}}'
2022-06-17 23:17:08 +00:00
token = proj.hasProperty("XPIPE_GITHUB_TOKEN") ? proj.property("XPIPE_GITHUB_TOKEN") : System.getenv("XPIPE_GITHUB_TOKEN")
2022-06-17 22:29:41 +00:00
files = true
artifacts = true
2022-10-11 16:36:57 +00:00
checksums = true
2022-06-17 22:29:41 +00:00
signatures = false
2022-10-11 16:36:57 +00:00
if (isFullRelease) {
changelog {
enabled = true
formatted = 'ALWAYS'
contentTemplate = isFullRelease ? file('misc/github_full.tpl') : file('misc/github_pre.tpl')
}
2022-06-17 22:29:41 +00:00
}
2022-10-11 17:07:28 +00:00
prerelease {
enabled = !isFullRelease
}
2022-06-17 22:29:41 +00:00
}
}
distributions {
2022-06-17 23:17:08 +00:00
api {
artifact {
distributionType = 'SINGLE_JAR'
2022-09-01 23:41:51 +00:00
path = 'api/build/libs/xpipe-api-{{version}}.jar'
2022-06-17 22:29:41 +00:00
}
}
2022-06-17 23:55:01 +00:00
core {
artifact {
distributionType = 'SINGLE_JAR'
2022-09-01 23:41:51 +00:00
path = 'core/build/libs/xpipe-core-{{version}}.jar'
2022-06-17 23:55:01 +00:00
}
}
beacon {
artifact {
distributionType = 'SINGLE_JAR'
2022-09-01 23:41:51 +00:00
path = 'beacon/build/libs/xpipe-beacon-{{version}}.jar'
2022-06-17 23:55:01 +00:00
}
}
extension {
artifact {
distributionType = 'SINGLE_JAR'
2022-09-01 23:41:51 +00:00
path = 'extension/build/libs/xpipe-extension-{{version}}.jar'
2022-06-17 23:55:01 +00:00
}
}
2022-06-17 22:29:41 +00:00
}
2022-10-11 16:36:57 +00:00
if (isFullRelease) {
announce {
discord {
active = 'RELEASE'
webhook = proj.hasProperty("XPIPE_DISCORD_WEBHOOK") ? proj.property("XPIPE_DISCORD_WEBHOOK") : System.getenv("XPIPE_DISCORD_WEBHOOK")
messageTemplate = isFullRelease ? 'misc/discord_full.tpl' : 'misc/discord_pre.tpl'
}
2022-06-17 22:29:41 +00:00
}
}
}