Skip to content

Commit

Permalink
Upgrade Kotlin to 1.4 (#137)
Browse files Browse the repository at this point in the history
* Upgrade Kotlin to 1.4.10
* Change version to 1.11.1
  • Loading branch information
oshai committed Sep 13, 2020
1 parent 2c503db commit c722ca8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -9,6 +9,8 @@ stages:
- name: build
- name: snapshot
if: branch = master
- name: snapshot-1.4
if: branch = 1.4.0
- name: release
if: branch = release

Expand All @@ -18,6 +20,8 @@ jobs:
script: ./gradlew build
- stage: snapshot
script: ./gradlew build artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_API_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- stage: snapshot-1.4
script: ./gradlew build artifactoryPublish -x test -Dsnapshot=true -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_API_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
- stage: release
script: ./gradlew build bintrayUpload -x test -Dbintray.user=$BINTRAY_USER -Dbintray.key=$BINTRAY_API_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER -Dmaven.password=$MAVEN_PASSWORD -Dmaven.user=$MAVEN_USER

33 changes: 14 additions & 19 deletions build.gradle.kts
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 @@ -68,24 +68,19 @@ kotlin {
}
linuxX64("linuxX64")
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 @@ -96,12 +91,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 @@ -142,7 +133,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 @@ -168,6 +159,10 @@ bintray {
}
}
}
//workaround bintray bug
project.afterEvaluate {
setPublications(*project.extensions.findByType<PublishingExtension>()!!.publications.names.toTypedArray())
}
}

artifactory {
Expand Down
2 changes: 1 addition & 1 deletion src/jvmTest/kotlin/mu/LoggingTest.kt
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 c722ca8

Please sign in to comment.