This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
97 lines (83 loc) · 3.65 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
// Kotlin versions: https://kotlinlang.org/releases.html
id 'org.jetbrains.kotlin.jvm' version '1.5.20'
id "org.graalvm.plugin.compiler" version "0.1.0-alpha2"
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
graal { version = "20.2.0" }
group 'omicron'
version '1.0-SNAPSHOT'
apply plugin: 'antlr'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.8
// fix to stop gradle from nuking my source code due to some random bug
// NOTE: inherited from our last Kotlin project, Omicontrol, may be fixed by now? please?
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
//mavenLocal()
mavenCentral()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
// we had to remove jcenter, but if it blows up, we might have to add that back
}
dependencies {
// TODO update all "implementation group" ones to just be implementation
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'org.tinylog:tinylog-api-kotlin:2.0.0'
implementation 'org.tinylog:tinylog-impl:2.0.0'
implementation 'org.apache.commons:commons-math3:3.6.1' // note: watch for math4 release
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.esotericsoftware.yamlbeans:yamlbeans:1.14'
implementation group: 'net.objecthunter', name: 'exp4j', version: '0.4.8'
implementation group: 'org.locationtech.jts', name: 'jts-core', version: '1.18.0'
implementation group: 'org.jfree', name: 'jfreechart', version: '1.5.0' // TODO REMOVE
implementation group: 'org.jfree', name: 'jfreechart-fx', version: '1.0.1' // TODO REMOVE
implementation 'com.github.fzakaria:ascii85:1.2' // TODO possibly remove
// Oracle killed Nashorn (why??) so we have to use this Graal crap instead (it's super annoying)
implementation "org.graalvm.sdk:graal-sdk:20.2.0" // TODO do we need this?
implementation "org.graalvm.js:js:20.2.0"
implementation "org.graalvm.js:js-scriptengine:20.2.0"
implementation "org.reflections:reflections:0.9.12"
// Jetty is used for the debug server, maybe can ignore it for dist
// See: https://github.com/jetty-project/embedded-jetty-websocket-examples/tree/10.0.x/javax.websocket-example
implementation "jakarta.websocket:jakarta.websocket-api:1.1.2"
implementation "org.eclipse.jetty.websocket:websocket-javax-server:10.0.2"
implementation 'org.slf4j:slf4j-api:1.8.0-beta4'
implementation 'org.slf4j:slf4j-simple:1.8.0-beta4'
antlr "org.antlr:antlr4:4.9"
implementation "org.antlr:antlr4-runtime:4.9"
testImplementation group: 'junit', name: 'junit', version: '4.12'
// graveyard
//implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.5.20'
//implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
//implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}
test {
useJUnit()
}
javafx {
version = "11"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
mainClassName = "io.github.omicron2d.TeamMain"
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
// use new Kotlin IR backend
// ref: https://blog.jetbrains.com/kotlin/2021/02/the-jvm-backend-is-in-beta-let-s-make-it-stable-together/
kotlinOptions.useIR = true
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.useIR = true
}