Skip to content

Commit

Permalink
Go back to using ForgeGradle, use FancyGradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Barteks2x committed Dec 26, 2023
1 parent 974add4 commit 829c535
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ plugins {
`maven-publish`
signing
idea
id("net.neoforged.gradle").version("[6.0.18,6.2)")
id("net.minecraftforge.gradle").version("6.0.18")
id("wtf.gofancy.fancygradle").version("1.1.3-0")
id("org.spongepowered.mixin").version("0.7-SNAPSHOT")
id("com.github.johnrengelman.shadow").version("7.1.2")
id("com.github.hierynomus.license").version("0.16.1")
Expand Down Expand Up @@ -43,6 +44,16 @@ mcGitVersion {

java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))

fancyGradle {
patches {
resources
coremods
codeChickenLib
asm
mergetool
}
}

minecraft {
mappings("stable", "39-1.12")

Expand Down
8 changes: 8 additions & 0 deletions mixinLoadingHacks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ abstract class RenameForMixinFmlAgentTransform implements TransformAction<Transf
void transform(TransformOutputs outputs) {
def input = inputArtifact.get().asFile
if (input.name.contains('CubicChunks')) {
if (!input.exists()) {
// For some reason, for this specific project (what is special here?), when intellij is importing it
// an exception in artifact transforms actually makes it fail to build the model
// An exception normally always happens in this situation (transforming a composite build dependency substitution)
// but for CubicWorldGen specifically it causes an error in intellij
// as a workaround, return here to not throw an exception, this seems to make intellij happy
return;
}
def renamedJar = outputs.file('hackForMixinFMLAgent_deobfedDeps_' + input.name)
Files.copy(input.toPath(), renamedJar.toPath())
} else if (input.name.contains('223896')) {
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ pluginManagement {
maven {
setUrl("https://repo.spongepowered.org/repository/maven-public/")
}
maven {
name = "Garden of Fancy"
setUrl("https://maven.gofancy.wtf/releases")
}
}
resolutionStrategy {
eachPlugin {
Expand Down

0 comments on commit 829c535

Please sign in to comment.