-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbuild.gradle
81 lines (69 loc) · 2.11 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
plugins {
id 'java'
// Apply the application plugin to add support for building a Java application
id 'application'
}
// Define the main class for the application
mainClassName = 'com.ra4king.circuitsim.gui.CircuitSimRunner'
group 'CircuitSim'
ext.moduleName = 'Project.com.ra4king.circuitsim.gui'
sourceCompatibility = JavaVersion.VERSION_14
// In this section you declare where to find the dependencies of your project
repositories {
// Use mavenCentral for resolving dependencies
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.10'
implementation "org.openjfx:javafx-base:19:win"
implementation "org.openjfx:javafx-base:19:linux"
implementation "org.openjfx:javafx-base:19:mac"
implementation "org.openjfx:javafx-controls:19:win"
implementation "org.openjfx:javafx-controls:19:linux"
implementation "org.openjfx:javafx-controls:19:mac"
implementation "org.openjfx:javafx-graphics:19:win"
implementation "org.openjfx:javafx-graphics:19:linux"
implementation "org.openjfx:javafx-graphics:19:mac"
implementation "org.openjfx:javafx-swing:19:win"
implementation "org.openjfx:javafx-swing:19:linux"
implementation "org.openjfx:javafx-swing:19:mac"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'com.google.truth:truth:1.1.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}
test {
useJUnitPlatform()
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
into 'resources', {
from 'resources'
}
inputs.property("moduleName", moduleName)
manifest {
attributes(
'Automatic-Module-Name': moduleName,
'Main-Class': mainClassName
)
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
compileJava {
inputs.property("moduleName", moduleName)
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'javafx.controls,javafx.swing',
'-Xlint:unchecked'
]
classpath = files()
}
}
task createJar(type: Copy) {
dependsOn 'jar'
into "$buildDir/libs"
from configurations.runtimeClasspath
}