-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
104 lines (88 loc) · 2.55 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
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm")
kotlin("plugin.compose")
id("org.jetbrains.compose")
`maven-publish`
}
repositories {
maven("https://reposilite.silenium.dev/releases") {
name = "reposilite"
}
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
val deployNative = (findProperty("deploy.native") as String?)?.toBoolean() ?: true
val deployKotlin = (findProperty("deploy.kotlin") as String?)?.toBoolean() ?: true
val lwjglVersion = "3.3.4"
val lwjglNatives = "natives-linux"
dependencies {
implementation(compose.desktop.common)
implementation(libs.jni.utils)
implementation(libs.slf4j.api)
implementation(kotlin("reflect"))
if (deployNative) {
implementation(project(":native", configuration = "main"))
}
api(platform(libs.lwjgl.bom))
api(libs.lwjgl.egl)
libs.bundles.lwjgl.natives.get().forEach {
api(it)
runtimeOnly(variantOf(provider { it }) { classifier(lwjglNatives) })
}
implementation(libs.bundles.kotlinx.coroutines)
// api(libs.bundles.skiko) {
// version {
// strictly(libs.skiko.awt.runtime.linux.x64.get().version!!)
// }
// }
testImplementation(compose.desktop.currentOs)
testImplementation(libs.logback.classic)
testImplementation("me.saket.telephoto:zoomable:0.13.0")
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "compose-gl"
packageVersion = "1.0.0"
}
}
}
java {
withSourcesJar()
}
kotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-receivers")
}
}
allprojects {
apply<MavenPublishPlugin>()
apply<BasePlugin>()
group = "dev.silenium.compose.gl"
version = findProperty("deploy.version") as String? ?: "0.0.0-SNAPSHOT"
publishing {
repositories {
val url = System.getenv("MAVEN_REPO_URL") ?: return@repositories
maven(url) {
name = "reposilite"
credentials {
username = System.getenv("MAVEN_REPO_USERNAME") ?: ""
password = System.getenv("MAVEN_REPO_PASSWORD") ?: ""
}
}
}
}
}
publishing {
publications {
if (deployKotlin) {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}
}