Skip to content

Commit

Permalink
A simple test to reproduce #399
Browse files Browse the repository at this point in the history
  • Loading branch information
mvicsokolova committed Mar 1, 2024
1 parent 76d3f5c commit 1c1b02b
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.kotlinMultiplatform) apply false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kotlin.code.style=official

#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"


#MPP
kotlin.mpp.enableCInteropCommonization=true

#Development
development=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[versions]
junit = "4.13.2"
kotlin = "1.9.22"
atomicfu = "0.23.2"
ktor = "2.3.8"
logback = "1.5.0"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor" }
ktor-server-tests = { module = "io.ktor:ktor-server-tests-jvm", version.ref = "ktor" }
atomicfuGradlePlugin = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" }

[plugins]
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
rootProject.name = "KotlinProject"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
repositories {

google()
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
mavenLocal()
}
}

include(":shared")
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
buildscript {
dependencies {
classpath(libs.atomicfuGradlePlugin)
}
}

plugins {
alias(libs.plugins.kotlinMultiplatform)
}

apply (plugin = "kotlinx-atomicfu")

kotlin {

jvm()

sourceSets {
commonMain.dependencies {
// put your Multiplatform dependencies here
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Greeting {
private val platform = "common"

fun greet(): String {
return "Hello, ${platform}!"
}
}

0 comments on commit 1c1b02b

Please sign in to comment.