From b496c7ae5308ff256e4440bbda7e5ca13c81a063 Mon Sep 17 00:00:00 2001 From: Konstantin Aksenov Date: Fri, 18 Oct 2024 10:27:45 +0200 Subject: [PATCH] fix(ci): update kotlin to 2.0.21 --- .github/workflows/ci.yml | 2 +- Dockerfile | 2 +- danger-kotlin-sample-plugin/build.gradle | 2 +- danger-kotlin-sdk/maven-publish.gradle | 16 +++++----------- danger-kotlin/build.gradle.kts | 4 ++-- dependencyVersions.gradle | 2 +- gradle.properties | 2 +- scripts/install.sh | 4 ++-- 8 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 495ffeb7..16b06424 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Install Kotlin run: | - curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.0/kotlin-compiler-1.7.0.zip + curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip if [[ "$OSTYPE" != "darwin"* ]] then diff --git a/Dockerfile b/Dockerfile index 062f921b..eec105bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL "com.github.actions.description"="Runs Kotlin Dangerfiles" LABEL "com.github.actions.icon"="zap" LABEL "com.github.actions.color"="blue" -ARG KOTLINC_VERSION="1.7.0" +ARG KOTLINC_VERSION="2.0.21" ARG DANGER_KOTLIN_VERSION="1.3.0" # Install dependencies diff --git a/danger-kotlin-sample-plugin/build.gradle b/danger-kotlin-sample-plugin/build.gradle index c4516d25..c64edb75 100644 --- a/danger-kotlin-sample-plugin/build.gradle +++ b/danger-kotlin-sample-plugin/build.gradle @@ -9,7 +9,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlin.jvm' version '1.7.0' + id 'org.jetbrains.kotlin.jvm' version '2.0.21' } apply plugin: 'danger-kotlin-plugin-installer' diff --git a/danger-kotlin-sdk/maven-publish.gradle b/danger-kotlin-sdk/maven-publish.gradle index 7e197257..21f56026 100644 --- a/danger-kotlin-sdk/maven-publish.gradle +++ b/danger-kotlin-sdk/maven-publish.gradle @@ -1,12 +1,12 @@ apply from: file('../secrets.gradle') task sourceJar(type: Jar) { - classifier "sources" + archiveClassifier.set("sources") from sourceSets.main.allJava } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier "javadoc" + archiveClassifier.set("javadoc") from javadoc.destinationDir } @@ -32,14 +32,8 @@ publishing { publications { maven(MavenPublication) { from components.java - artifact sourceJar { - classifier "sources" - from sourceSets.main.allJava - } - artifact javadocJar { - classifier "javadoc" - from javadoc.destinationDir - } + artifact sourceJar + artifact javadocJar pom { name = 'Danger Kotlin SDK' description = 'Develop your own plugin for Danger Kotlin' @@ -81,4 +75,4 @@ publishing { } } } -} \ No newline at end of file +} diff --git a/danger-kotlin/build.gradle.kts b/danger-kotlin/build.gradle.kts index 67c42d07..08961999 100644 --- a/danger-kotlin/build.gradle.kts +++ b/danger-kotlin/build.gradle.kts @@ -14,7 +14,7 @@ kotlin { "linuxX64" -> linuxX64("runner") "macosArm64" -> macosArm64("runner") "mingwX64" -> mingwX64("runner") - else -> throw GradleException("OS '$osName' is not supported.") as Throwable + else -> throw GradleException("OS '$osName' is not supported.") } } else { when (val osName = System.getProperty("os.name")) { @@ -22,7 +22,7 @@ kotlin { "Linux" -> linuxX64("runner") "Mac OS X Apple silicon" -> macosArm64("runner") "Windows 11" -> mingwX64("runner") - else -> throw GradleException("OS '$osName' is not supported.") as Throwable + else -> throw GradleException("OS '$osName' is not supported.") } } diff --git a/dependencyVersions.gradle b/dependencyVersions.gradle index 84a637d7..18e20292 100644 --- a/dependencyVersions.gradle +++ b/dependencyVersions.gradle @@ -20,7 +20,7 @@ project.ext.groupIdOkio = 'com.squareup.okio' project.ext.artifactIdOkio = 'okio' // Kotlin -project.ext.versionKotlin = '1.7.0' +project.ext.versionKotlin = '2.0.21' project.ext.groupIdKotlin = 'org.jetbrains.kotlin' project.ext.groupIdKotlinx = 'org.jetbrains.kotlinx' project.ext.artifactIdKotlinMain = 'kotlin-main-kts' diff --git a/gradle.properties b/gradle.properties index 8109311b..93d20646 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -kotlinVersion=1.7.0 +kotlinVersion=2.0.21 kotlin.code.style=official systemProp.org.gradle.internal.publish.checksums.insecure=true diff --git a/scripts/install.sh b/scripts/install.sh index a9fc4fb9..d3dccff5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -31,8 +31,8 @@ if [[ -n "$sudo" && "$OSTYPE" != "darwin"* ]]; then fi if ! [[ -x "$(command -v kotlinc)" ]]; then - echo "Installing kotlin compiler 1.7.0" - curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.0/kotlin-compiler-1.7.0.zip + echo "Installing kotlin compiler 2.0.21" + curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip unzip -d /usr/local/ kotlin-compiler.zip echo 'export PATH=/usr/local/kotlinc/bin:$PATH' >> ~/.bash_profile rm -rf kotlin-compiler.zip