-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
69 lines (54 loc) · 1.66 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
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'application'
description = 'Advanced IRC Robot'
mainClassName = 'expectusafterlun.ch.jrobo.JRobo'
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/junit/junit
//testImplementation group: 'junit', name: 'junit', version: '4.13.2'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
}
jar {
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' '),
'Main-Class': 'expectusafterlun.ch.jrobo.JRobo'
)
}
}
tasks.register('uberJar', Jar) {
archiveClassifier = 'uber'
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' '),
'Main-Class': 'expectusafterlun.ch.jrobo.JRobo'
)
}
}
// https://stackoverflow.com/questions/55433883/how-to-enable-java-12-preview-features-with-gradle
tasks.withType(JavaCompile).each {
it.options.compilerArgs.add('--enable-preview')
}
tasks.withType(JavaExec) {
jvmArgs += '--enable-preview'
}
test {
jvmArgs(['--enable-preview'])
// Has too many dependencies, takes up too much disk space
// useJUnitPlatform()
}
task runPython(type:Exec) {
workingDir 'src/main/resources/python'
// commandLine 'python', 'torrent.py'
}