-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
75 lines (62 loc) · 1.69 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
plugins {
id 'java'
id 'idea'
id "com.github.ben-manes.versions" version "0.42.0"
id 'com.github.spotbugs' version '5.0.12'
}
group 'io.github.sebastian-0'
version '0.6-SNAPSHOT'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'com.github.oshi:oshi-core:6.2.2'
implementation 'net.java.dev.jna:jna:5.12.1'
implementation 'net.java.dev.jna:jna-platform:5.12.1'
implementation 'ch.qos.logback:logback-classic:1.4.0'
implementation 'com.miglayout:miglayout-core:11.0'
implementation 'com.miglayout:miglayout-swing:11.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
spotbugs {
ignoreFailures = true
excludeFilter = file('SpotBugsExclude.xml')
}
spotbugsMain {
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
task copyToLib( type: Copy ) {
into "$buildDir/libs/lib"
from configurations.runtimeClasspath
}
task copyTextures( type: Copy ) {
into "$buildDir/libs/textures"
from "$projectDir/textures"
include "*.png"
}
jar {
manifest {
attributes 'Main-Class':'taskmanager.ui.TaskManager',
'Class-Path': configurations.runtimeClasspath.files.collect { "lib/$it.name" }.join(' ')
}
dependsOn copyToLib, copyTextures
}
task packageDistibution(type: Zip) {
dependsOn(jar, copyToLib, copyTextures)
archiveFileName = "${project.name}-${project.version}.zip"
destinationDirectory = file("$buildDir")
from "$buildDir/libs"
}
build {
dependsOn packageDistibution
}