Skip to content

Commit 774f9f6

Browse files
committed
chore: Clean up build configuration by removing unused repository definitions and updating project group and version
1 parent e40f123 commit 774f9f6

File tree

9 files changed

+58
-103
lines changed

9 files changed

+58
-103
lines changed

.gitattributes

Lines changed: 0 additions & 20 deletions
This file was deleted.

adapters/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ plugins {
22
id("java")
33
}
44

5-
group = "net.onelitefeather"
6-
7-
repositories {
8-
mavenCentral()
9-
}
10-
115
dependencies {
126
testImplementation(platform("org.junit:junit-bom:5.10.0"))
137
testImplementation("org.junit.jupiter:junit-jupiter")

adapters/database/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ plugins {
22
id("java")
33
}
44

5-
repositories {
6-
mavenCentral()
7-
}
8-
95
dependencies {
106

117
// Database

api/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
plugins {
22
id("java")
33
}
4-
5-
repositories {
6-
mavenCentral()
7-
}
8-
94
dependencies {
105

116
// Database

build.gradle.kts

Lines changed: 0 additions & 19 deletions
This file was deleted.

common/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ plugins {
22
id("java")
33
}
44

5-
group = "net.onelitefeather"
6-
7-
repositories {
8-
mavenCentral()
9-
}
10-
115
dependencies {
126

137
implementation(libs.caffeine)

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ org.gradle.caching=true
22
org.gradle.parallel=true
33
# org.gradle.warning.mode=all
44
# org.gradle.logging.level=info
5-
org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
5+
org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
6+
7+
group = net.onelitefeather
8+
version = 999.0.0

plugin/build.gradle.kts

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
2010
dependencies {
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

5540
java {
5641
toolchain {
@@ -71,7 +56,6 @@ tasks {
7156
}
7257

7358
paper {
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

169153
publishing {
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
}

settings.gradle.kts

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
rootProject.name = "PandorasCluster"
1+
import org.gradle.kotlin.dsl.mavenCentral
22

3-
pluginManagement {
4-
repositories {
5-
gradlePluginPortal()
6-
maven("https://eldonexus.de/repository/maven-public/")
7-
}
8-
}
3+
rootProject.name = "pandoras-cluster"
94

105
dependencyResolutionManagement {
11-
if (System.getenv("CI") != null) {
12-
repositoriesMode = RepositoriesMode.PREFER_SETTINGS
13-
repositories {
14-
maven("https://repo.htl-md.schule/repository/Gitlab-Runner/")
15-
}
6+
repositories {
7+
mavenCentral()
8+
maven("https://repo.papermc.io/repository/maven-public/")
9+
maven("https://oss.sonatype.org/content/groups/public/")
10+
maven("https://libraries.minecraft.net")
11+
maven("https://jitpack.io")
12+
maven("https://maven.enginehub.org/repo/")
1613
}
1714
versionCatalogs {
1815
create("libs") {
1916

2017
version("paper", "1.21.4-R0.1-SNAPSHOT")
2118
version("plugin.yml", "0.6.0")
2219
version("run-paper", "2.3.1")
23-
version("publishdata", "1.2.5-DEV")
2420
version("shadow", "8.1.1")
2521
version("liquibase", "2.2.2")
2622
version("guava", "33.3.1-jre")
2723

2824
plugin("plugin.yml", "net.minecrell.plugin-yml.paper").versionRef("plugin.yml")
2925
plugin("run.paper", "xyz.jpenilla.run-paper").versionRef("run-paper")
30-
plugin("publishdata", "de.chojo.publishdata").versionRef("publishdata")
3126
plugin("shadow", "com.github.johnrengelman.shadow").versionRef("shadow")
3227
plugin("liquibase", "org.liquibase.gradle").versionRef("liquibase")
3328

0 commit comments

Comments
 (0)