Update dependencies
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
|
||||
buildscript {
|
||||
apply(from = "common.gradle.kts")
|
||||
apply(from = "version.gradle.kts")
|
||||
}
|
||||
|
||||
plugins {
|
||||
@@ -28,7 +32,7 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
jvm{
|
||||
jvm {
|
||||
withJava()
|
||||
}
|
||||
|
||||
@@ -37,15 +41,15 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
//base
|
||||
api("nl.astraeus:kotlin-css-generator:1.0.7")
|
||||
implementation("nl.astraeus:kotlin-css-generator:1.0.10")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
||||
implementation("nl.astraeus:vst-ui-base:1.1.0-SNAPSHOT")
|
||||
implementation("nl.astraeus:vst-ui-base:1.1.1")
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
//base
|
||||
implementation("nl.astraeus:kotlin-komponent-js:1.2.2")
|
||||
implementation("nl.astraeus:kotlin-komponent-js:1.2.4")
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
@@ -70,3 +74,84 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Hardcoded deploy configuration */
|
||||
|
||||
val deployDirectory = "vst-string.midi-vst.com"
|
||||
|
||||
tasks.register<Copy>("unzipDistribution") {
|
||||
mustRunAfter("removeSymbolicLink")
|
||||
val zipDir = layout.projectDirectory.dir("build/distributions")
|
||||
val zipFile = zipDir.file("${project.name}-${project.version}.zip")
|
||||
|
||||
val outputDir = file("/home/rnentjes/www/${deployDirectory}")
|
||||
|
||||
from(zipTree(zipFile))
|
||||
into(outputDir)
|
||||
}
|
||||
|
||||
tasks.register("createSymbolicLink") {
|
||||
mustRunAfter("unzipDistribution")
|
||||
doLast {
|
||||
val targetDir =
|
||||
Paths.get("/home/rnentjes/www/${deployDirectory}/${project.name}-${project.version}") // Directory to link to
|
||||
val symlink =
|
||||
Paths.get("/home/rnentjes/www/${deployDirectory}/${project.name}") // Path for the symbolic link
|
||||
|
||||
if (!Files.exists(targetDir)) {
|
||||
throw IllegalArgumentException("Target directory does not exist: $targetDir")
|
||||
}
|
||||
|
||||
if (Files.exists(symlink)) {
|
||||
println("Symbolic link already exists: $symlink")
|
||||
} else {
|
||||
Files.createSymbolicLink(symlink, targetDir)
|
||||
println("Symbolic link created: $symlink -> $targetDir")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyWeb") {
|
||||
val webDir = layout.projectDirectory.dir("web")
|
||||
val outputDir = file("/home/rnentjes/www/${deployDirectory}/web")
|
||||
|
||||
from(webDir)
|
||||
into(outputDir)
|
||||
}
|
||||
|
||||
tasks.named<Task>("build") {
|
||||
dependsOn("generateVersionProperties")
|
||||
}
|
||||
|
||||
tasks.named("kotlinUpgradeYarnLock") {
|
||||
mustRunAfter("clean")
|
||||
}
|
||||
|
||||
tasks.named("build") {
|
||||
mustRunAfter("kotlinUpgradeYarnLock")
|
||||
}
|
||||
|
||||
tasks.named("build") {
|
||||
mustRunAfter("kotlinUpgradeYarnLock")
|
||||
}
|
||||
|
||||
tasks.named("copyWeb") {
|
||||
mustRunAfter("build")
|
||||
}
|
||||
|
||||
tasks.register("removeSymbolicLink") {
|
||||
mustRunAfter("build")
|
||||
doLast {
|
||||
delete(layout.projectDirectory.file("/home/rnentjes/www/${deployDirectory}/${project.name}"))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("deploy") {
|
||||
dependsOn("clean")
|
||||
dependsOn("kotlinUpgradeYarnLock")
|
||||
dependsOn("build")
|
||||
dependsOn("copyWeb")
|
||||
dependsOn("removeSymbolicLink")
|
||||
dependsOn("unzipDistribution")
|
||||
dependsOn("createSymbolicLink")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user