Skip to content

Commit

Permalink
Fix jar not including dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Nov 2, 2022
1 parent 42e4e7f commit fcbb5f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ plugins {
java
}

sourceSets["main"].kotlin.srcDirs("src")
sourceSets["main"].java.srcDirs("src")
sourceSets["main"].kotlin.srcDir("src")
sourceSets["main"].java.srcDir("src")

java {
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -21,4 +21,12 @@ dependencies {
compileOnly("com.github.anuken.mindustryjitpack:core:v140")

annotationProcessor("com.github.Anuken:jabel:0.9.0")
}

tasks.jar {
from(configurations.runtimeClasspath.get().map { if (it.isDirectory()) it else zipTree(it) })
from(rootDir){
include("plugin.hjson")
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

0 comments on commit fcbb5f6

Please sign in to comment.