1234567891011121314151617181920212223242526272829303132333435363738 |
- plugins {
- id 'application'
- }
- version = '1.0.0'
- sourceSets {
- main {
- java.srcDirs = ['src']
- resources.srcDirs = ['resources']
- }
- }
- java {
- toolchain {
- languageVersion = JavaLanguageVersion.of(21)
- }
- }
- application {
- mainClass = 'battleship.Entrypoint'
- }
- task fatJar(type: Jar) {
- from {
- configurations.runtimeClasspath.collect {
- it.isDirectory() ? it : zipTree(it)
- }
- }
- manifest {
- attributes('Main-Class': application.mainClass)
- }
- duplicatesStrategy = DuplicatesStrategy.EXCLUDE
- archiveBaseName = project.name
- archiveVersion = project.version
- with jar
- }
|