First commit
This commit is contained in:
114
shared/build.gradle.kts
Normal file
114
shared/build.gradle.kts
Normal file
@@ -0,0 +1,114 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
|
||||
val ktorVersion = "3.0.2"
|
||||
val exposedVersion = "0.55.0"
|
||||
val h2Version = "2.3.232"
|
||||
val hikariCpVersion = "5.1.0"
|
||||
val flywayVersion = "10.20.1"
|
||||
val logbackVersion = "1.5.12"
|
||||
val assertjVersion = "3.26.3"
|
||||
val restAssuredVersion = "5.5.0"
|
||||
val junitVersion = "5.11.3"
|
||||
val psqlVersion = "42.7.4"
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.androidLibrary)
|
||||
kotlin("plugin.serialization")
|
||||
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
}
|
||||
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_11)
|
||||
}
|
||||
}
|
||||
|
||||
iosX64()
|
||||
iosArm64()
|
||||
iosSimulatorArm64()
|
||||
|
||||
jvm()
|
||||
|
||||
@OptIn(ExperimentalWasmDsl::class)
|
||||
wasmJs {
|
||||
browser {
|
||||
val rootDirPath = project.rootDir.path
|
||||
val projectDirPath = project.projectDir.path
|
||||
commonWebpackConfig {
|
||||
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
||||
static = (static ?: mutableListOf()).apply {
|
||||
// Serve sources to debug inside browser
|
||||
add(rootDirPath)
|
||||
add(projectDirPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
// put your Multiplatform dependencies here
|
||||
implementation(libs.kotlinx.serialization.json.jvm)
|
||||
implementation(libs.kotlinx.serialization.core)
|
||||
|
||||
implementation(libs.io.ktor.ktor.server.core)
|
||||
implementation(libs.ktor.serialization)
|
||||
implementation(libs.ktor.ktor.server.netty)
|
||||
implementation(libs.ktor.server.call.logging)
|
||||
implementation(libs.ktor.server.default.headers)
|
||||
implementation(libs.ktor.server.websockets)
|
||||
implementation(libs.ktor.server.content.negotiation)
|
||||
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
|
||||
|
||||
implementation(libs.ktor.serialization)
|
||||
implementation(libs.kotlinx.serialization.core)
|
||||
|
||||
implementation(libs.kotlin.stdlib)
|
||||
implementation(libs.kotliquery)
|
||||
implementation(libs.h2)
|
||||
implementation(libs.postgresql)
|
||||
|
||||
implementation(libs.exposed.core)
|
||||
implementation(libs.exposed.dao)
|
||||
implementation(libs.exposed.jdbc)
|
||||
implementation(libs.exposed.json)
|
||||
implementation(libs.hikaricp)
|
||||
implementation(libs.flyway.core)
|
||||
implementation(libs.logback)
|
||||
implementation(libs.kformat)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
android {
|
||||
namespace = "org.neutrino.ktans.shared"
|
||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user