Skip to content

Commit

Permalink
Upgrade to Kotlin 1.4.30 and rejig management of plugin versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed Feb 5, 2021
1 parent e28cb70 commit 86481f9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 24 deletions.
23 changes: 5 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,12 @@ import com.charleskorn.kaml.build.configureVersioning
import com.charleskorn.kaml.build.configureWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
repositories {
jcenter()
}

dependencies {
classpath(kotlin("serialization", version = "1.4.10"))
}
}

plugins {
kotlin("jvm") version "1.4.10"

apply { id("com.github.ben-manes.versions") version "0.36.0" }
kotlin("jvm")
kotlin("plugin.serialization")
id("com.github.ben-manes.versions")
}

apply(plugin = "kotlinx-serialization")

group = "com.charleskorn.kaml"

repositories {
Expand All @@ -59,11 +47,10 @@ dependencies {
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version = "1.0.1")

val spekVersion = "2.0.15"

testRuntimeOnly(group = "org.spekframework.spek2", name = "spek-runner-junit5", version = spekVersion)
testImplementation(group = "org.spekframework.spek2", name = "spek-dsl-jvm", version = spekVersion)
testImplementation(group = "ch.tutteli.atrium", name = "atrium-fluent-en_GB", version = "0.15.0")

testRuntimeOnly(group = "org.spekframework.spek2", name = "spek-runner-junit5", version = spekVersion)
testImplementation(group = "ch.tutteli.atrium", name = "atrium-fluent-en_GB", version = "0.15.0")
}

tasks.withType<KotlinCompile> {
Expand Down
3 changes: 1 addition & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

plugins {
`kotlin-dsl`

apply { id("com.github.ben-manes.versions") version "0.36.0" }
id("com.github.ben-manes.versions") version "0.36.0"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ fun Project.configureSpotless() {

kotlinGradle {
target("*.gradle.kts", "gradle/*.gradle.kts", "buildSrc/*.gradle.kts")
ktlint("0.36.0")
ktlint("0.40.0")

@Suppress("INACCESSIBLE_TYPE")
licenseHeader(kotlinLicenseHeader, "import|tasks|apply|plugins")
licenseHeader(kotlinLicenseHeader, "import|tasks|apply|plugins|rootProject")

trimTrailingWhitespace()
indentWithSpaces()
Expand All @@ -80,7 +80,7 @@ fun Project.configureSpotless() {

kotlin {
target("src/**/*.kt", "buildSrc/**/*.kt")
ktlint("0.39.0")
ktlint("0.40.0")

@Suppress("INACCESSIBLE_TYPE")
licenseHeader(kotlinLicenseHeader)
Expand Down
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

27 changes: 27 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2018-2020 Charles Korn.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

rootProject.name = "kaml"

pluginManagement {
plugins {
kotlin("jvm") version "1.4.30"
kotlin("plugin.serialization") version "1.4.30"
id("com.github.ben-manes.versions") version "0.36.0"
}
}

0 comments on commit 86481f9

Please sign in to comment.