-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (77 loc) · 2.56 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
import static org.gradle.internal.os.OperatingSystem.*
plugins {
id 'maven'
id 'java'
id 'java-library'
id "org.jetbrains.kotlin.jvm" version "1.3.31"
id "com.github.johnrengelman.shadow" version '4.0.4'
}
ext{
moduleName = 'com.github.kotlin_graphics.uno_al'
kotlin = 'org.jetbrains.kotlin:kotlin'
kotlin_version = '1.3.21'
kotlintest_version = '3.2.1'
gln_version = '4cff66c0c1772f8d183436c504b349f34b8db5be'
// vkk_version = '448bdc596876beab3315d7e883f933fdaca50587'
lwjgl_version = "3.2.2-SNAPSHOT"
lwjgl_natives = current() == WINDOWS ? "windows" : current() == LINUX ? "linux" : "macos"
}
sourceCompatibility = 1.8
dependencies {
implementation "$kotlin-stdlib-jdk8"
implementation "$kotlin-reflect"
testImplementation "io.kotlintest:kotlintest-runner-junit5:$kotlintest_version".toString()
api "com.github.kotlin-graphics.glm:glm:-SNAPSHOT"
["", "-openal", "-stb"].each {
implementation "org.lwjgl:lwjgl$it:$lwjgl_version"
// if (it != "-vulkan" && it != "-jawt")
runtime "org.lwjgl:lwjgl$it:$lwjgl_version:natives-$lwjgl_natives"
}
testCompile group: 'junit', name: 'junit', version: '4.12'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { setUrl('https://jitpack.io') }
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
jar {
inputs.property("moduleName", moduleName)
manifest.attributes('Automatic-Module-Name': moduleName)
}
test {
useJUnitPlatform()
testLogging {
// Make sure output from
// standard out or error is shown
// in Gradle output.
// showStandardStreams = true
// Or we use events method:
// events 'standard_out', 'standard_error'
// Or set property events:
// events = ['standard_out', 'standard_error']
// Instead of string values we can
// use enum values:
// events org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT,
// org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR,
}
}
shadowJar.archiveClassifier = 'all'