Skip to content

Commit

Permalink
shadow (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpingpxl authored Aug 18, 2023
1 parent 3a9a3ba commit 79e5076
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ subprojects {
maven("https://libraries.minecraft.net/")
maven("https://repo.spongepowered.org/repository/maven-public/")
}

val shade = configurations.create("shade")
val api by configurations
api.extendsFrom(shade)
}

fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionProvider, gameVersion: String) {
Expand Down
18 changes: 16 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ version = "0.1.0"

plugins {
id("java-library")
id("com.github.johnrengelman.shadow") version ("7.0.0")
}

dependencies {
api(project(":api"))
api(files("../libs/weave.jar"))
shade(files("../libs/weave.jar"))

// If you want to use external libraries, you can do that here.
// The dependencies that are specified here are loaded into your project but will also
Expand All @@ -24,4 +25,17 @@ labyModProcessor {
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

tasks {
shadowJar {
archiveClassifier.set("")
archiveBaseName.set("core")

dependencyFilter.exclude {
!(it.moduleGroup.startsWith("Cubepanion") || it.moduleGroup.equals("org.cubepanion"))
}
}

getByName("jar").finalizedBy("shadowJar")
}

0 comments on commit 79e5076

Please sign in to comment.