Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
chore: Use libs.versions.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
sya-ri committed Nov 10, 2023
1 parent ee2abf9 commit ee8f4e7
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 1,050 deletions.
44 changes: 0 additions & 44 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,6 @@ Must edit the others if they change any of the following:
| [`examples/native`: build.gradle.kts](examples/native/build.gradle.kts) | `version` <br /> `dependencies` |
| [`examples/e2e`: build.gradle.kts](examples/e2e/build.gradle.kts) | `version` <br /> `dependencies` |

### Bump dependency

#### Kotlin

Use the same version for API and all examples.
And write that version in the [README.md](README.md) badge.

| File | Place(s) |
|-------------------------------------------------------------------------|-----------|
| [README.md](README.md) | Badge |
| [build.gradle.kts](build.gradle.kts) | `plugins` |
| [`examples/jvm`: build.gradle.kts](examples/jvm/build.gradle.kts) | `plugins` |
| [`examples/native`: build.gradle.kts](examples/native/build.gradle.kts) | `plugins` |
| [`examples/e2e`: build.gradle.kts](examples/e2e/build.gradle.kts) | `plugins` |

#### Ktor

Use the same version for all dependencies related to Ktor.

| File | Place(s) |
|-------------------------------------------------------------------------|----------------|
| [build.gradle.kts](build.gradle.kts) | `dependencies` |
| [`examples/jvm`: build.gradle.kts](examples/jvm/build.gradle.kts) | `dependencies` |
| [`examples/native`: build.gradle.kts](examples/native/build.gradle.kts) | `dependencies` |
| [`examples/e2e`: build.gradle.kts](examples/e2e/build.gradle.kts) | `dependencies` |

#### Dokka

Use the same version for dokka and dokkaPlugin.

| File | Place(s) |
|--------------------------------------|--------------------------------|
| [build.gradle.kts](build.gradle.kts) | `plugins` <br /> `dokkaPlugin` |

#### Shadow

Use the same version for all examples.

| File | Place(s) |
|-------------------------------------------------------------------------|-----------|
| [`examples/jvm`: build.gradle.kts](examples/jvm/build.gradle.kts) | `plugins` |
| [`examples/native`: build.gradle.kts](examples/native/build.gradle.kts) | `plugins` |
| [`examples/e2e`: build.gradle.kts](examples/e2e/build.gradle.kts) | `plugins` |

### Add new example

Adding a new example, add it to the examples list.
Expand Down
26 changes: 13 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
kotlin("multiplatform") version "1.9.20"
kotlin("plugin.serialization") version "1.9.20"
id("org.jetbrains.kotlinx.kover") version "0.7.4"
id("org.jetbrains.dokka") version "1.9.10"
id("org.jmailen.kotlinter") version "4.0.0"
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.dokka)
alias(libs.plugins.kotlinter)
`maven-publish`
signing
}
Expand Down Expand Up @@ -66,17 +66,17 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("io.ktor:ktor-client-core:2.3.6")
implementation("io.ktor:ktor-client-content-negotiation:2.3.6")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.6")
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)
}
}
commonTest {
dependencies {
implementation(kotlin("test"))
implementation("io.ktor:ktor-client-mock:2.3.6")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
implementation(libs.kotlin.test)
implementation(libs.ktor.client.mock)
implementation(libs.kotlinx.coroutines.test)
}
}
}
Expand All @@ -93,7 +93,7 @@ tasks.withType<DokkaTask>().configureEach {
val version = version.toString()

dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.9.10")
dokkaPlugin(libs.dokka.plugin.versioning)
}
outputDirectory.set(file(dokkaDir.resolve(version)))
pluginsMapConfiguration.set(
Expand Down
4 changes: 2 additions & 2 deletions examples/e2e/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply(plugin = "kotlin")

plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
alias(libs.plugins.shadow)
application
}

dependencies {
implementation(project(":"))
implementation("io.ktor:ktor-client-cio:2.3.6")
implementation(libs.ktor.client.cio)
}

application {
Expand Down
Binary file removed examples/e2e/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions examples/e2e/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

234 changes: 0 additions & 234 deletions examples/e2e/gradlew

This file was deleted.

Loading

0 comments on commit ee8f4e7

Please sign in to comment.