Skip to content

Commit

Permalink
hack around forge run classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed Aug 9, 2024
1 parent 81b93c4 commit 2397e83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ allprojects {
}

maven("https://libraries.minecraft.net")
maven("https://repo.spongepowered.org/repository/maven-public") {
content {
includeGroup("org.spongepowered")
}
}
}

java {
Expand Down Expand Up @@ -109,9 +114,9 @@ subprojects {
dependencies {
minecraft("com.mojang:minecraft:${rootProp["minecraft"]}")
mappings(loom.officialMojangMappings())
modCompileOnly("net.fabricmc:fabric-loader:${rootProp["fabricLoader"]}")

compileOnly("lol.bai:badpackets:mojmap-${rootProp["badpackets"]}")
compileOnly("org.spongepowered:mixin:0.8.5")

rootProp["jei"].split("-").also { (mc, jei) ->
compileOnly("mezz.jei:jei-${mc}-common-api:${jei}")
Expand Down
8 changes: 7 additions & 1 deletion platform/forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sourceSets {
resources.setSrcDirs(emptyList<Any>())

compileClasspath += main.compileClasspath + rootProject.sourceSets.main.get().compileClasspath
runtimeClasspath += main.runtimeClasspath
runtimeClasspath += main.runtimeClasspath - main.output

val dir = layout.buildDirectory.dir("run")
java.destinationDirectory = dir
Expand Down Expand Up @@ -83,6 +83,12 @@ minecraft {
}
}

afterEvaluate {
minecraft.runs.configureEach {
jvmArgs("-classpath", sourceSets["run"].runtimeClasspath.asPath)
}
}

mixin {
add(sourceSets["main"], "wthit.refmap.json")
config("wthit.mixins.json")
Expand Down

0 comments on commit 2397e83

Please sign in to comment.