Release fixes

This commit is contained in:
Christopher Schnick 2022-06-18 01:17:08 +02:00
parent 3cc527dfa3
commit 4dc685f895
16 changed files with 62 additions and 39 deletions

View file

@ -10,7 +10,7 @@ apply from: "$rootDir/deps/junit.gradle"
apply from: 'publish.gradle' apply from: 'publish.gradle'
apply from: "$rootDir/deps/publish-base.gradle" apply from: "$rootDir/deps/publish-base.gradle"
version = file('../version').text version = file('../misc/version').text
group = 'io.xpipe' group = 'io.xpipe'
archivesBaseName = 'api' archivesBaseName = 'api'
@ -18,6 +18,10 @@ repositories {
mavenCentral() mavenCentral()
} }
test {
enabled = false
}
dependencies { dependencies {
// Fix warnings about missing annotations // Fix warnings about missing annotations
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0" compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"

View file

@ -15,7 +15,7 @@ configurations {
compileOnly.extendsFrom(dep) compileOnly.extendsFrom(dep)
} }
version = file('../version').text version = file('../misc/version').text
group = 'io.xpipe' group = 'io.xpipe'
archivesBaseName = 'beacon' archivesBaseName = 'beacon'

6
build.gradle Normal file
View file

@ -0,0 +1,6 @@
plugins {
id 'org.jreleaser' version '1.0.0'
}
version file('misc/version').text
apply from: 'jreleaser.gradle'

View file

@ -17,7 +17,7 @@ configurations {
testImplementation.extendsFrom(dep) testImplementation.extendsFrom(dep)
} }
version = file('../version').text version = file('../misc/version').text
group = 'io.xpipe' group = 'io.xpipe'
archivesBaseName = 'core' archivesBaseName = 'core'

2
deps

@ -1 +1 @@
Subproject commit 49a1ad06bc6872f72c1d20ea864d24f3df59b7c5 Subproject commit cbac51bc63e727c0ff5038cace4e91daa168a556

View file

@ -21,7 +21,7 @@ configurations {
compileOnly.extendsFrom(dep) compileOnly.extendsFrom(dep)
} }
version = file('../version').text version = file('../misc/version').text
group = 'io.xpipe' group = 'io.xpipe'
archivesBaseName = 'extension' archivesBaseName = 'extension'

0
gradlew vendored Normal file → Executable file
View file

View file

