Skip to content

Commit

Permalink
jar is now configured with a manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Emissions committed Feb 15, 2024
1 parent 2a23000 commit 597af4f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,30 @@ java {
}
}

// configure jar
tasks.jar {
manifest {
attributes["Main-Class"] = "uk.ac.york.student.Main"
}
from(sourceSets.main.get().output)
}

tasks.withType(JavaCompile::class).configureEach {
options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release = targetJavaVersion
}
}

sourceSets.main {
java {
srcDir("src/main/java")
}
resources {
srcDir("src/main/resources")
}
}

tasks.test {
useJUnitPlatform()
}

0 comments on commit 597af4f

Please sign in to comment.