Skip to content

Commit

Permalink
root: transform everything into kotlin multiplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
Com6235 committed Jul 8, 2024
1 parent 7a1c8a8 commit b966acf
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 26 deletions.
24 changes: 11 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
import java.net.URI

plugins {
kotlin("jvm") version "2.0.0"
kotlin("multiplatform") version "2.0.0"
id("org.jetbrains.dokka") version "1.9.20"
idea
`maven-publish`
Expand All @@ -21,7 +21,7 @@ idea {
}

allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.multiplatform")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "idea")
apply(plugin = "maven-publish")
Expand All @@ -32,16 +32,18 @@ allprojects {
mavenCentral()
}

dependencies {
testImplementation(kotlin("test"))
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

kotlin {
jvm()
jvmToolchain(17)
sourceSets {
commonTest.dependencies {
implementation(kotlin("test"))
}
}
}

ktlint {
Expand All @@ -65,12 +67,6 @@ allprojects {
archiveClassifier.set("javadoc")
}

tasks.register<Jar>("sourcesJar") {
group = "jar"
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}

configurations {
create("javadoc")
create("sources")
Expand Down Expand Up @@ -102,6 +98,8 @@ allprojects {
}

subprojects {
if (project.name in listOf("jvm", "kotlinMultiplatform")) return@subprojects

val jdFile = layout.buildDirectory.file("libs/$name-$version-javadoc.jar")
val jdArtifact = artifacts.add("javadoc", jdFile.get().asFile) {
type = "jar"
Expand Down Expand Up @@ -158,7 +156,7 @@ subprojects {
}
}

tasks.jar {
tasks.named("jvmJar") {
enabled = false
}

Expand Down
19 changes: 12 additions & 7 deletions configurator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ plugins {

val serializationVersion = "1.6.3"

dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
api("org.jetbrains.kotlinx:kotlinx-serialization-hocon:$serializationVersion")
api("org.jetbrains.kotlinx:kotlinx-serialization-properties:$serializationVersion")
api("com.charleskorn.kaml:kaml:0.59.0")
api("net.peanuuutz.tomlkt:tomlkt:0.3.7")
api("net.benwoodworth.knbt:knbt:0.11.5")
kotlin {
jvm()
sourceSets {
commonMain.dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
api("org.jetbrains.kotlinx:kotlinx-serialization-hocon:$serializationVersion")
api("org.jetbrains.kotlinx:kotlinx-serialization-properties:$serializationVersion")
api("com.charleskorn.kaml:kaml:0.59.0")
api("net.peanuuutz.tomlkt:tomlkt:0.3.7")
api("net.benwoodworth.knbt:knbt:0.11.5")
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 10 additions & 6 deletions tgbotter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ version = "1.0.4"

val telegramVersion = "7.2.1"

dependencies {
implementation("org.telegram:telegrambots-longpolling:$telegramVersion")
implementation("org.telegram:telegrambots-webhook:$telegramVersion")
implementation("org.telegram:telegrambots-client:$telegramVersion")
api("org.telegram:telegrambots-meta:$telegramVersion")
kotlin {
sourceSets {
commonMain.dependencies {
implementation("org.telegram:telegrambots-longpolling:$telegramVersion")
implementation("org.telegram:telegrambots-webhook:$telegramVersion")
implementation("org.telegram:telegrambots-client:$telegramVersion")
api("org.telegram:telegrambots-meta:$telegramVersion")

implementation("org.slf4j:slf4j-api:2.0.13")
implementation("org.slf4j:slf4j-api:2.0.13")
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b966acf

Please sign in to comment.