-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (68 loc) · 2.03 KB
/
build.gradle
File metadata and controls
92 lines (68 loc) · 2.03 KB
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
82
83
84
85
86
87
88
89
90
91
92
plugins {
id 'java'
id("com.diffplug.spotless") version "7.0.2"
}
group 'com.basic4gl.library'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
configurations {
release.extendsFrom configurations.default
}
dependencies {
implementation fileTree(dir: "libs", include: "*.jar")
implementation project(":runtime")
implementation project(":compiler")
implementation project(":debugProtocol")
// for debugger
implementation ('com.google.code.gson:gson:2.10')
implementation ('javax.websocket:javax.websocket-api:1.0')
implementation ('org.eclipse.jetty.websocket:javax-websocket-client-impl:9.4.49.v20220914')
// for program arguments
implementation("commons-cli:commons-cli:1.6.0")
// for PCX image support
implementation("org.apache.commons:commons-imaging:1.0-alpha3")
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
spotless {
java {
// Use the default importOrder configuration
importOrder()
removeUnusedImports()
palantirJavaFormat('2.50.0').formatJavadoc(false)
formatAnnotations()
trimTrailingWhitespace()
endWithNewline()
}
}
build.dependsOn spotlessApply
task copyToLib( type: Copy ) {
into "$buildDir/libs/lib"
from configurations.release
}
jar {
dependsOn copyToLib
def classPath = configurations.release.files.collect { it.name }.join(' ')
from {
(configurations.release).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes (
'Main-Class': 'com.basic4gl.library.desktopgl.GLTextGridWindow',
'Class-Path': classPath
)
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude 'META-INF/.RSA', 'META-INF/.SF', 'META-INF/*.DSA'
rootProject.ext.set("libraryJarPath", jar.archiveFile.get())
doLast {
new File(projectDir, "class-path.txt").text = classPath
}
}
test {
useJUnitPlatform()
}