Skip to content

Commit

Permalink
chore(deps): Update kotlin to 1.5.31, refactor build
Browse files Browse the repository at this point in the history
* Gradle 7.2
* Version catalog libs.versions.toml
* Other dependencies
* Remove jcenter()
  • Loading branch information
petertrr committed Oct 2, 2021
1 parent 5c72557 commit 57cbf79
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import io.github.petertrr.configureVersioning
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest

plugins {
kotlin("multiplatform") version "1.5.0"
alias(libs.plugins.kotlin.multiplatform)
jacoco
id("com.github.ben-manes.versions") version "0.38.0"
id("com.github.ben-manes.versions") version "0.39.0"
}

configureVersioning()
Expand Down Expand Up @@ -40,7 +40,7 @@ kotlin {
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit5"))
implementation("org.junit.jupiter:junit-jupiter-engine:5.7.1")
implementation(libs.junit.jupiter.engine)
}
}
val jsTest by getting {
Expand Down Expand Up @@ -72,8 +72,8 @@ val jacocoTestReportTask by tasks.register<JacocoReport>("jacocoTestReport") {
additionalSourceDirs(kotlin.sourceSets["commonMain"].kotlin.sourceDirectories)
classDirectories.setFrom(file("$buildDir/classes/kotlin/jvm"))
reports {
xml.isEnabled = true
html.isEnabled = true
xml.required.set(true)
html.required.set(true)
}
}
jvmTestTask.finalizedBy(jacocoTestReportTask)
Expand Down
5 changes: 2 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ plugins {
repositories {
gradlePluginPortal()
mavenCentral()
jcenter()
}

dependencies {
implementation("org.ajoberstar.reckon:reckon-gradle:0.13.0")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20")
implementation("io.github.gradle-nexus:publish-plugin:1.0.0")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.5.30")
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.vfs.watch=true
org.gradle.caching=true
org.gradle.parallel=true
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[versions]
kotlin = "1.5.31"
junit = "5.8.1"

[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }

[libraries]
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rootProject.name = "kotlin-multiplatform-diff"
enableFeaturePreview("VERSION_CATALOGS")

0 comments on commit 57cbf79

Please sign in to comment.