Skip to content

Commit 43232f9

Browse files
aalmiraymarc0der
authored andcommitted
Configure JReleaser
1 parent f7ffc9c commit 43232f9

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id('groovy')
3+
id('org.jreleaser').version('0.8.0').apply(false)
34
}
45

56
String userHome = System.getProperty('user.home')
@@ -24,10 +25,11 @@ ext.sdkmanVersion = ext.release == 'latest' ? "latest+${ext.hash}".toString() :
2425
println("Environment is set to: $environment")
2526
println("Short git hash: $hash")
2627
println("Release set to: $release")
27-
println("Candidtes API: $candidatesApi")
28+
println("Candidates API: $candidatesApi")
2829
println("Version: $sdkmanVersion")
2930

3031
apply from: 'gradle/archive.gradle'
32+
apply from: 'gradle/release.gradle'
3133

3234
repositories {
3335
mavenCentral()

gradle/release.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apply plugin: 'org.jreleaser'
2+
3+
jreleaser {
4+
project {
5+
name = 'sdkman-cli'
6+
version = sdkmanVersion
7+
description = 'Sdkman - The Software Development Kit Manager'
8+
website = 'https://sdkman.io'
9+
authors = ['Marco Vermeulen']
10+
license = 'Apache-2.0'
11+
extraProperties.put('inceptionYear', '2012')
12+
}
13+
14+
release {
15+
github {
16+
overwrite = true
17+
tagName = '{{projectVersion}}'
18+
skipTag = true
19+
changelog {
20+
formatted = 'ALWAYS'
21+
format = '- {{commitShortHash}} {{commitTitle}}'
22+
contributors {
23+
format = '- {{contributorName}}'
24+
}
25+
contentTemplate = file('src/jreleaser/changelog.tpl')
26+
hide {
27+
contributors = ['GitHub']
28+
}
29+
}
30+
}
31+
}
32+
33+
distributions {
34+
'sdkman-cli' {
35+
distributionType = 'BINARY'
36+
artifact {
37+
path = "build/distributions/{{distributionName}}-${sdkmanVersion}.zip"
38+
}
39+
sdkman {
40+
active = 'RELEASE'
41+
}
42+
}
43+
}
44+
}

settings.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
pluginManagement {
2+
repositories {
3+
mavenLocal()
4+
gradlePluginPortal()
5+
mavenCentral()
6+
}
7+
}
8+
19
rootProject.name = "sdkman-cli"

src/jreleaser/changelog.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
LOREM IPSUM DOLOR SIT AMET
2+
3+
## Changelog
4+
5+
{{changelogChanges}}
6+
{{changelogContributors}}

0 commit comments

Comments
 (0)