@ -1,28 +1,25 @@
def isPreRelease = project.version.endsWith('-pre') def isPreRelease = project.version.endsWith('-pre')
def isFullRelease = !isPreRelease && !project.version.endsWith('-SNAPSHOT') def isFullRelease = !isPreRelease && !project.version.endsWith('-SNAPSHOT')
def proj = project def proj = project
def canonicalVersion = file('canonical_version').text def canonicalVersion = file('misc/canonical_version').text
jreleaser { jreleaser {
environment { environment {
properties.put('rawChangelog', file("changelogs/${canonicalVersion}.txt").exists() ? properties.put('rawChangelog', file("misc/changelogs/${canonicalVersion}.txt").exists() ?
file("changelogs/${canonicalVersion}.txt").text.replace('\r\n', '\n') : "") file("misc/changelogs/${canonicalVersion}.txt").text.replace('\r\n', '\n') : "")
} }
project { project {
name = 'Pdx-Unlimiter' name = 'X-Pipe Java'
description = 'A smart savegame manager, editor, and toolbox for all current major Paradox Grand Strategy games.' description = '<TODO>'
longDescription = 'The Pdx-Unlimiter is a tool for all major Paradox Grand Strategy games that provides a ' + longDescription = '<TODO>'
'powerful and smart savegame manager to quickly organize and play all of your savegames with ease. ' + website = 'https://github.com/xpipe-io/xpipe_java'
'Furthermore, it also comes with an Ironman converter, a powerful savegame editor, some savescumming ' +
'tools, integrations for various other great community-made tools for all major Paradox games.'
website = 'https://github.com/crschnick/pdx_unlimiter'
authors = ['Christopher Schnick'] authors = ['Christopher Schnick']
license = 'GPL3' license = 'MIT'
copyright = ' ' copyright = '2022, Christopher Schnick'
java { java {
groupId = 'com.crschnick.pdxu' groupId = 'io.xpipe'
version = '17' version = '17'
multiProject = true multiProject = true
} }
@ -38,11 +35,11 @@ jreleaser {
github { github {
skipRelease = !isFullRelease && !isPreRelease skipRelease = !isFullRelease && !isPreRelease
skipTag = !isFullRelease && !isPreRelease skipTag = !isFullRelease && !isPreRelease
owner = 'crschnick' owner = 'xpipe-io'
overwrite = false overwrite = false
tagName = '{{projectVersion}}' tagName = '{{projectVersion}}'
releaseName = '{{tagName}}' releaseName = '{{tagName}}'
token = proj.hasProperty("PDXU_GITHUB_TOKEN") ? proj.property("PDXU_GITHUB_TOKEN") : System.getenv("JRELEASER_GITHUB_TOKEN") token = proj.hasProperty("XPIPE_GITHUB_TOKEN") ? proj.property("XPIPE_GITHUB_TOKEN") : System.getenv("XPIPE_GITHUB_TOKEN")
files = true files = true
artifacts = true artifacts = true
@ -70,30 +67,19 @@ jreleaser {
} }
} }
distributions { distributions {
app { api {
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
artifact { artifact {
distributionType = 'BINARY' distributionType = 'SINGLE_JAR'
path = 'build/pdx_unlimiter-windows.zip' path = 'api/build/libs/api-{{version}}.jar'
platform = 'windows' transform = 'build/xpipe-api-{{version}}.jar'
}
} else {
artifact {
distributionType = 'BINARY'
path = 'build/pdx_unlimiter-linux.zip'
platform = 'linux'
}
} }
} }
} }
announce { announce {
enabled = isFullRelease || isPreRelease
discord { discord {
active = 'ALWAYS' active = 'RELEASE'
webhook = proj.hasProperty("XPIPE_DISCORD_WEBHOOK") ? proj.property("XPIPE_DISCORD_WEBHOOK") : System.getenv("XPIPE_DISCORD_WEBHOOK")
webhook = proj.hasProperty("PDXU_DISCORD_WEBHOOK") ? proj.property("PDXU_DISCORD_WEBHOOK") : System.getenv("JRELEASER_DISCORD_WEBHOOK")
messageTemplate = isFullRelease ? 'misc/discord_full.tpl' : 'misc/discord_pre.tpl' messageTemplate = isFullRelease ? 'misc/discord_full.tpl' : 'misc/discord_pre.tpl'
} }
} }

1
misc/canonical_version Normal file
View file

@ -0,0 +1 @@
0.1

1
misc/changelogs/0.1.txt Normal file
View file

@ -0,0 +1 @@
Initial Release!

11
misc/discord_full.tpl Normal file
View file

@ -0,0 +1,11 @@
@everyone
🚀 {{projectName}} {{projectVersion}} has been released: {{releaseNotesUrl}}
If you have already installed {{projectName}} and have updates enabled,
this update will be automatically installed when launching it the next time.
You can get the standalone version here: {{releaseNotesUrl}}
Changes in {{projectVersion}}:
{{{rawChangelog}}}

12
misc/discord_pre.tpl Normal file
View file

@ -0,0 +1,12 @@
@everyone
🚀 {{projectName}} {{projectVersion}} has been released: {{releaseNotesUrl}}
Note that as this is not a final release, there might still be some small issues with it.
Please report them if you stumble upon one.
Also note that pre-releases are not downloaded by the automatic updater
until they are ready for a full release or you have opted in to receiving pre-releases.
Changes in {{projectVersion}}:
{{{rawChangelog}}}

1
misc/github_full.tpl Normal file
View file

@ -0,0 +1 @@
{{{rawChangelog}}}

1
misc/github_pre.tpl Normal file
View file

@ -0,0 +1 @@
{{{rawChangelog}}}

View file

@ -15,7 +15,7 @@ repositories {
// The used X-Pipe API version. // The used X-Pipe API version.
// In your case, you have to fix this value to the target API version, // In your case, you have to fix this value to the target API version,
// which you can find at https://search.maven.org/artifact/io.xpipe/api/ // which you can find at https://search.maven.org/artifact/io.xpipe/api/
def apiVersion = file('../../version').text def apiVersion = file('../../misc/version').text
dependencies { dependencies {
implementation project(':core') implementation project(':core')