File tree 3 files changed +55
-2
lines changed
3 files changed +55
-2
lines changed Original file line number Diff line number Diff line change 36
36
- name : Build
37
37
uses : gradle/gradle-build-action@v2
38
38
with :
39
- arguments : checkLicenses build
39
+ arguments : build
40
40
41
41
- name : Perform CodeQL Analysis
42
42
uses : github/codeql-action/analyze@v2
Original file line number Diff line number Diff line change 24
24
- name : Publish
25
25
uses : gradle/gradle-build-action@v2
26
26
with :
27
- arguments : :lib: publish
27
+ arguments : publish
28
28
env :
29
29
SNAPSHOT : ${{ env.release.prerelease }}
30
30
NEXUS_REPOSITORY_URL : ${{ env.release.prerelease == 'true' && secrets.NEXUS_SNAPSHOT_URL || secrets.NEXUS_RELEASE_URL }}
Original file line number Diff line number Diff line change 22
22
import java.time.format.DateTimeFormatter // gradle treats java.time as the java extension, not an import
23
23
24
24
plugins {
25
+ java
26
+ `maven- publish`
25
27
id(" fabric-loom" ) version(" 0.12-SNAPSHOT" )
26
28
id(" io.github.juuxel.loom-quiltflower" ) version(" 1.7.3" )
27
29
id(" org.cadixdev.licenser" ) version(" 0.6.1" )
@@ -144,3 +146,54 @@ tasks.withType<Jar>() {
144
146
)
145
147
}
146
148
}
149
+
150
+ publishing {
151
+ publications {
152
+ register(" mavenJava" , MavenPublication ::class ) {
153
+ groupId = group.toString()
154
+ artifactId = modId
155
+ version = version
156
+ if (System .getenv(" SNAPSHOT" ) == " true" ) {
157
+ version + = " -SNAPSHOT"
158
+ }
159
+
160
+ from(components[" java" ])
161
+
162
+ pom {
163
+ organization {
164
+ name.set(" Team Galacticraft" )
165
+ url.set(" https://github.com/TeamGalacticraft" )
166
+ }
167
+
168
+ scm {
169
+ url.set(" https://github.com/TeamGalacticraft/DynamicDimensions" )
170
+ connection.set(" scm:git:git://github.com/TeamGalacticraft/DynamicDimensions.git" )
171
+ developerConnection.set(
" scm:git:[email protected] :TeamGalacticraft/DynamicDimensions.git" )
172
+ }
173
+
174
+ issueManagement {
175
+ system.set(" github" )
176
+ url.set(" https://github.com/TeamGalacticraft/DynamicDimensions/issues" )
177
+ }
178
+
179
+ licenses {
180
+ license {
181
+ name.set(" MIT" )
182
+ url.set(" https://github.com/TeamGalacticraft/DynamicDimensions/blob/main/LICENSE" )
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ repositories {
190
+ if (System .getenv().containsKey(" NEXUS_REPOSITORY_URL" )) {
191
+ maven(System .getenv(" NEXUS_REPOSITORY_URL" )!! ) {
192
+ credentials {
193
+ username = System .getenv(" NEXUS_USER" )
194
+ password = System .getenv(" NEXUS_PASSWORD" )
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
You can’t perform that action at this time.
0 commit comments