Skip to content

Commit

Permalink
upgrade kotlin to 1.4 (#148)
Browse files Browse the repository at this point in the history
Apply commit c722ca8 to 1.x branch
without breaking compatibility.

* remove GRADLE_METADATA feature preview
This is not needed in gradle 6.6.1. and create a mess in pom.
  • Loading branch information
oshai authored Sep 16, 2020
1 parent 7be15be commit 5105c4b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
33 changes: 14 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.dokka.gradle.DokkaTask
import java.util.*

plugins {
kotlin("multiplatform") version "1.3.72"
kotlin("multiplatform") version "1.4.10"
id("com.jfrog.bintray") version "1.8.4"
id("com.jfrog.artifactory") version "4.17.2"
id("org.jetbrains.dokka") version "0.10.0"
Expand Down Expand Up @@ -47,8 +47,8 @@ kotlin {
compilations.named("main") {
// kotlin compiler compatibility options
kotlinOptions {
apiVersion = "1.1"
languageVersion = "1.1"
apiVersion = "1.2"
languageVersion = "1.2"
}
}
mavenPublication {
Expand All @@ -70,24 +70,19 @@ kotlin {
// macosX64("macosX64")
// mingwX64("mingwX64")
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
commonTest {
val commonMain by getting {}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
named("jvmMain") {
val jvmMain by getting {
dependencies {
implementation(kotlin("stdlib"))
api("org.slf4j:slf4j-api:${extra["slf4j_version"]}")
}
}
named("jvmTest") {
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
Expand All @@ -98,12 +93,8 @@ kotlin {
implementation("org.apache.logging.log4j:log4j-slf4j-impl:${extra["log4j_version"]}")
}
}
named("jsMain") {
dependencies {
implementation(kotlin("stdlib-js"))
}
}
named("jsTest") {
val jsMain by getting {}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
Expand Down Expand Up @@ -144,7 +135,7 @@ publishing {
bintray {
user = System.getProperty("bintray.user")
key = System.getProperty("bintray.key") //https://bintray.com/profile/edit
setPublications("metadata", "jvm", "js")
setPublications(*publishing.publications.names.toTypedArray())
publish = true //[Default: false] Whether version should be auto published after an upload
pkg.apply {
repo = "kotlin-logging"
Expand All @@ -170,6 +161,10 @@ bintray {
}
}
}
//workaround bintray bug
project.afterEvaluate {
setPublications(*project.extensions.findByType<PublishingExtension>()!!.publications.names.toTypedArray())
}
}

artifactory {
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
rootProject.name = "kotlin-logging"

enableFeaturePreview("GRADLE_METADATA")

buildscript {
repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/jvmTest/kotlin/mu/LoggingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class LoggingTest {
LambdaRaisesError().test()
appenderWithWriter.writer.flush()
Assert.assertEquals(
"INFO mu.LambdaRaisesError - Log message invocation failed: kotlin.KotlinNullPointerException",
"INFO mu.LambdaRaisesError - Log message invocation failed: java.lang.NullPointerException",
appenderWithWriter.writer.toString().trim()
)
}
Expand Down

0 comments on commit 5105c4b

Please sign in to comment.