add module-info

This commit is contained in:
2026-02-12 10:49:01 -05:00
parent 7750cf3b83
commit cfb25f3775
7 changed files with 46 additions and 27 deletions
+22 -8
View File
@@ -9,6 +9,7 @@ plugins {
}
java {
modularity.inferModulePath = true
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
@@ -22,6 +23,10 @@ repositories {
mavenCentral()
}
application {
mainClass = 'edu.addressbook.view.ApplicationView'
}
javafx {
version = "25.0.1"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.web' ]
@@ -42,14 +47,23 @@ dependencies {
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
jar {
manifest {
attributes 'Automatic-Module-Name': group,
'Main-Class': application.mainClass,
'Class-Path': 'edu.addressbook.view edu.addressbook org.aspectj.runtime'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
application {
// Define the main class for the application.
mainClass = 'edu.addressbook.view.ApplicationView'
tasks.named('jar') {
manifest {
attributes(
'Automatic-Module-Name':'edu.addressbook',
'Implementation-Title': 'edu.addressbook',
'Implementation-Version': 1.0,
'Main-Class': application.mainClass,
'Class-Path': 'edu.addressbook org.aspectj.runtime' )
}
}