forked from Xilinx/RapidWright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
46 lines (39 loc) · 1.12 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
apply plugin: 'application'
apply plugin: 'java-library'
mainClassName = "com.xilinx.rapidwright.MainEntrypoint"
sourceSets {
main {
java.destinationDirectory.fileValue(file('bin'))
java {
srcDirs = ['src']
}
}
test {
java {
srcDirs = ['test']
}
}
}
//Kryo needs to access sun.nio.ch.DirectBuffer. This is forbidden by default in Java 16 and up. Check if we need to add a jvm arg.
if (org.gradle.api.JavaVersion.current().isJava10Compatible()) {
applicationDefaultJvmArgs = ["--add-exports=java.base/sun.nio.ch=ALL-UNNAMED"]
}
test {
useJUnitPlatform()
maxHeapSize = "5G"
//Propagate JVM settings to test JVM
jvmArgs applicationDefaultJvmArgs
}
tasks.withType(Test) {
environment 'RAPIDWRIGHT_PATH',file('.')
//We need to rerun tests when the data files change
if (file('data').exists()) {
inputs.dir file('data')
}
}
sourceCompatibility = 8
targetCompatibility = 8
dependencies {
api fileTree(dir: 'jars', include: ['*.jar'], exclude: ['junit*.jar', '*-javadoc.jar'])
testImplementation fileTree(dir: 'jars', include: ['junit-jupiter-*.jar', 'junit-platform-*.jar'])
}