Skip to content

Commit edeffde

Browse files
Rework dependency usage and bom creation
Rework bom creation and dependency handling
2 parents dee362f + 47d2b29 commit edeffde

File tree

2 files changed

+57
-50
lines changed

2 files changed

+57
-50
lines changed

build.gradle.kts

Lines changed: 32 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,51 @@
11
plugins {
22
`maven-publish`
3+
`java-platform`
34
}
45

5-
version = "1.0.6"
6+
group = "net.theevilreaper.mycelium.bom"
7+
version = "1.1.0"
68

7-
repositories {
8-
mavenCentral()
9+
javaPlatform {
10+
allowDependencies()
911
}
1012

11-
subprojects {
12-
apply {
13-
plugin<MavenPublishPlugin>()
13+
dependencies {
14+
constraints {
15+
api(libs.microtus)
16+
api(libs.microtus.testing)
17+
api(libs.adventure.text.minimessage)
18+
api(libs.junit.jupiter.api)
19+
api(libs.junit.jupiter.engine)
20+
api(libs.mockito.core)
21+
api(libs.mockito.junit.jupiter)
1422
}
1523
}
1624

17-
subprojects {
18-
group = "net.theevilreaper.mycelium.bom"
19-
version = rootProject.version
2025

21-
repositories {
22-
mavenCentral()
23-
}
24-
25-
publishing {
26-
publications {
27-
create<MavenPublication>("maven") {
28-
pom {
29-
name.set("${project.name} ${project.version}")
30-
description.set("Bill of materials for the Dungeon project")
31-
developers {
32-
developer {
33-
name.set("OneliteFeather")
34-
contributors {
35-
contributor {
36-
name.set("theEvilReaper")
37-
}
38-
contributor {
39-
name.set("TheMeinerLP")
40-
}
26+
publishing {
27+
publications {
28+
create<MavenPublication>("maven") {
29+
pom {
30+
name.set("${project.name} ${project.version}")
31+
description.set("Bill of materials for the Mycelium project")
32+
developers {
33+
developer {
34+
name.set("OneliteFeather")
35+
contributors {
36+
contributor {
37+
name.set("theEvilReaper")
38+
}
39+
contributor {
40+
name.set("TheMeinerLP")
4141
}
4242
}
4343
}
44-
45-
issueManagement {
46-
system.set("GitLab")
47-
url.set("https://gitlab.onelitefeather.dev/dungeon/bom/-/issues")
48-
}
4944
}
50-
}
5145

52-
if (System.getenv().containsKey("CI")) {
53-
repositories {
54-
maven {
55-
name = "GitLab"
56-
val ciApiv4Url = System.getenv("CI_API_V4_URL")
57-
val projectId = System.getenv("CI_PROJECT_ID")
58-
url = uri("$ciApiv4Url/projects/$projectId/packages/maven")
59-
credentials(HttpHeaderCredentials::class.java) {
60-
name = "Job-Token"
61-
value = System.getenv("CI_JOB_TOKEN")
62-
}
63-
authentication {
64-
create<HttpHeaderAuthentication>("header")
65-
}
66-
}
46+
issueManagement {
47+
system.set("Github")
48+
url.set("https://github.com/OneLiteFeatherNET/Mycelium-bom/issues")
6749
}
6850
}
6951
}

settings.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
rootProject.name = "mycelium-bom"
22

3+
dependencyResolutionManagement {
4+
repositories {
5+
mavenCentral()
6+
}
7+
versionCatalogs {
8+
create("libs") {
9+
version("microtus", "1.5.0")
10+
version("adventure", "4.19.0")
11+
version("junit", "5.11.3")
12+
version("mockito", "5.14.2")
13+
version("shadow", "8.3.6")
14+
15+
library("microtus", "net.onelitefeather.microtus", "Microtus").versionRef("microtus")
16+
library("microtus-testing", "net.onelitefeather.microtus.testing", "testing").versionRef("microtus")
17+
library("adventure-text-minimessage", "net.kyori", "adventure-text-minimessage").versionRef("adventure")
18+
library("junit-jupiter-api", "org.junit.jupiter", "junit-jupiter-api").versionRef("junit")
19+
library("junit-jupiter-engine", "org.junit.jupiter", "junit-jupiter-engine").versionRef("junit")
20+
library("mockito-core", "org.mockito", "mockito-core").versionRef("mockito")
21+
library("mockito-junit-jupiter", "org.mockito", "mockito-junit-jupiter").versionRef("mockito")
22+
23+
plugin("shadow", "com.gradleup.shadow").versionRef("shadow")
24+
}
25+
}
26+
}
27+
328
include("base")

0 commit comments

Comments
 (0)