-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
153 lines (119 loc) · 4.33 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import codegen.GenerateAMQPClasses
import lol.dimensional.gradle.dsl.PreRelease
import lol.dimensional.gradle.dsl.PreReleaseType
import lol.dimensional.gradle.dsl.Version
plugins {
`maven-publish`
id("org.jetbrains.dokka") version "1.8.10"
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.8.20"
}
val versionRef = Version(1, 0, 0, PreRelease(PreReleaseType.ReleaseCandidate, "1"))
version = "$versionRef"
group = "fun.dimensional"
repositories {
mavenCentral()
maven(url = "https://maven.dimensional.fun/releases")
maven(url = "https://jitpack.io")
}
kotlin {
explicitApi()
jvm {
withJava()
compilations.all {
kotlinOptions.jvmTarget = compiler.jvm.target
}
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
jvmToolchain {
languageVersion by JavaLanguageVersion.of(11)
}
linuxX64()
sourceSets {
all {
for (optin in compiler.optins.kotlin) languageSettings.optIn(optin)
}
val commonMain by getting {
kotlin.srcDir("src/commonGenerated")
dependencies {
/* Kotlin-specific things */
implementation(kotlin("stdlib"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
// Coroutine Task Scheduling
implementation("fun.dimensional:kyuso:1.1.0")
// Idiomatic Logging for Kotlin
implementation("io.github.microutils:kotlin-logging:3.0.5")
/* Ktor */
val ktor = "2.3.0"
// TCP Sockets
implementation("io.ktor:ktor-network:$ktor")
implementation("io.ktor:ktor-network-tls:$ktor")
// `Url` class
implementation("io.ktor:ktor-http:$ktor")
}
}
getByName("jvmTest").dependencies {
implementation("com.rabbitmq:amqp-client:5.15.0")
implementation("ch.qos.logback:logback-classic:1.2.11")
}
}
}
tasks {
val jvmMainClasses by named("jvmMainClasses") {
dependsOn("compileJava")
}
val jvmTestClasses by named("jvmTestClasses") {
dependsOn("compileJava")
}
create<GenerateAMQPClasses>("generateAmqpClasses") {
outputDirectory by file("src/commonGenerated")
}
val username = System.getenv("REPO_ALIAS")
val password = System.getenv("REPO_TOKEN")
if (username != null && password != null) publishing {
repositories {
dimensionalFun(versionRef.repository, username, password, true)
}
publications.filterIsInstance<MavenPublication>().forEach { publication ->
publication.pom {
name by project.name
description by "\uD83D\uDC30 kotlin multi-platform rabbitmq client"
url by "https://github.com/dimensional-fun/usagi"
organization {
name by "Dimensional Fun"
url by "https://www.dimensional.fun"
}
developers {
developer {
name by "Dimensional Fun"
email by "opensource@dimensional.fun"
url by "https://opensource.dimensional.fun"
}
developer {
name by "melike2d"
email by "hi@2d.gay"
url by "https://2d.gay"
}
}
licenses {
license {
name by "Apache-2.0"
url by "https://opensource.org/licenses/Apache-2.0"
}
}
issueManagement {
system by "GitHub"
url by "https://github.com/dimensional-fun/usagi/issues"
}
scm {
connection by "scm:git:ssh://github.com/dimensional-fun/usagi.git"
developerConnection by "scm:git:ssh://git@github.com/dimensional-fun/usagi.git"
url by "https://github.com/dimensional-fun/usagi"
}
}
}
}
}