From 8e5c63d035ef44a269b8c43430f43f5c8eebfb63 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Fri, 10 Nov 2023 11:46:54 +0100 Subject: Restructure the project to utilize included builds (#3174) * Refactor and simplify artifact publishing * Update Gradle to 8.4 * Refactor and simplify convention plugins and build scripts Fixes #3132 --------- Co-authored-by: Adam <897017+aSemy@users.noreply.github.com> Co-authored-by: Oleg Yukhnevich --- .../commonMain/kotlin/Clock.kt | 19 ---------- .../commonMain/kotlin/House.kt | 28 -------------- .../basicMultiplatformTest/jsMain/kotlin/Clock.kt | 32 ---------------- .../jvmAndJsSecondCommonMain/kotlin/Greeter.kt | 14 ------- .../jvmMain/kotlin/example/Clock.kt | 43 ---------------------- .../jvmMain/kotlin/example/ClockDays.kt | 19 ---------- .../jvmMain/kotlin/example/HtmlTest.kt | 24 ------------ .../jvmMain/kotlin/example/ParticularClock.kt | 36 ------------------ 8 files changed, 215 deletions(-) delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt delete mode 100644 plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt (limited to 'plugins/base/src/test/resources/multiplatform') diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt deleted file mode 100644 index 5459b2d7..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/Clock.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -/** - * Documentation for expected class Clock - * in common module - */ -expect open class Clock() { - fun getTime(): String - /** - * Time in minis - */ - fun getTimesInMillis(): String - fun getYear(): String -} - diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt deleted file mode 100644 index e79e2904..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/commonMain/kotlin/House.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -class House(val street: String, val number: Int) { - - /** - * The owner of the house - */ - var owner: String = "" - - /** - * The owner of the house - */ - val differentOwner: String = "" - - fun addFloor() {} - - class Basement { - val pickles : List = mutableListOf() - } - - companion object { - val DEFAULT = House("",0) - } -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt deleted file mode 100644 index aad5787d..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jsMain/kotlin/Clock.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -import greeteer.Greeter -import kotlin.js.Date - -/** - * Documentation for actual class Clock in JS - */ -actual open class Clock { - actual fun getTime() = Date.now().toString() - fun onlyJsFunction(): Int = 42 - - /** - * JS implementation of getTimeInMillis - */ - actual fun getTimesInMillis(): String = Date.now().toString() - - /** - * JS custom kdoc - */ - actual fun getYear(): String { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. - } -} - -fun main() { - Greeter().greet().also { println(it) } -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt deleted file mode 100644 index e9e15d0b..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmAndJsSecondCommonMain/kotlin/Greeter.kt +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package greeteer - -import example.Clock - -class Greeter { - /** - * Some docs for the [greet] function - */ - fun greet() = Clock().let{ "Hello there! THe time is ${it.getTime()}" } -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt deleted file mode 100644 index f38ff749..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/Clock.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -import greeteer.Greeter - -/** - * Documentation for actual class Clock in JVM - */ -actual open class Clock { - actual fun getTime(): String = System.currentTimeMillis().toString() - - /** - * Time in minis - */ - actual fun getTimesInMillis(): String = System.currentTimeMillis().toString() - - /** - * Documentation for onlyJVMFunction on... - * wait for it... - * ...JVM! - */ - fun onlyJVMFunction(): Double = 2.5 - - open fun getDayOfTheWeek(): String { - TODO("not implemented") - } - - /** - * JVM custom kdoc - */ - actual fun getYear(): String { - TODO("not implemented") - } -} - -fun clockList() = listOf(Clock()) - -fun main() { - Greeter().greet().also { println(it) } -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt deleted file mode 100644 index e96acf1c..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ClockDays.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -/** - * frgergergrthe - * */ -enum class ClockDays { - /** - * dfsdfsdfds - * */ - FIRST, - SECOND, // test2 - THIRD, // test3 - FOURTH, // test4 - FIFTH // test5 -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt deleted file mode 100644 index 2fa3622b..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/HtmlTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -/** - * - */ -class HtmlTest { - /** - * This is an example of html - */ - fun test(){ - - } - - /** - * This is an documentation - */ - fun testP(){ - - } -} diff --git a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt b/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt deleted file mode 100644 index 3b7a403d..00000000 --- a/plugins/base/src/test/resources/multiplatform/basicMultiplatformTest/jvmMain/kotlin/example/ParticularClock.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package example - -import greeteer.Greeter - -class ParticularClock(private val clockDay: ClockDays) : Clock() { - - /** - * Rings bell [times] - */ - fun ringBell(times: Int) {} - - /** - * Uses provider [greeter] - */ - fun useGreeter(greeter: Greeter) { - - } - - /** - * Day of the week - */ - override fun getDayOfTheWeek() = clockDay.name -} - -/** - * A sample extension function - * When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ - * @usesMathJax - */ -fun Clock.extensionFun() { - -} -- cgit