Skip to content
Snippets Groups Projects
Commit 44e5088c authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

updated project with shadow

parent 3cf18be7
No related branches found
No related tags found
No related merge requests found
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'java'
id 'application'
id 'checkstyle'
......@@ -6,15 +7,13 @@ plugins {
id 'pmd'
id "com.github.spotbugs" version "5.0.13"
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.beryx.jlink' version '2.26.0'
}
group 'fr.univ_amu'
version '1.0-SNAPSHOT'
javafx {
version = "21"
modules = [ 'javafx.controls', 'javafx.fxml' ]
modules = [ 'javafx.controls']
}
checkstyle {
......@@ -37,6 +36,7 @@ dependencies {
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
......@@ -46,15 +46,7 @@ test {
}
application {
mainClass = 'sample.App'
}
tasks.named('jar') {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version,
'main-Class': application.mainClass )
}
mainClass = 'sample.Main'
}
spotbugs {
......@@ -74,6 +66,14 @@ spotbugsMain {
}
}
jar {
manifest {
attributes("Implementation-Title": project.name,
"Implementation-Version": version,
"Main-Class": application.mainClass)
}
}
spotbugsTest {
reports {
html {
......
module sample {
requires javafx.controls;
exports sample;
}
\ No newline at end of file
package sample;
public class Main {
public static void main(String[] args){
MyApplication.main(args);
}
}
package sample;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.image.Image;
......@@ -7,7 +6,7 @@ import javafx.scene.image.ImageView;
import javafx.stage.Stage;
public class App extends Application {
public class MyApplication extends javafx.application.Application {
@Override
public void start(Stage stage) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment