-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
62 lines (50 loc) · 1.38 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
import org.gradle.internal.os.OperatingSystem.*
plugins {
kotlin("jvm") version "1.7.10"
`maven-publish`
}
group = "com.github.ptitbiscuit"
version = "1.0.0"
val openrndrVersion = "0.3.58"
val openrndrOs = when (current()) {
WINDOWS -> "windows"
MAC_OS -> "macos"
LINUX -> "linux-x64"
else -> throw IllegalArgumentException("os not supported")
}
repositories {
mavenCentral()
dependencies {
maven(url = "https://dl.bintray.com/openrndr/openrndr")
}
}
fun openrndr(module: String): Any {
return "org.openrndr:openrndr-$module:$openrndrVersion"
}
fun openrndrNatives(module: String): Any {
return "org.openrndr:openrndr-$module-natives-$openrndrOs:$openrndrVersion"
}
kotlin {
sourceSets {
val main by getting {
dependencies {
implementation(openrndr("core"))
implementation(openrndr("gl3"))
implementation(openrndrNatives("gl3"))
implementation(openrndr("extensions"))
implementation("org.slf4j:slf4j-nop:1.7.25")
}
}
main.kotlin.srcDir("src/main/kotlin")
}
}
publishing {
publications {
create<MavenPublication>("graphiz") {
from(components["java"])
groupId = project.group.toString()
artifactId = "graphiz"
version = "v${project.version}"
}
}
}