Skip to content

Commit f553dab

Browse files
authored
Merge pull request #18 from me6262/master
updated gradle build file to include new jar task
2 parents 6241025 + 4ffd1aa commit f553dab

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

app/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.gradle.jvm.tasks.Jar
23

34
/*
45
* This file was generated by the Gradle 'init' task.
@@ -43,6 +44,15 @@ dependencies {
4344
implementation(kotlin("script-util"))
4445
}
4546

47+
tasks.jar {
48+
manifest.attributes["Main-Class"] = "frc238.App"
49+
val dependencies = configurations
50+
.runtimeClasspath
51+
.get()
52+
.map(::zipTree) // OR .map { zipTree(it) }
53+
from(dependencies)
54+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
55+
}
4656
application {
4757
// Define the main class for the application.
4858
mainClass.set("frc238.App")

0 commit comments

Comments
 (0)