ctrl k
Refactor: Migrate to TOML dependency management (#1)
Merged
Siarhei Luskanau opened 7 months ago

This commit introduces a TOML catalog for managing dependencies and plugins, replacing inline version definitions. It updates build scripts across the project to utilize the catalog, promoting consistency and simplifying dependency management. Additionally, it configures repositories for plugin and dependency resolution in the settings file.

Commits were rebased onto target branch
  • build.gradle.kts
    ■ ■ ■ ■ ■
    skipped 19 lines
    20 20  plugins {
    21 21   `maven-publish`
    22 22   signing
    23  - id("net.researchgate.release") version "3.0.2"
     23 + alias(libs.plugins.researchgate.release)
     24 + alias(libs.plugins.multiplatform).apply(false)
    24 25  }
    25 26   
    26 27  configure<net.researchgate.release.ReleaseExtension> {
    skipped 26 lines
    53 54  }
    54 55   
    55 56  tasks["afterReleaseBuild"].dependsOn("publish")
    56  - 
    57  -buildscript {
    58  - repositories {
    59  - google()
    60  - mavenCentral()
    61  - mavenLocal()
    62  - }
    63  - dependencies {
    64  - classpath(libs.kotlin.kotlinGradlePlug)
    65  - classpath(libs.kotlinx.serialization.gradlePlug)
    66  - classpath(libs.kotlin.dokkaPlug)
    67  - }
    68  -}
    69  - 
    70  -repositories {
    71  - mavenCentral()
    72  - gradlePluginPortal()
    73  -}
    74 57   
    75 58  allprojects {
    76 59   group = "tigase.halcyon"
    skipped 61 lines
  • docs/build.gradle.kts
    ■ ■ ■ ■
    skipped 16 lines
    17 17   */
    18 18   
    19 19  plugins {
    20  - id("kr.motd.sphinx") version "2.10.1" apply true
     20 + alias(libs.plugins.sphinx) apply true
    21 21  }
    22 22   
    23 23  tasks {
    skipped 9 lines
  • gradle/libs.versions.toml
    ■ ■ ■ ■ ■ ■
    1 1  [versions]
    2 2   
     3 +bouncycastle = "1.76"
     4 +coroutines = "1.7.3"
     5 +dateTime = "0.5.0"
     6 +dokka = "1.8.10"
    3 7  java-languageVersion = "17"
    4 8  kotlin = "1.9.22"
    5  -reactive = "1.3.0"
    6  -dateTime = "0.5.0"
    7  -serialization = "1.6.0"
    8  -coroutines = "1.7.3"
    9 9  krypto = "4.0.9"
    10 10  minidns = "1.0.3"
    11  -dokka = "1.8.10"
    12  -bouncycastle = "1.76"
     11 +reactive = "1.3.0"
     12 +researchgate-release = "3.0.2"
     13 +serialization = "1.6.0"
    13 14  signalProtocol = "2.8.1"
     15 +sphinx = "2.10.1"
    14 16   
    15 17  [libraries]
    16 18   
    skipped 2 lines
    19 21  kotlin-kotlinTestJunit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
    20 22  kotlin-kotlinTestJs = { group = "org.jetbrains.kotlin", name = "kotlin-test-js", version.ref = "kotlin" }
    21 23  kotlin-kotlinTestAnnotationsCommon = { group = "org.jetbrains.kotlin", name = "kotlin-test-annotations-common", version.ref = "kotlin" }
    22  -kotlin-dokkaPlug = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" }
    23 24   
    24 25  kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "dateTime" }
    25 26  kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "serialization" }
    26 27  kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }
    27  -kotlinx-serialization-gradlePlug = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "kotlin" }
    28 28   
    29 29  kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
    30 30  kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
    skipped 14 lines
    45 45   
    46 46  # = { group = "", name = "", version.ref = "" }
    47 47   
     48 +[plugins]
     49 + 
     50 +jetbrains-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
     51 +kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
     52 +multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
     53 +researchgate-release = { id = "net.researchgate.release", version.ref = "researchgate-release" }
     54 +sphinx = { id = "kr.motd.sphinx", version.ref = "sphinx" }
    48 55   
  • halcyon-bouncycastle/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - kotlin("multiplatform")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22  - kotlin("plugin.serialization")
     22 + alias(libs.plugins.kotlinx.serialization)
    23 23  }
    24 24   
    25 25   
    skipped 19 lines
  • halcyon-core/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 15 lines
    16 16  * If not, see http://www.gnu.org/licenses/.
    17 17  */
    18 18  plugins {
    19  - kotlin("multiplatform")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22  - kotlin("plugin.serialization")
    23  - id("org.jetbrains.dokka")
     22 + alias(libs.plugins.kotlinx.serialization)
     23 + alias(libs.plugins.jetbrains.dokka)
    24 24  }
    25 25   
    26 26  kotlin {
    skipped 229 lines
  • halcyon-coroutines/build.gradle.kts
    ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - kotlin("multiplatform")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22 22  }
    skipped 39 lines
  • halcyon-rx/build.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 15 lines
    16 16   * If not, see http://www.gnu.org/licenses/.
    17 17   */
    18 18  plugins {
    19  - kotlin("multiplatform")
     19 + alias(libs.plugins.multiplatform)
    20 20   `maven-publish`
    21 21   signing
    22  - kotlin("plugin.serialization")
     22 + alias(libs.plugins.kotlinx.serialization)
    23 23  }
    24 24   
    25 25   
    skipped 38 lines
  • settings.gradle.kts
    ■ ■ ■ ■ ■ ■
    skipped 25 lines
    26 26  // "integration-tests",
    27 27  )
    28 28   
     29 +pluginManagement {
     30 + repositories {
     31 + gradlePluginPortal()
     32 + mavenCentral()
     33 + }
     34 +}
     35 + 
     36 +dependencyResolutionManagement {
     37 + repositories {
     38 + google()
     39 + mavenCentral()
     40 + mavenLocal()
     41 + }
     42 +}
     43 + 
pull request 1 of 1
Submitter Siarhei Luskanau
Target master
Source siarhei-luskanau/halcyon:toml
Merge Strategy
Rebase Source Branch Commits
Watchers (3)
Reference
pull request tigase/_libraries/halcyon#1
Page is in error, reload to recover