1+ import org.jreleaser.model.Active
2+ import org.jreleaser.model.Distribution
3+ import org.jreleaser.model.Stereotype
14import java.io.FileInputStream
25import java.util.*
36
@@ -12,6 +15,7 @@ import java.util.*
1215plugins {
1316 id(" com.github.johnrengelman.shadow" ) version " 8.1.1"
1417 id(" io.micronaut.application" ) version " 4.4.3"
18+ id(" org.jreleaser" ) version " 1.14.0"
1519}
1620
1721val versionProperties = Properties ().apply {
@@ -30,6 +34,18 @@ group = "io.clusterless"
3034
3135repositories {
3236 mavenCentral()
37+
38+ maven {
39+ url = uri(" https://maven.pkg.github.com/cwensel/*" )
40+ name = " github"
41+ credentials(PasswordCredentials ::class ) {
42+ username = (project.findProperty(" githubUsername" ) ? : System .getenv(" USERNAME" )) as ? String
43+ password = (project.findProperty(" githubPassword" ) ? : System .getenv(" GITHUB_TOKEN" )) as ? String
44+ }
45+ content {
46+ includeVersionByRegex(" net.wensel" , " cascading-.*" , " .*-wip-.*" )
47+ }
48+ }
3349}
3450
3551dependencies {
@@ -50,9 +66,16 @@ dependencies {
5066}
5167
5268application {
69+ applicationName = " subpop"
5370 mainClass = " io.clusterless.subpop.Main"
5471}
5572
73+ distributions {
74+ main {
75+ distributionBaseName.set(" subpop" )
76+ }
77+ }
78+
5679java {
5780 sourceCompatibility = JavaVersion .VERSION_21
5881 targetCompatibility = JavaVersion .VERSION_21
@@ -82,3 +105,97 @@ micronaut {
82105tasks.named< io.micronaut.gradle.docker.NativeImageDockerfile > (" dockerfileNative" ) {
83106 jdkVersion = " 21"
84107}
108+
109+ jreleaser {
110+ dryrun.set(false )
111+
112+ project {
113+ description.set(" SubPop is a command line utility for finding the differences between one or more tabular datasets." )
114+ authors.add(" Chris K Wensel" )
115+ copyright.set(" Chris K Wensel" )
116+ license.set(" MPL-2.0" )
117+ stereotype.set(Stereotype .CLI )
118+ links {
119+ homepage.set(" https://github.com/ClusterlessHQ" )
120+ }
121+ inceptionYear.set(" 2024" )
122+ gitRootSearch.set(true )
123+ }
124+
125+ signing {
126+ armored.set(true )
127+ active.set(Active .ALWAYS )
128+ verify.set(false )
129+ }
130+
131+ release {
132+ github {
133+ overwrite.set(true )
134+ sign.set(false )
135+ repoOwner.set(" ClusterlessHQ" )
136+ name.set(" subpop" )
137+ username.set(" cwensel" )
138+ branch.set(" wip-1.0" )
139+ changelog.enabled.set(false )
140+ milestone.close.set(false )
141+ }
142+ }
143+
144+ distributions {
145+ create(" subpop" ) {
146+ distributionType.set(Distribution .DistributionType .JAVA_BINARY )
147+ executable {
148+ name.set(" subpop" )
149+ }
150+ artifact {
151+ path.set(file(" build/distributions/{{distributionName}}-{{projectVersion}}.zip" ))
152+ }
153+ }
154+ }
155+
156+ packagers {
157+ brew {
158+ active.set(Active .ALWAYS )
159+ repository.active.set(Active .ALWAYS )
160+ }
161+
162+ docker {
163+ active.set(Active .ALWAYS )
164+
165+ repository {
166+ repoOwner.set(" ClusterlessHQ" )
167+ name.set(" subpop-docker" )
168+ }
169+
170+ registries {
171+ create(" DEFAULT" ) {
172+ externalLogin.set(true )
173+ repositoryName.set(" clusterless" )
174+ }
175+ }
176+
177+ buildx {
178+ enabled.set(false )
179+ platform(" linux/amd64" )
180+ platform(" linux/arm64" )
181+ }
182+
183+ imageName(" {{owner}}/{{distributionName}}:{{projectVersion}}" )
184+
185+ if (buildRelease) {
186+ imageName(" {{owner}}/{{distributionName}}:{{projectVersionMajor}}" )
187+ imageName(" {{owner}}/{{distributionName}}:{{projectVersionMajor}}.{{projectVersionMinor}}" )
188+ imageName(" {{owner}}/{{distributionName}}:latest" )
189+ } else {
190+ imageName(" {{owner}}/{{distributionName}}:latest-wip" )
191+ }
192+ }
193+ }
194+ }
195+
196+ tasks.register(" release" ) {
197+ dependsOn(" distZip" )
198+ dependsOn(" jreleaserRelease" )
199+ dependsOn(" jreleaserPackage" )
200+ dependsOn(" jreleaserPublish" )
201+ }
0 commit comments