1
+ import org.jreleaser.model.Active
2
+ import org.jreleaser.model.Distribution
3
+ import org.jreleaser.model.Stereotype
1
4
import java.io.FileInputStream
2
5
import java.util.*
3
6
@@ -12,6 +15,7 @@ import java.util.*
12
15
plugins {
13
16
id(" com.github.johnrengelman.shadow" ) version " 8.1.1"
14
17
id(" io.micronaut.application" ) version " 4.4.3"
18
+ id(" org.jreleaser" ) version " 1.14.0"
15
19
}
16
20
17
21
val versionProperties = Properties ().apply {
@@ -30,6 +34,18 @@ group = "io.clusterless"
30
34
31
35
repositories {
32
36
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
+ }
33
49
}
34
50
35
51
dependencies {
@@ -50,9 +66,16 @@ dependencies {
50
66
}
51
67
52
68
application {
69
+ applicationName = " subpop"
53
70
mainClass = " io.clusterless.subpop.Main"
54
71
}
55
72
73
+ distributions {
74
+ main {
75
+ distributionBaseName.set(" subpop" )
76
+ }
77
+ }
78
+
56
79
java {
57
80
sourceCompatibility = JavaVersion .VERSION_21
58
81
targetCompatibility = JavaVersion .VERSION_21
@@ -82,3 +105,97 @@ micronaut {
82
105
tasks.named< io.micronaut.gradle.docker.NativeImageDockerfile > (" dockerfileNative" ) {
83
106
jdkVersion = " 21"
84
107
}
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