Skip to content

Commit

Permalink
coerce the mod into running at dev time (fabric & forge)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Aug 7, 2024
1 parent fd4291d commit ab38cdf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,12 @@ allprojects {
}
}
}

subprojects {
loom.mods {
main {
sourceSet("main")
sourceSet("main", project.rootProject)
}
}
}
11 changes: 8 additions & 3 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ plugins {
id 'io.github.goooler.shadow'
}

configurations.create("libs")
configurations.shadow {
extendsFrom(configurations.libs)
}
configurations.implementation {
extendsFrom(configurations.shadow)
extendsFrom(configurations.libs)
}

dependencies {
add('shadow', project([path: ":", configuration: "namedElements"]))
runtimeOnly(project(":").sourceSets.main.output)
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

shadow('ca.spottedleaf:concurrentutil:0.0.1-SNAPSHOT')
shadow("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
libs('ca.spottedleaf:concurrentutil:0.0.1-SNAPSHOT')
libs("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
}

processResources {
Expand Down
11 changes: 9 additions & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ repositories {
}
}

configurations.create("libs")
configurations.shadow {
extendsFrom(configurations.libs)
}
configurations.forgeExtra {
extendsFrom(configurations.libs)
}
configurations.implementation {
extendsFrom(configurations.shadow)
}
Expand All @@ -21,8 +28,8 @@ dependencies {
add('shadow', project([path: ":", configuration: "namedElements"]))
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"

shadow('ca.spottedleaf:concurrentutil:0.0.1-SNAPSHOT')
shadow("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
libs('ca.spottedleaf:concurrentutil:0.0.1-SNAPSHOT')
libs("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
}

processResources {
Expand Down

0 comments on commit ab38cdf

Please sign in to comment.