Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Install Kotlin
run: |
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.10/kotlin-compiler-2.0.10.zip

if [[ "$OSTYPE" != "darwin"* ]]
then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: "Danger Kotlin release version"
kotlin-version:
description: "Kotlin Version"
default: "1.7.22"
default: "2.0.10"

jobs:
docker-build-push:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.22"
ARG KOTLINC_VERSION="2.0.10"
ARG DANGER_KOTLIN_VERSION="1.3.1"
ARG DANGER_JS_VERSION="11.3.1"

Expand Down
2 changes: 1 addition & 1 deletion danger-kotlin-sample-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
id 'org.jetbrains.kotlin.jvm' version '2.0.10'
}

apply plugin: 'danger-kotlin-plugin-installer'
Expand Down
1 change: 1 addition & 0 deletions danger-kotlin/src/runnerMain/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import systems.danger.cmd.dangerjs.DangerJS
const val PROCESS_DANGER_KOTLIN = "danger-kotlin"
const val VERSION = "1.3.1"

@kotlinx.cinterop.ExperimentalForeignApi
fun main(args: Array<String>) {
Log.isVerbose = args.contains("--verbose") || (getenv("DEBUG")?.toString()?.isNotEmpty() ?: false)
Log.info("Starting Danger-Kotlin $VERSION with args '${args.joinToString(", ")}'", verbose = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import systems.danger.cmd.dangerfile.DangerFile
object DangerKotlin {
private const val FILE_TMP_OUTPUT_JSON = "danger_out.json"

@kotlinx.cinterop.ExperimentalForeignApi
fun run() {
val dangerDSLPath = readLine()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object DangerFile : DangerFileBridge {
"/usr", // Fallback
)

@kotlinx.cinterop.ExperimentalForeignApi
override fun execute(inputJson: String, outputJson: String) {
val dangerKotlinJarPath = platformExpectedLibLocations
.map { "$it/lib/danger/danger-kotlin.jar" }
Expand Down Expand Up @@ -48,6 +49,7 @@ object DangerFile : DangerFileBridge {
}
}

@kotlinx.cinterop.ExperimentalForeignApi
private fun dangerfileParameter(inputJson: String): String? {
var result: String? = null

Expand All @@ -69,6 +71,7 @@ private fun dangerfileParameter(inputJson: String): String? {
return result
}

@kotlinx.cinterop.ExperimentalForeignApi
private fun readLine(file: CPointer<FILE>): String? {
var ch = getc(file)
var lineBuffer: Array<Char> = arrayOf()
Expand Down
2 changes: 1 addition & 1 deletion dependencyVersions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project.ext.groupIdOkio = 'com.squareup.okio'
project.ext.artifactIdOkio = 'okio'

// Kotlin
project.ext.versionKotlin = '1.7.22'
project.ext.versionKotlin = '2.0.10'
project.ext.groupIdKotlin = 'org.jetbrains.kotlin'
project.ext.groupIdKotlinx = 'org.jetbrains.kotlinx'
project.ext.artifactIdKotlinMain = 'kotlin-main-kts'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlinVersion=1.7.22
kotlinVersion=2.0.10
kotlin.code.style=official
systemProp.org.gradle.internal.publish.checksums.insecure=true
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if [[ -n "$sudo" && "$OSTYPE" != "darwin"* ]]; then
fi

if ! [[ -x "$(command -v kotlinc)" ]]; then
echo "Installing kotlin compiler 1.7.22"
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
echo "Installing kotlin compiler 2.0.10"
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.0.10/kotlin-compiler-2.0.10.zip
unzip -d /usr/local/ kotlin-compiler.zip
echo 'export PATH=/usr/local/kotlinc/bin:$PATH' >> ~/.bash_profile
rm -rf kotlin-compiler.zip
Expand Down