diff --git a/api/build.gradle b/api/build.gradle index aec245a1c..73c97d0c2 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -10,7 +10,7 @@ apply from: "$rootDir/deps/junit.gradle" apply from: 'publish.gradle' apply from: "$rootDir/deps/publish-base.gradle" -version = file('../version').text +version = file('../misc/version').text group = 'io.xpipe' archivesBaseName = 'api' @@ -18,6 +18,10 @@ repositories { mavenCentral() } +test { + enabled = false +} + dependencies { // Fix warnings about missing annotations compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0" diff --git a/beacon/build.gradle b/beacon/build.gradle index eea5327dd..0cca5eced 100644 --- a/beacon/build.gradle +++ b/beacon/build.gradle @@ -15,7 +15,7 @@ configurations { compileOnly.extendsFrom(dep) } -version = file('../version').text +version = file('../misc/version').text group = 'io.xpipe' archivesBaseName = 'beacon' diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..b11c945e1 --- /dev/null +++ b/build.gradle @@ -0,0 +1,6 @@ +plugins { + id 'org.jreleaser' version '1.0.0' +} + +version file('misc/version').text +apply from: 'jreleaser.gradle' \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle index 3a88d39f8..00b2e1f30 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -17,7 +17,7 @@ configurations { testImplementation.extendsFrom(dep) } -version = file('../version').text +version = file('../misc/version').text group = 'io.xpipe' archivesBaseName = 'core' diff --git a/deps b/deps index 49a1ad06b..cbac51bc6 160000 --- a/deps +++ b/deps @@ -1 +1 @@ -Subproject commit 49a1ad06bc6872f72c1d20ea864d24f3df59b7c5 +Subproject commit cbac51bc63e727c0ff5038cace4e91daa168a556 diff --git a/extension/build.gradle b/extension/build.gradle index 0b3f8daaf..14842902a 100644 --- a/extension/build.gradle +++ b/extension/build.gradle @@ -21,7 +21,7 @@ configurations { compileOnly.extendsFrom(dep) } -version = file('../version').text +version = file('../misc/version').text group = 'io.xpipe' archivesBaseName = 'extension' diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/jreleaser.gradle b/jreleaser.gradle index c19cc619a..5fcd81673 100644 --- a/jreleaser.gradle +++ b/jreleaser.gradle @@ -1,28 +1,25 @@ def isPreRelease = project.version.endsWith('-pre') def isFullRelease = !isPreRelease && !project.version.endsWith('-SNAPSHOT') def proj = project -def canonicalVersion = file('canonical_version').text +def canonicalVersion = file('misc/canonical_version').text jreleaser { environment { - properties.put('rawChangelog', file("changelogs/${canonicalVersion}.txt").exists() ? - file("changelogs/${canonicalVersion}.txt").text.replace('\r\n', '\n') : "") + properties.put('rawChangelog', file("misc/changelogs/${canonicalVersion}.txt").exists() ? + file("misc/changelogs/${canonicalVersion}.txt").text.replace('\r\n', '\n') : "") } project { - name = 'Pdx-Unlimiter' - description = 'A smart savegame manager, editor, and toolbox for all current major Paradox Grand Strategy games.' - longDescription = 'The Pdx-Unlimiter is a tool for all major Paradox Grand Strategy games that provides a ' + - 'powerful and smart savegame manager to quickly organize and play all of your savegames with ease. ' + - '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' + name = 'X-Pipe Java' + description = '' + longDescription = '' + website = 'https://github.com/xpipe-io/xpipe_java' authors = ['Christopher Schnick'] - license = 'GPL3' - copyright = ' ' + license = 'MIT' + copyright = '2022, Christopher Schnick' java { - groupId = 'com.crschnick.pdxu' + groupId = 'io.xpipe' version = '17' multiProject = true } @@ -38,11 +35,11 @@ jreleaser { github { skipRelease = !isFullRelease && !isPreRelease skipTag = !isFullRelease && !isPreRelease - owner = 'crschnick' + owner = 'xpipe-io' overwrite = false tagName = '{{projectVersion}}' 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 artifacts = true @@ -70,30 +67,19 @@ jreleaser { } } distributions { - app { - if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { - artifact { - distributionType = 'BINARY' - path = 'build/pdx_unlimiter-windows.zip' - platform = 'windows' - } - } else { - artifact { - distributionType = 'BINARY' - path = 'build/pdx_unlimiter-linux.zip' - platform = 'linux' - } + api { + artifact { + distributionType = 'SINGLE_JAR' + path = 'api/build/libs/api-{{version}}.jar' + transform = 'build/xpipe-api-{{version}}.jar' } } } announce { - enabled = isFullRelease || isPreRelease discord { - active = 'ALWAYS' - - webhook = proj.hasProperty("PDXU_DISCORD_WEBHOOK") ? proj.property("PDXU_DISCORD_WEBHOOK") : System.getenv("JRELEASER_DISCORD_WEBHOOK") - + 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' } } diff --git a/misc/canonical_version b/misc/canonical_version new file mode 100644 index 000000000..ceab6e11e --- /dev/null +++ b/misc/canonical_version @@ -0,0 +1 @@ +0.1 \ No newline at end of file diff --git a/misc/changelogs/0.1.txt b/misc/changelogs/0.1.txt new file mode 100644 index 000000000..6d6fa499e --- /dev/null +++ b/misc/changelogs/0.1.txt @@ -0,0 +1 @@ +Initial Release! \ No newline at end of file diff --git a/misc/discord_full.tpl b/misc/discord_full.tpl new file mode 100644 index 000000000..1038d4c31 --- /dev/null +++ b/misc/discord_full.tpl @@ -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}}} \ No newline at end of file diff --git a/misc/discord_pre.tpl b/misc/discord_pre.tpl new file mode 100644 index 000000000..2d4ee9371 --- /dev/null +++ b/misc/discord_pre.tpl @@ -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}}} \ No newline at end of file diff --git a/misc/github_full.tpl b/misc/github_full.tpl new file mode 100644 index 000000000..e18b2bb5a --- /dev/null +++ b/misc/github_full.tpl @@ -0,0 +1 @@ +{{{rawChangelog}}} diff --git a/misc/github_pre.tpl b/misc/github_pre.tpl new file mode 100644 index 000000000..e18b2bb5a --- /dev/null +++ b/misc/github_pre.tpl @@ -0,0 +1 @@ +{{{rawChangelog}}} diff --git a/version b/misc/version similarity index 100% rename from version rename to misc/version diff --git a/samples/sample_program/build.gradle b/samples/sample_program/build.gradle index 37d3166f9..c9a557534 100644 --- a/samples/sample_program/build.gradle +++ b/samples/sample_program/build.gradle @@ -15,7 +15,7 @@ repositories { // The used X-Pipe 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/ -def apiVersion = file('../../version').text +def apiVersion = file('../../misc/version').text dependencies { implementation project(':core')