Skip to content

Commit b85c65d

Browse files
committed
Improve build performance by explicitly specifying repositories
1 parent c208824 commit b85c65d

File tree

6 files changed

+109
-30
lines changed

6 files changed

+109
-30
lines changed

buildSrc/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ plugins {
55

66
repositories {
77
mavenCentral()
8-
gradlePluginPortal()
98
}
109

1110
dependencies {

bukkit/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
`maven-publish`
66
grim.`base-conventions`
77
grim.`shadow-conventions`
8-
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
8+
id("de.eldoria.plugin-yml.bukkit") version "0.8.0"
99
id("xyz.jpenilla.run-paper") version "3.0.0-beta.1"
1010
}
1111

fabric/build.gradle.kts

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,105 @@ allprojects {
4141
if (BuildConfig.mavenLocalOverride) {
4242
mavenLocal()
4343
}
44-
maven {
45-
name = "FabricMC"
46-
url = uri("https://maven.fabricmc.net/")
44+
45+
exclusiveContent {
46+
forRepository {
47+
maven("https://maven.fabricmc.net/")
48+
}
49+
filter {
50+
includeGroup("net.fabricmc")
51+
includeGroup("net.fabricmc.fabric-api")
52+
}
4753
}
48-
maven("https://repo.grim.ac/snapshots") { // Grim API
49-
content {
54+
55+
exclusiveContent {
56+
forRepository {
57+
maven("https://repo.grim.ac/snapshots") // Grim API & PacketEvents
58+
}
59+
filter {
5060
includeGroup("ac.grim.grimac")
5161
includeGroup("com.github.retrooper")
5262
}
5363
}
54-
maven("https://jitpack.io/") {
55-
content {
56-
excludeGroup("ac.grim.grimac")
57-
excludeGroup("com.github.retrooper")
58-
}
59-
}// Conditional Mixin
60-
maven("https://repo.viaversion.com") // ViaVersion
61-
maven("https://nexus.scarsz.me/content/repositories/releases") // Configuralize
62-
maven("https://repo.opencollab.dev/maven-snapshots/") // Floodgate
63-
maven("https://repo.opencollab.dev/maven-releases/") // Cumulus (for Floodgate)
64-
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
65-
mavenCentral() // FastUtil
64+
65+
exclusiveContent {
66+
forRepository {
67+
maven("https://jitpack.io") { // Conditional Mixin
68+
mavenContent { releasesOnly() }
69+
}
70+
}
71+
filter {
72+
includeGroup("com.github.Fallen-Breath.conditional-mixin")
73+
}
74+
}
75+
76+
exclusiveContent {
77+
// The repository URL is determined by the project's name
78+
if (project.name == "mc1161") {
79+
// For the 1.16.1 subproject, the old snapshot is on the Grim repo
80+
forRepository {
81+
maven("https://repo.grim.ac/snapshots")
82+
}
83+
} else {
84+
// For all other subprojects, the releases are on Maven Central
85+
forRepository {
86+
mavenCentral()
87+
}
88+
}
89+
// This filter applies to whichever repository was chosen above
90+
filter {
91+
includeGroup("me.lucko")
92+
}
93+
}
94+
95+
exclusiveContent {
96+
forRepository {
97+
maven("https://repo.viaversion.com") { // ViaVersion
98+
mavenContent { releasesOnly() }
99+
}
100+
}
101+
filter {
102+
includeGroup("com.viaversion")
103+
}
104+
}
105+
106+
exclusiveContent {
107+
forRepository {
108+
maven("https://nexus.scarsz.me/content/repositories/releases") { // Configuralize
109+
mavenContent { releasesOnly() }
110+
}
111+
}
112+
filter {
113+
includeGroup("github.scarsz")
114+
}
115+
}
116+
117+
exclusiveContent {
118+
forRepository {
119+
maven("https://repo.opencollab.dev/maven-releases/") { // Cumulus (for Floodgate)
120+
mavenContent { releasesOnly() }
121+
}
122+
}
123+
filter {
124+
includeGroup("org.geysermc.api")
125+
}
126+
}
127+
128+
exclusiveContent {
129+
forRepository {
130+
maven("https://repo.opencollab.dev/maven-snapshots/") { // Floodgate
131+
mavenContent { snapshotsOnly() }
132+
}
133+
}
134+
filter {
135+
includeGroup("org.geysermc.floodgate")
136+
includeGroup("org.geysermc.cumulus")
137+
includeModule("org.geysermc", "common")
138+
includeModule("org.geysermc", "geyser-parent")
139+
}
140+
}
141+
142+
mavenCentral()
66143
}
67144

68145
loom {

fabric/mc1161/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
repositories {
2-
maven("https://repo.grim.ac/snapshots")
3-
maven("https://oss.sonatype.org/content/repositories/snapshots")
4-
mavenCentral()
5-
}
6-
71
dependencies {
82
minecraft("com.mojang:minecraft:1.16.1")
93
mappings("net.fabricmc:yarn:1.16.1+build.21:v2")

libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ cloud-fabric = "2.0.0-beta.12"
99
cloud-processors-requirements = "1.0.0-rc.1"
1010

1111
# --- Minecraft-Specific APIs ---
12-
configuralize = "1.4.1" # :slim classifier is applied in build.gradle.kts
1312
floodgate-api = "2.0-SNAPSHOT"
1413
geyser-base-api = "1.0.2"
1514
grim-api = "1.2.0.0"
@@ -23,6 +22,7 @@ hikaricp = "7.0.2"
2322
jetbrains-annotations = "24.1.0"
2423
netty = "4.1.85.Final"
2524
snakeyaml = "2.2"
25+
configuralize = "1.4.1" # :slim classifier is applied in build.gradle.kts
2626

2727
# --- Build & Tooling ---
2828
fabric-loader = "0.16.14"

settings.gradle.kts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ dependencyResolutionManagement {
1212

1313
pluginManagement {
1414
repositories {
15-
maven {
16-
name = "FabricMC"
17-
url = uri("https://maven.fabricmc.net/")
15+
// For the Fabric Loom plugin
16+
exclusiveContent {
17+
forRepository {
18+
maven {
19+
name = "FabricMC"
20+
url = uri("https://maven.fabricmc.net/")
21+
}
22+
}
23+
filter {
24+
includeModule("fabric-loom", "fabric-loom.gradle.plugin")
25+
includeGroupByRegex("net.fabricmc.*")
26+
}
1827
}
19-
mavenCentral()
28+
2029
gradlePluginPortal()
2130
}
2231
}

0 commit comments

Comments
 (0)