Skip to content

Commit

Permalink
Fix fabric build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tisawesomeness committed Jul 27, 2022
1 parent 730a1d0 commit 43e9af3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions bp-fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import net.fabricmc.loom.task.RemapJarTask

plugins {
id 'bp-conventions'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "${shadow_version}"
}

repositories {
Expand Down Expand Up @@ -70,3 +73,24 @@ publishing {
// retrieving dependencies.
}
}

shadowJar {
dependencies {
exclude('net.fabricmc:.*')
include(project(':bp-core'))
exclude '/mappings/*'
}
}

task remappedShadowJar(type: RemapJarTask) {
dependsOn tasks.shadowJar
input.set(tasks.shadowJar.archiveFile)
addNestedDependencies.set(true)
}

tasks.assemble.dependsOn tasks.remappedShadowJar

artifacts {
archives remappedShadowJar
shadow shadowJar
}
2 changes: 1 addition & 1 deletion bp-spigot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'bp-conventions'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id "com.github.johnrengelman.shadow" version "${shadow_version}"
}

repositories {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ archives_base_name=betterpreview
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.57.0+1.19
# Plugin versions
shadow_version=7.1.2

0 comments on commit 43e9af3

Please sign in to comment.