spc-site/build.gradle.kts

81 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-04-30 10:32:00 +03:00
import ru.mipt.npm.gradle.KScienceVersions
import sass.embedded_protocol.EmbeddedSass.OutputStyle
2022-04-23 10:48:53 +03:00
plugins {
id("ru.mipt.npm.gradle.project")
id("ru.mipt.npm.gradle.jvm")
2022-04-30 10:32:00 +03:00
application
id("io.freefair.sass-java") version "6.4.3"
2022-04-30 10:32:00 +03:00
}
2022-05-04 19:29:29 +03:00
//repositories{
// mavenLocal()
//}
2022-04-23 10:48:53 +03:00
group = "ru.mipt.npm"
2022-04-30 10:32:00 +03:00
version = "0.0.1-SNAPSHOT"
2022-04-23 10:48:53 +03:00
application {
2022-05-03 13:33:43 +03:00
mainClass.set("ru.mipt.spc.ApplicationKt")
2022-04-23 10:48:53 +03:00
val isDevelopment: Boolean = project.ext.has("development")
2022-05-03 13:33:43 +03:00
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment", "-Xmx200M")
2022-04-23 10:48:53 +03:00
}
2022-04-30 10:32:00 +03:00
2022-05-08 22:21:01 +03:00
val dataforgeVersion by extra("0.6.0-dev-6")
2022-05-06 15:54:59 +03:00
val ktorVersion = KScienceVersions.ktorVersion
2022-04-30 10:32:00 +03:00
2022-04-23 10:48:53 +03:00
dependencies {
2022-04-30 10:32:00 +03:00
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.5")
implementation("io.ktor:ktor-server-html-builder:$ktorVersion")
implementation("org.jetbrains.kotlin-wrappers:kotlin-css")
implementation("io.ktor:ktor-server-host-common:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("ch.qos.logback:logback-classic:1.2.11")
implementation("space.kscience:dataforge-workspace:$dataforgeVersion")
implementation("space.kscience:dataforge-io-yaml:$dataforgeVersion")
2022-04-23 10:59:05 +03:00
implementation("org.jetbrains:markdown:0.3.1")
2022-04-30 10:32:00 +03:00
testImplementation("io.ktor:ktor-server-tests:$ktorVersion")
2022-04-23 10:48:53 +03:00
}
kotlin {
explicitApi = org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode.Disabled
2022-05-08 22:21:01 +03:00
sourceSets.all {
languageSettings {
languageVersion = "1.7"
apiVersion = "1.7"
}
}
2022-05-06 15:54:59 +03:00
}
val dataSourcePath = project.rootDir.resolve("data")
2022-05-06 15:54:59 +03:00
sourceSets {
main {
resources.srcDir(dataSourcePath)
2022-05-06 15:54:59 +03:00
}
}
tasks.compileSass {
destinationDir.set(dataSourcePath)
sourceMapEnabled.set(false)
setOutputStyle(OutputStyle.COMPRESSED.toString())
}
tasks.processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude("**/*.scss")
}
tasks.clean {
delete(fileTree(dataSourcePath).matching {
include("**/*.css")
exclude("**/libs/*.css")
})
}