forked from RLBot/RLBot
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (84 loc) · 2.46 KB
/
build.gradle
File metadata and controls
103 lines (84 loc) · 2.46 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
93
94
95
96
97
98
99
100
101
102
103
apply plugin: 'idea'
apply plugin: 'kotlin'
apply plugin: 'application'
repositories {
// mavenLocal()
jcenter()
}
buildscript {
ext.kotlin_version = '1.3.71'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
def dllDirectory = 'build/dll'
applicationDefaultJvmArgs = [
"-Djna.library.path=" + dllDirectory,
"-Djava.library.path=" + dllDirectory,
"-XX:+UseG1GC",
"-Xms256m"
]
run {
systemProperty 'java.library.path', dllDirectory
}
test {
systemProperty 'java.library.path', dllDirectory
// This avoids running integration tests during the test target,
// which also runs during a build. To run integration tests, first go into
// IntelliJ settings and configure gradle to run tests with IntelliJ.
// Then open the test file and use the play buttons.
exclude 'tarehart/rlbot/integration/**'
}
dependencies {
// Fetch the framework jar file
compile 'org.rlbot.commons:framework:2.1+'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile group: 'org.ejml', name: 'ejml-fdense', version: '0.38'
// This directory will be created and the interface dll copied into it at runtime.
// The end result is that the interface dll will be on the classpath.
runtime files(dllDirectory)
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.jfree', name: 'jfreechart', version: '1.5.0'
testCompile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
}
mainClassName = 'tarehart.rlbot.ReliefBotMainKt'
// You can run gradew distZip to generate a zip file suitable for tournament submissions
distZip {
into ('README') {
from 'README_Tournament.md'
from fileTree('src/main/python') {
exclude '__pycache__'
}
}
}
installDist {
into ('../README') {
from 'README_Tournament.md'
from fileTree('src/main/python') {
exclude '__pycache__'
}
}
}
// https://github.com/gradle/gradle/issues/1989
startScripts {
doLast {
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*')
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
task createDllDirectory {
mkdir dllDirectory
}
run.dependsOn createDllDirectory