Skip to content

Commit

Permalink
Use 1.9 Kotlin API version
Browse files Browse the repository at this point in the history
  • Loading branch information
lancelote committed Jul 22, 2024
1 parent ac581c6 commit 5c01b7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ tasks {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
languageVersion = KotlinVersion.DEFAULT
// see https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
apiVersion = KotlinVersion.KOTLIN_1_8
apiVersion = KotlinVersion.KOTLIN_1_9
}
}
val copyStubs = register<Copy>("copyStubs") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ class MicroPythonFacetConfiguration : FacetConfiguration {
return arrayOf(MicroPythonFacetEditorTab(this, facet))
}

@Deprecated("Deprecated in Java")
override fun readExternal(element: Element?) {
val deviceName = element?.getChild("device")?.getAttribute("name")?.value
val device = MicroPythonDeviceProvider.providers.firstOrNull { it.persistentName == deviceName }
deviceProvider = device ?: MicroPythonDeviceProvider.default
}

@Deprecated("Deprecated in Java")
override fun writeExternal(element: Element?) {
val deviceElement = Element("device")
deviceElement.setAttribute("name", deviceProvider.persistentName)
element?.addContent(deviceElement)
}
}
}

0 comments on commit 5c01b7d

Please sign in to comment.