Skip to content

Commit

Permalink
Update Kotlin and add annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbass21 committed Oct 16, 2024
1 parent b860365 commit 58f4b53
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
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="1.9.10"
ARG DANGER_KOTLIN_VERSION="1.3.1"
ARG DANGER_JS_VERSION="11.3.1"

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 = '1.9.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=1.9.10
kotlin.code.style=official
systemProp.org.gradle.internal.publish.checksums.insecure=true

0 comments on commit 58f4b53

Please sign in to comment.