-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
100 lines (83 loc) · 3.43 KB
/
build.gradle.kts
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
import org.jetbrains.dokka.gradle.DokkaTask
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
kotlin("jvm") version "1.3.70"
// Dokka javadoc/KDoc generation
// see https://kotlinlang.org/docs/reference/kotlin-doc.html
id("org.jetbrains.dokka") version "0.10.1"
}
project(":DodgyDeliveries3") {
// We need kotlin for the documentation generation
apply(plugin = "java")
apply(plugin = "kotlin")
dependencies {
// All subprojects depend on root project
implementation(project(":"))
}
}
allprojects {
version = "1.1"
repositories {
jcenter()
mavenCentral()
maven {
url = uri("https://raw.github.com/SpinyOwl/repo/releases")
}
}
dependencies {
// Kotlin standard library for runtime support
implementation(kotlin("stdlib"))
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin test library.
testImplementation("org.jetbrains.kotlin:kotlin-test")
// Use the Kotlin JUnit integration.
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
// Koin for dependency injection
val koinVersion = "2.1.5"
implementation("org.koin:koin-core:$koinVersion")
testImplementation("org.koin:koin-test:$koinVersion")
// Klaxon is a json serialisation library
implementation("com.beust:klaxon:5.0.1")
// Faster JSON parser (about twice on large json strings)
implementation("com.beust:klaxon-jackson:1.0.1")
// 2D Physics
implementation("org.jbox2d:jbox2d-library:2.2.1.1")
// legui
implementation("org.liquidengine:legui:2.1.0")
// LWJGL is a collection of game library's
val lwjglVersion = "3.2.3"
val jomlVersion = "1.9.25"
val os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem()
val lwjglNatives = when {
os.isWindows -> "natives-windows"
os.isMacOsX -> "natives-macos"
os.isLinux -> "natives-linux"
else -> throw IllegalArgumentException("OS not supported")
}
implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion"))
implementation("org.lwjgl", "lwjgl")
implementation("org.lwjgl", "lwjgl-assimp")
implementation("org.lwjgl", "lwjgl-glfw")
implementation("org.lwjgl", "lwjgl-openal")
implementation("org.lwjgl", "lwjgl-opengl")
implementation("org.lwjgl", "lwjgl-stb")
implementation("org.lwjgl", "lwjgl-tinyfd")
runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-assimp", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-glfw", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-openal", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-opengl", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-stb", classifier = lwjglNatives)
runtimeOnly("org.lwjgl", "lwjgl-tinyfd", classifier = lwjglNatives)
implementation("org.joml", "joml", jomlVersion)
}
}
tasks {
// Generate documentation with kotlin support
val dokka by getting(DokkaTask::class) {
outputFormat = "html"
outputDirectory = "$buildDir/dokka"
subProjects = listOf("DodgyDeliveries3")
}
}