diff --git a/build.gradle b/build.gradle index 053b5ca2..65cc5072 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ plugins { id('groovy') + id('org.jreleaser').version('0.8.0').apply(false) } String userHome = System.getProperty('user.home') @@ -24,10 +25,11 @@ ext.sdkmanVersion = ext.release == 'latest' ? "latest+${ext.hash}".toString() : println("Environment is set to: $environment") println("Short git hash: $hash") println("Release set to: $release") -println("Candidtes API: $candidatesApi") +println("Candidates API: $candidatesApi") println("Version: $sdkmanVersion") apply from: 'gradle/archive.gradle' +apply from: 'gradle/release.gradle' repositories { mavenCentral() diff --git a/gradle/release.gradle b/gradle/release.gradle new file mode 100644 index 00000000..01baa97f --- /dev/null +++ b/gradle/release.gradle @@ -0,0 +1,44 @@ +apply plugin: 'org.jreleaser' + +jreleaser { + project { + name = 'sdkman-cli' + version = sdkmanVersion + description = 'Sdkman - The Software Development Kit Manager' + website = 'https://sdkman.io' + authors = ['Marco Vermeulen'] + license = 'Apache-2.0' + extraProperties.put('inceptionYear', '2012') + } + + release { + github { + overwrite = true + tagName = '{{projectVersion}}' + skipTag = true + changelog { + formatted = 'ALWAYS' + format = '- {{commitShortHash}} {{commitTitle}}' + contributors { + format = '- {{contributorName}}' + } + contentTemplate = file('src/jreleaser/changelog.tpl') + hide { + contributors = ['GitHub'] + } + } + } + } + + distributions { + 'sdkman-cli' { + distributionType = 'BINARY' + artifact { + path = "build/distributions/{{distributionName}}-${sdkmanVersion}.zip" + } + sdkman { + active = 'RELEASE' + } + } + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index dc7c5ca4..f2ec4cdc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,9 @@ +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + mavenCentral() + } +} + rootProject.name = "sdkman-cli" diff --git a/src/jreleaser/changelog.tpl b/src/jreleaser/changelog.tpl new file mode 100644 index 00000000..e3a560d3 --- /dev/null +++ b/src/jreleaser/changelog.tpl @@ -0,0 +1,6 @@ +LOREM IPSUM DOLOR SIT AMET + +## Changelog + +{{changelogChanges}} +{{changelogContributors}} \ No newline at end of file