-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
126 lines (105 loc) · 3.17 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
plugins {
kotlin("multiplatform") version kotlin_version
id("com.android.library")
id("maven-publish")
}
group = thelema_group
version = thelema_version
kotlin {
jvm()
linuxX64 {
val target = this
val main by target.compilations.getting
main.cinterops {
val glfw by creating {
val includeDir = when (target.preset) {
presets["linuxX64"] -> "/usr/include"
else -> throw NotImplementedError()
}
includeDirs.headerFilterOnly(includeDir, "$projectDir/src/nativeInterop/cinterop")
}
val al by creating {
// val includeDir = when (target.preset) {
// presets["linuxX64"] -> "/usr/include"
// else -> throw NotImplementedError()
// }
includeDirs.headerFilterOnly("$projectDir/libs/linuxX64/include")
}
}
}
js {
browser {}
}
android {
publishLibraryVariants("release", "debug")
}
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmCommonMain by creating {
dependsOn(commonMain)
dependencies {
implementation("com.github.cliftonlabs:json-simple:3.1.1")
api("org.ode4j:core:0.4.0")
api("org.recast4j:recast:1.5.0")
api("io.ktor:ktor-client-core:$ktor_version")
api("io.ktor:ktor-client-cio:$ktor_version")
api("io.ktor:ktor-client-websockets:$ktor_version")
}
}
val jvmMain by getting {
dependsOn(jvmCommonMain)
dependencies {
implementation(files("libs/ogg-jvm-lib-0.1.0.jar"))
lwjglApis.forEach { api(it) }
}
val jvmJar by tasks.getting(Jar::class) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
"Main-Class" to "app.thelema.studio.ThelemaStudioJvm"
)
}
doFirst {
from(configurations.getByName("jvmRuntimeClasspath").map { if (it.isDirectory) it else zipTree(it) })
}
}
}
val jsMain by getting
val androidMain by getting {
dependsOn(jvmCommonMain)
}
}
}
android {
compileSdk = 31
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 21
targetSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
publishing {
repositories {
maven {
setUrl("https://maven.pkg.github.com/zeganstyl/thelema-engine")
name = "github"
credentials(PasswordCredentials::class)
}
}
}
allprojects {
repositories {
google()
mavenCentral()
mavenLocal()
}
}