Skip to content

Commit

Permalink
Properly compile to ensure refmaps generate
Browse files Browse the repository at this point in the history
Signed-off-by: TheSilkMiner <thesilkminer@outlook.com>
  • Loading branch information
TheSilkMiner committed Jul 22, 2022
1 parent 44df4b3 commit 2027f63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
15 changes: 10 additions & 5 deletions fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ dependencies {
}

tasks {
compileJava {
sequenceOf(project(":core"), project(":vanilla"))
.map { it.sourceSets }
.flatMap { sequenceOf(it.api.get(), it.main.get()) }
.forEach { source(it.allSource) }
}
processResources {
outputs.upToDateWhen { false }

Expand All @@ -91,11 +97,10 @@ tasks {
dependsOn(project.tasks.remapJar)
}
jar {
sequenceOf(project(":core"), project(":vanilla")).forEach { p ->
sequenceOf(p.sourceSets.api.get(), p.sourceSets.main.get()).forEach {
from(it.output)
}
}
sequenceOf(project(":core"), project(":vanilla"))
.map { it.sourceSets }
.flatMap { sequenceOf(it.main.get(), it.api.get()) }
.forEach { from(it.resources) }
duplicatesStrategy = DuplicatesStrategy.FAIL
}
}
10 changes: 8 additions & 2 deletions forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ dependencies {
}

tasks {
compileJava {
sequenceOf(project(":core"), project(":vanilla"))
.map { it.sourceSets }
.flatMap { sequenceOf(it.main.get(), it.api.get()) }
.forEach{ source(it.allSource) }
}
publishToCurseForge {
with(upload(project.extra["mod.curse-id"], project.buildDir.resolve("libs/${base.archivesName.get()}-${project.extra["mod.version"]}.jar"))) {
changelogType = net.darkhax.curseforgegradle.Constants.CHANGELOG_MARKDOWN
Expand All @@ -101,10 +107,10 @@ tasks {
}
}
jar {
sequenceOf(project, project(":core"), project(":vanilla"))
sequenceOf(project(":core"), project(":vanilla"))
.map { it.sourceSets }
.flatMap { sequenceOf(it.main.get(), it.api.get()) }
.forEach { from(it.output) }
.forEach { from(it.resources) }
duplicatesStrategy = DuplicatesStrategy.FAIL
}
}
Expand Down

0 comments on commit 2027f63

Please sign in to comment.