generated from rnentjes/kotlin-server-web-empty
Refactor project structure and update dependencies
Removed old database-related implementations (`Database`, `Migrations`, and `Main`) and replaced them with a new focus on MIDI message handling. Updated project metadata, introduced multiplatform `MidiMessage` classes, and added publication/CI setup for Maven compatibility.
This commit is contained in:
120
build.gradle.kts
120
build.gradle.kts
@@ -1,64 +1,108 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.1.0"
|
||||
kotlin("multiplatform") version "2.0.21"
|
||||
`maven-publish`
|
||||
signing
|
||||
}
|
||||
|
||||
group = "nl.astraeus"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
version = "0.1.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = uri("https://gitea.astraeus.nl/api/packages/rnentjes/maven")
|
||||
}
|
||||
maven {
|
||||
url = uri("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
jvm()
|
||||
js {
|
||||
binaries.executable()
|
||||
browser {
|
||||
distribution {
|
||||
outputDirectory.set(File("$projectDir/web/"))
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
api("nl.astraeus:kotlin-simple-logging:1.1.1")
|
||||
api("nl.astraeus:kotlin-css-generator:1.0.10")
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
api("nl.astraeus:typed-byte-arrays:0.2.6")
|
||||
}
|
||||
}
|
||||
val commonTest by getting
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
implementation("io.undertow:undertow-core:2.3.14.Final")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.11.0")
|
||||
|
||||
implementation("org.xerial:sqlite-jdbc:3.32.3.2")
|
||||
implementation("com.zaxxer:HikariCP:4.0.3")
|
||||
implementation("nl.astraeus:simple-jdbc-stats:1.6.1") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
}
|
||||
}
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
implementation("nl.astraeus:kotlin-komponent:1.2.4")
|
||||
}
|
||||
}
|
||||
val jvmMain by getting
|
||||
val jvmTest by getting
|
||||
val jsMain by getting
|
||||
val jsTest by getting
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extra["PUBLISH_GROUP_ID"] = group
|
||||
extra["PUBLISH_VERSION"] = version
|
||||
extra["PUBLISH_ARTIFACT_ID"] = name
|
||||
|
||||
// Stub secrets to let the project sync and build without the publication values set up
|
||||
val signingKeyId: String? by project
|
||||
val signingPassword: String? by project
|
||||
val signingSecretKeyRingFile: String? by project
|
||||
|
||||
extra["signing.keyId"] = signingKeyId
|
||||
extra["signing.password"] = signingPassword
|
||||
extra["signing.secretKeyRingFile"] = signingSecretKeyRingFile
|
||||
|
||||
val javadocJar by tasks.registering(Jar::class) {
|
||||
archiveClassifier.set("javadoc")
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "gitea"
|
||||
setUrl("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
|
||||
|
||||
credentials {
|
||||
val giteaUsername: String? by project
|
||||
val giteaPassword: String? by project
|
||||
|
||||
username = giteaUsername
|
||||
password = giteaPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configure all publications
|
||||
publications.withType<MavenPublication> {
|
||||
// Stub javadoc.jar artifact
|
||||
artifact(javadocJar.get())
|
||||
|
||||
// Provide artifacts information requited by Maven Central
|
||||
pom {
|
||||
name.set("typed-byte-arrays")
|
||||
description.set("Typed byte arrays")
|
||||
url.set("https://gitea.astraeus.nl/rnentjes/typed-byte-arrays")
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name.set("MIT")
|
||||
url.set("https://opensource.org/licenses/MIT")
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id.set("rnentjes")
|
||||
name.set("Rien Nentjes")
|
||||
email.set("info@nentjes.com")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url.set("https://gitea.astraeus.nl/rnentjes/typed-byte-arrays")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository> {
|
||||
dependsOn(tasks.withType<Sign>())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user