Skip to content

Commit

Permalink
Fix source jar not building and refmap
Browse files Browse the repository at this point in the history
+ Fix mixin crash, mainly on forge
  • Loading branch information
Wyn-Price committed Nov 15, 2022
1 parent c4388c1 commit f0d8747
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ minecraft {
}

dependencies {
compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
}

processResources {
Expand Down Expand Up @@ -51,4 +51,4 @@ publishing {
url "file://" + System.getenv("local_maven")
}
}
}
}
2 changes: 1 addition & 1 deletion Common/src/main/resources/campanion.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"injectors": {
"defaultRequire": 1
},
"refmap": "campanion-refmap.json"
"refmap": "campanion.refmap.json"
}
11 changes: 7 additions & 4 deletions Fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'idea'
}

archivesBaseName = "${mod_name}-fabric-${minecraft_version}"

apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.5/fabric-mod.gradle'
apply from: 'https://raw.githubusercontent.com/Wyn-Price/GradleScripts/2.5/multiproject-ferry/loader.gradle'

dependencies {
Expand Down Expand Up @@ -34,6 +33,10 @@ loom {
}
}

jar {
rename "${archivesBaseName}-refmap.json", 'campanion.refmap.json'
}

processResources {
from project(":Common").sourceSets.main.resources
inputs.property "version", project.version
Expand Down
5 changes: 3 additions & 2 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ minecraft {
}

mixin {
add sourceSets.main, "modid.refmap.json"
add sourceSets.main, "campanion.refmap.json"
config "campanion.mixins.json"
}

sourceSets.main.resources.srcDir 'src/generated/resources'

dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
compileOnly project(":Common")
annotationProcessor group:'org.spongepowered', name:'mixin', version:'0.8.5', classifier: 'processor'
compileOnly project(":Common")
}

tasks.withType(JavaCompile) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subprojects {
apply plugin: 'java'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
// java.withSourcesJar()
java.withSourcesJar()
java.withJavadocJar()

jar {
Expand Down

0 comments on commit f0d8747

Please sign in to comment.