@@ -4,19 +4,9 @@ plugins {
44 alias(libs.plugins.plugin.yml)
55 alias(libs.plugins.shadow)
66 alias(libs.plugins.liquibase)
7- alias(libs.plugins.publishdata)
87 `maven- publish`
98}
109
11- repositories {
12- mavenCentral()
13- maven(" https://repo.papermc.io/repository/maven-public/" )
14- maven(" https://oss.sonatype.org/content/groups/public/" )
15- maven(" https://libraries.minecraft.net" )
16- maven(" https://jitpack.io" )
17- maven(" https://maven.enginehub.org/repo/" )
18- }
19-
2010dependencies {
2111
2212 compileOnly(libs.paper)
@@ -46,11 +36,6 @@ dependencies {
4636
4737}
4838
49- publishData {
50- addBuildData()
51- useGitlabReposForProject(" 66" , " https://gitlab.onelitefeather.dev/" )
52- publishTask(" shadowJar" )
53- }
5439
5540java {
5641 toolchain {
@@ -71,7 +56,6 @@ tasks {
7156}
7257
7358paper {
74- version = publishData.getVersion(true )
7559 main = " ${rootProject.group} .pandorascluster.PandorasClusterPlugin"
7660 apiVersion = " 1.20"
7761 name = rootProject.name
@@ -168,25 +152,58 @@ paper {
168152
169153publishing {
170154 publications.create<MavenPublication >(" maven" ) {
171- // configure the publication as defined previously.
172- publishData.configurePublication(this )
173- version = publishData.getVersion(false )
155+ artifact(project.tasks.getByName(" shadowJar" ))
156+ version = rootProject.version as String
157+ artifactId = " pandoras-cluster"
158+ groupId = rootProject.group as String
159+ pom {
160+ name = " PandorasCluster"
161+ description =
162+ " A simple land management plugin for OneLiteFeather servers, providing basic features and utilities."
163+ url = " https://github.com/OneLiteFeatherNET/PandorasCluster"
164+ licenses {
165+ license {
166+ name = " AGPL-3.0"
167+ url = " https://www.gnu.org/licenses/agpl-3.0.en.html"
168+ }
169+ }
170+ developers {
171+ developer {
172+ id = " theShadowsDust"
173+ name = " theShadowsDust"
174+ 175+ }
176+ developer {
177+ id = " themeinerlp"
178+ name = " Phillipp Glanz"
179+ 180+ }
181+ }
182+ scm {
183+ connection = " scm:git:git://github.com:OneLiteFeatherNET/PandorasCluster.git"
184+ developerConnection
= " scm:git:ssh://[email protected] :OneLiteFeatherNET/PandorasCluster.git" 185+ url = " https://github.com/OneLiteFeatherNET/PandorasCluster"
186+ }
187+ }
174188 }
175189
176190 repositories {
177191 maven {
178- credentials(HttpHeaderCredentials ::class ) {
179- name = " Job-Token"
180- value = System .getenv(" CI_JOB_TOKEN" )
181- }
182192 authentication {
183- create(" header" , HttpHeaderAuthentication ::class )
193+ credentials(PasswordCredentials ::class ) {
194+ // Those credentials need to be set under "Settings -> Secrets -> Actions" in your repository
195+ username = System .getenv(" ONELITEFEATHER_MAVEN_USERNAME" )
196+ password = System .getenv(" ONELITEFEATHER_MAVEN_PASSWORD" )
197+ }
184198 }
185199
186-
187- name = " Gitlab"
188- // Get the detected repository from the publish data
189- url = uri(publishData.getRepository())
200+ name = " OneLiteFeatherRepository"
201+ val releasesRepoUrl = uri(" https://repo.onelitefeather.dev/onelitefeather-releases" )
202+ val snapshotsRepoUrl = uri(" https://repo.onelitefeather.dev/onelitefeather-snapshots" )
203+ url =
204+ if (version.toString().contains(" SNAPSHOT" ) || version.toString().contains(" BETA" ) || version.toString()
205+ .contains(" ALPHA" )
206+ ) snapshotsRepoUrl else releasesRepoUrl
190207 }
191208 }
192209}
0 commit comments