/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java application project to get you started. * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.3/userguide/building_java_projects.html in the Gradle documentation. */ plugins { // Apply the application plugin to add support for building a CLI application in Java. id 'application' id 'eclipse' } mainClassName = 'com.cringe_studios.magicianproject.App' repositories { // Use Maven Central for resolving dependencies. mavenCentral() } dependencies { // This dependency is used by the application. implementation 'net.java.dev.jna:jna:5.13.0' } // Apply a specific Java toolchain to ease working on different environments. java { toolchain { languageVersion = JavaLanguageVersion.of(17) } } application { // Define the main class for the application. mainClass = project.mainClassName } task dist(type: Jar) { duplicatesStrategy(DuplicatesStrategy.EXCLUDE) manifest { attributes 'Main-Class': project.mainClassName } dependsOn configurations.runtimeClasspath from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } with jar } configure(dist) { group = 'build' description = 'Build a JAR with all dependencies' }