Skip to content

Commit

Permalink
build: Add Kuma jarjar
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed May 29, 2024
1 parent e7d83c4 commit bd07a91
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
1 change: 1 addition & 0 deletions common/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dependencies {
compileOnly "net.blay09.mods:kuma-api-common:20.6.1-SNAPSHOT"
compileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version"
}
13 changes: 0 additions & 13 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,6 @@ loom {
}
}

/*tasks.withType(JavaCompile).configureEach {
source(project(":shared").sourceSets.main.allSource)
source(project(":shared-bridge").sourceSets.main.allSource)
}
tasks.withType(Javadoc).configureEach {
source(project(":shared").sourceSets.main.allJava)
source(project(":shared-bridge").sourceSets.main.allJava)
}
tasks.named("sourcesJar", Jar) {
from(project(":shared").sourceSets.main.allSource)
from(project(":shared-bridge").sourceSets.main.allSource)
}*/

task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
dependsOn('build')
description = 'Publishes the Fabric build to CurseForge.'
Expand Down
2 changes: 2 additions & 0 deletions fabric/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ repositories {
}

dependencies {
include modApi("net.blay09.mods:kuma-api-fabric:20.6.1-SNAPSHOT")

modCompileOnly "mezz.jei:jei-$jei_minecraft_version-fabric-api:$jei_version"
if (jei_minecraft_version == minecraft_version) {
modRuntimeOnly "mezz.jei:jei-$jei_minecraft_version-fabric:$jei_version"
Expand Down
7 changes: 5 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ mixin {
config("${mod_id}.forge.mixins.json")
}

jarJar.enable()
build.finalizedBy tasks.jarJar

minecraft {
mappings channel: 'official', version: minecraft_version

Expand Down Expand Up @@ -97,7 +100,7 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {

apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none"

def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"))
def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}-all.jar"))
mainFile.changelog = rootProject.file('CHANGELOG.md').text
project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) }
mainFile.releaseType = "release"
Expand All @@ -108,7 +111,7 @@ modrinth {
projectId = project.modrinth_project_id
versionType = project.modrinth_release_type
versionNumber = project.version + "+forge-" + project.minecraft_version
uploadFile = jar
uploadFile = jarJar
changelog = rootProject.file("CHANGELOG.md").text
gameVersions = project.minecraft_versions.split(',').toList()
syncBodyFrom = rootProject.file("modpage.md").text
Expand Down
3 changes: 3 additions & 0 deletions forge/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
dependencies {
jarJar(group: "net.blay09.mods", name: "kuma-api-forge", version: "[20.6.0,20.7.0)") {
transitive = false
}
compileOnly("mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version")
if (jei_minecraft_version == minecraft_version) {
runtimeOnly("mezz.jei:jei-$jei_minecraft_version-forge:$jei_version")
Expand Down
4 changes: 2 additions & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {

apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none"

def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"))
def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}-all.jar"))
mainFile.changelog = rootProject.file('CHANGELOG.md').text
project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) }
mainFile.releaseType = "release"
Expand All @@ -84,7 +84,7 @@ modrinth {
projectId = project.modrinth_project_id
versionType = project.modrinth_release_type
versionNumber = project.version + "+neoforge-" + project.minecraft_version
uploadFile = jar
uploadFile = jarJar
changelog = rootProject.file("CHANGELOG.md").text
gameVersions = project.minecraft_versions.split(',').toList()
syncBodyFrom = rootProject.file("modpage.md").text
Expand Down
3 changes: 3 additions & 0 deletions neoforge/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
jarJar.enable()

dependencies {
jarJar(group: "net.blay09.mods", name: "kuma-api-neoforge", version: "[20.6.0,20.7.0)")
compileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version"
if (jei_minecraft_version == minecraft_version) {
runtimeOnly "mezz.jei:jei-$jei_minecraft_version-forge:$jei_version"
Expand Down

0 comments on commit bd07a91

Please sign in to comment.