From b377fd229e765b2b9e54ca9135444f8518f69b12 Mon Sep 17 00:00:00 2001 From: Grigoriy Bykov Date: Thu, 12 Dec 2024 01:10:36 +0300 Subject: [PATCH 1/3] Update kotlin libraries - Update versions kotlinx-serialization-json, kotlinx-datetime and kotlinx-coroutines-core to ones that support Kotlin 2.0 - Remove unnecessary step on CI --- .github/workflows/ci.yml | 9 --------- Dangerfile_ci.df.kts | 3 +-- dependencyVersions.gradle | 6 +++--- settings.gradle | 1 + 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d03f732c..1c199614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,15 +36,6 @@ jobs: with: node-version: '22.10.0' - - name: Install libncurses5 - run: | - if [[ "$OSTYPE" == "darwin"* ]] - then - brew install ncurses - else - sudo apt-get install libncurses5 - fi - - name: Install Danger JS run: npm install -g danger diff --git a/Dangerfile_ci.df.kts b/Dangerfile_ci.df.kts index a897160b..a9d91122 100644 --- a/Dangerfile_ci.df.kts +++ b/Dangerfile_ci.df.kts @@ -7,6 +7,7 @@ //Testing plugin @file:DependsOn("danger-kotlin-sample-plugin-sample.jar") +@file:OptIn(kotlin.time.ExperimentalTime::class) import kotlinx.coroutines.async import kotlinx.coroutines.delay @@ -64,9 +65,7 @@ danger(args) { async { expensiveCheck("4", 5000) } } val after = Clock.System.now() - @OptIn(kotlin.time.ExperimentalTime::class) val runningTime = after.minus(before) - @OptIn(kotlin.time.ExperimentalTime::class) message("Coroutines checks terminated - runningFor $runningTime") if ((fails + warnings).isEmpty()) { diff --git a/dependencyVersions.gradle b/dependencyVersions.gradle index 18e20292..ec84453e 100644 --- a/dependencyVersions.gradle +++ b/dependencyVersions.gradle @@ -27,9 +27,9 @@ project.ext.artifactIdKotlinMain = 'kotlin-main-kts' project.ext.artifactIdKotlinSerializationJson = 'kotlinx-serialization-json' project.ext.artifactIdKotlinDatetime = "kotlinx-datetime" project.ext.artifactIdKotlinCoroutines = "kotlinx-coroutines-core" -project.ext.versionKotlinSerializationJson = '1.3.2' -project.ext.versionKotlinDatetime = '0.2.0' -project.ext.versionKotlinCoroutines = '1.6.2' +project.ext.versionKotlinSerializationJson = '1.7.3' +project.ext.versionKotlinDatetime = '0.6.1' +project.ext.versionKotlinCoroutines = '1.9.0' ext.kotlin = [ mainKts: "$groupIdKotlin:$artifactIdKotlinMain:$versionKotlin", diff --git a/settings.gradle b/settings.gradle index 2852c4b1..f09bb7a4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,6 @@ pluginManagement { repositories { + gradlePluginPortal() mavenCentral() mavenLocal() } From 94c9b6c8a5c590687f726d9778acfb28914859e1 Mon Sep 17 00:00:00 2001 From: Grigoriy Bykov Date: Fri, 20 Dec 2024 16:59:58 +0300 Subject: [PATCH 2/3] Update kotlin libraries - Update danger-js inside Docker image - Update publish docker image arguments on release job --- .github/workflows/publish_release.yml | 12 +++++++++++- Dockerfile | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index d8432577..0531656d 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -1,6 +1,14 @@ name: Release distribution on: + workflow_dispatch: + inputs: + danger-js-version: + description: "Danger JS release version" + default: "12.3.3" + kotlin-version: + description: "Kotlin Version" + default: "2.0.21" release: types: [ created ] @@ -99,9 +107,11 @@ jobs: USERNAME: ${{ github.actor }} - name: Docker Build - run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION . + run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION --build-arg="DANGER_KOTLIN_VERSION=$VERSION" --build-arg="KOTLINC_VERSION=$KOTLINC_VERSION" --build-arg="DANGER_JS_VERSION=$DANGER_JS_VERSION" . env: VERSION: ${{ steps.get_release.outputs.tag_name }} + KOTLINC_VERSION: ${{ github.event.inputs.kotlin-version }} + DANGER_JS_VERSION: ${{ github.event.inputs.danger-js-version }} - name: Deploy run: docker push ghcr.io/danger/danger-kotlin:$VERSION diff --git a/Dockerfile b/Dockerfile index 35659c9c..7cb6e970 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL "com.github.actions.color"="blue" ARG KOTLINC_VERSION="2.0.21" ARG DANGER_KOTLIN_VERSION="1.3.2" -ARG DANGER_JS_VERSION="11.3.1" +ARG DANGER_JS_VERSION="12.3.3" # Install dependencies RUN apt-get update From 8e778b2f26c6e014dc5b8873cb9393b2f392e77e Mon Sep 17 00:00:00 2001 From: Grigoriy Bykov Date: Tue, 24 Dec 2024 09:37:47 +0300 Subject: [PATCH 3/3] Update kotlin libraries - Removed on workflow dispatch inputs --- .github/workflows/publish_release.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 0531656d..d8432577 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -1,14 +1,6 @@ name: Release distribution on: - workflow_dispatch: - inputs: - danger-js-version: - description: "Danger JS release version" - default: "12.3.3" - kotlin-version: - description: "Kotlin Version" - default: "2.0.21" release: types: [ created ] @@ -107,11 +99,9 @@ jobs: USERNAME: ${{ github.actor }} - name: Docker Build - run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION --build-arg="DANGER_KOTLIN_VERSION=$VERSION" --build-arg="KOTLINC_VERSION=$KOTLINC_VERSION" --build-arg="DANGER_JS_VERSION=$DANGER_JS_VERSION" . + run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION . env: VERSION: ${{ steps.get_release.outputs.tag_name }} - KOTLINC_VERSION: ${{ github.event.inputs.kotlin-version }} - DANGER_JS_VERSION: ${{ github.event.inputs.danger-js-version }} - name: Deploy run: docker push ghcr.io/danger/danger-kotlin:$VERSION