Skip to content

Commit ae19143

Browse files
committed
A big set of changes towards 0.12.0.
- Kotlin 2.1 ABI. Those dependencies now don't target Kotlin 1.8 ABI, so we cannot keep ourselves out of loop anymore. - Removed support for macosX64: Intel Mac will be killed soon, and kotlinx-coroutines does not provide packages anymore, so we cannot build them. - libremidi-panama 0.3. It is still built on JDK22 but the code is generated using the latest jextract with JDK 25 LTS. - musicdevice API: still experimental, but it should ease use of MIDI-CI to some extent.
1 parent 6452e57 commit ae19143

File tree

19 files changed

+1335
-617
lines changed

19 files changed

+1335
-617
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414

1515
allprojects {
1616
group = 'dev.atsushieno'
17-
version = '0.11.2'
17+
version = '0.12.0'
1818
}
1919

2020
apply from: "${rootDir}/publish-root.gradle"

gradle/libs.versions.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ agp = "8.11.2"
33
android-compileSdk = "36"
44
android-minSdk = "23"
55
android-targetSdk = "36"
6-
androidx-activityCompose = "1.10.1"
7-
androidx-core-ktx = "1.16.0"
8-
androidx-espresso-core = "3.6.1"
9-
androidx-test-junit = "1.2.1"
10-
compose-multiplatform = "1.7.3"
6+
androidx-activityCompose = "1.11.0"
7+
androidx-core-ktx = "1.17.0"
8+
androidx-espresso-core = "3.7.0"
9+
androidx-test-junit = "1.3.0"
10+
compose-multiplatform = "1.9.0"
1111
junit = "4.13.2"
12-
kotlin = "2.0.21"
12+
kotlin = "2.2.20"
1313
dokka = "2.0.0"
14-
binary-compatibility-validator = "0.17.0"
15-
junit-jupiter-api = "5.10.2"
14+
binary-compatibility-validator = "0.18.1"
15+
junit-jupiter-api = "5.13.4"
1616
kotlin-test-junit = "1.9.0"
1717
jzz = "1.9.3"
1818

19-
kotlinx-browser = "0.3"
20-
kotlinx-coroutines-core = "1.9.0"
21-
kotlinx-datetime = "0.6.0"
22-
kotlinxSerialization = "1.7.0"
23-
ktor-io = "3.0.3"
19+
kotlinx-browser = "0.5.0"
20+
kotlinx-coroutines-core = "1.10.2"
21+
kotlinx-datetime = "0.7.1"
22+
kotlinxSerialization = "1.9.0"
23+
ktor-io = "3.3.0"
2424

2525
mpfilepicker = "3.1.0"
2626
gradle-javacpp = "1.5.10"

kotlin-js-store/wasm/yarn.lock

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@js-joda/core@3.2.0":
6+
version "3.2.0"
7+
resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273"
8+
integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==
9+
10+
"@types/webmidi@^2.1.0":
11+
version "2.1.0"
12+
resolved "https://registry.yarnpkg.com/@types/webmidi/-/webmidi-2.1.0.tgz#085ec7279a9c9c13453589db9ecebbcfa4bf771b"
13+
integrity sha512-k898MjEUSHB+6rSeCPQk/kLgie0wgWZ2t78GlWj86HbTQ+XmtbBafYg5LNjn8bVHfItEhPGZPf579Xfc6keV6w==
14+
15+
jazz-midi@^1.7.9:
16+
version "1.7.9"
17+
resolved "https://registry.yarnpkg.com/jazz-midi/-/jazz-midi-1.7.9.tgz#ad564e85acf12414aec7ef7d879ad61a5d7f6896"
18+
integrity sha512-c8c4BBgwxdsIr1iVm53nadCrtH7BUlnX3V95ciK/gbvXN/ndE5+POskBalXgqlc/r9p2XUbdLTrgrC6fou5p9w==
19+
20+
jzz@1.9.3:
21+
version "1.9.3"
22+
resolved "https://registry.yarnpkg.com/jzz/-/jzz-1.9.3.tgz#4730d2cc38b9616d8b9bc394cdd8872e3108fc06"
23+
integrity sha512-DXQ7xXuJzC4YxNbQZy9pfHC/DOXM6IHgceTXnkhk1/+lU/qDk8W9xUaNpgCH6t1QDQ9roz7FSVtFc0/JhYQFxg==
24+
dependencies:
25+
"@types/webmidi" "^2.1.0"
26+
jazz-midi "^1.7.9"

kotlin-js-store/yarn.lock

Lines changed: 913 additions & 537 deletions
Large diffs are not rendered by default.

ktmidi-ci-tool/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ plugins {
1111

1212
kotlin {
1313
wasmJs {
14-
moduleName = "ktmidi-ci-tool"
1514
browser {
1615
commonWebpackConfig {
1716
outputFileName = "ktmidi-ci-tool.js"
@@ -22,17 +21,11 @@ kotlin {
2221
}
2322

2423
androidTarget {
25-
compilations.all {
26-
kotlinOptions {
27-
jvmTarget = "1.8"
28-
}
29-
}
3024
}
3125

3226
jvm("desktop")
3327

3428
listOf(
35-
iosX64(),
3629
iosArm64(),
3730
iosSimulatorArm64()
3831
).forEach { iosTarget ->
@@ -78,7 +71,6 @@ kotlin {
7871
implementation(libs.mpfilepicker)
7972
}
8073
}
81-
val iosX64Main by getting { dependsOn(iosMain) }
8274
val iosArm64Main by getting { dependsOn(iosMain) }
8375
val iosSimulatorArm64Main by getting { dependsOn(iosMain) }
8476
val wasmJsMain by getting {

ktmidi-ci-tool/src/commonMain/kotlin/dev/atsushieno/ktmidi/citool/AppModel.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dev.atsushieno.ktmidi.ci.Logger
55
import dev.atsushieno.ktmidi.ci.MessageDirection
66
import dev.atsushieno.ktmidi.toUtf8ByteArray
77
import getPlatform
8-
import kotlinx.datetime.Clock
8+
import kotlin.time.Clock
99
import kotlinx.datetime.LocalDateTime
1010
import kotlinx.datetime.TimeZone
1111
import kotlinx.datetime.toLocalDateTime
@@ -16,6 +16,7 @@ import kotlinx.serialization.json.JsonContentPolymorphicSerializer
1616
import kotlinx.serialization.json.JsonElement
1717
import kotlinx.serialization.json.jsonObject
1818
import kotlin.random.Random
19+
import kotlin.time.ExperimentalTime
1920

2021
private var appInitialized = false
2122
fun initializeAppModel(context: Any?) {
@@ -33,6 +34,7 @@ class CIToolRepository {
3334

3435
private val logs = mutableListOf<LogEntry>()
3536

37+
@OptIn(ExperimentalTime::class)
3638
fun log(msg: Any, direction: MessageDirection, explicitTimestamp: LocalDateTime? = null) {
3739
val time = explicitTimestamp ?: Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault())
3840
val entry = LogEntry(time, direction, msg)

ktmidi-ci-tool/src/commonMain/kotlin/dev/atsushieno/ktmidi/citool/view/App.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ package dev.atsushieno.ktmidi.citool.view
33
import androidx.compose.foundation.isSystemInDarkTheme
44
import androidx.compose.foundation.layout.Column
55
import androidx.compose.foundation.layout.fillMaxWidth
6-
import androidx.compose.material.icons.Icons
7-
import androidx.compose.material.icons.filled.ArrowBack
8-
import androidx.compose.material.icons.filled.ArrowForward
9-
import androidx.compose.material.icons.filled.List
10-
import androidx.compose.material.icons.filled.Settings
116
import androidx.compose.material3.*
127
import androidx.compose.runtime.*
138
import androidx.compose.ui.Modifier
@@ -39,14 +34,15 @@ fun MainContent() {
3934
Tab(text = { Text(title) },
4035
selected = tabIndex == index,
4136
onClick = { tabIndex = index },
42-
icon = {
37+
// FIXME: they are gone around Compose Multiplatform 1.9.0
38+
/*icon = {
4339
when (index) {
4440
0 -> Icon(imageVector = Icons.Default.ArrowForward, contentDescription = "Go to Initiator Screen")
4541
1 -> Icon(imageVector = Icons.Default.ArrowBack, contentDescription = "Go to Responder Screen")
4642
2 -> Icon(imageVector = Icons.Default.List, contentDescription = "Go to Log Screen")
4743
3 -> Icon(imageVector = Icons.Default.Settings, contentDescription = "Go to Settings Screen")
4844
}
49-
}
45+
}*/
5046
)
5147
}
5248
}

ktmidi-ci-tool/src/commonMain/kotlin/dev/atsushieno/ktmidi/citool/view/PropertyViews.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ package dev.atsushieno.ktmidi.citool.view
33
import androidx.compose.foundation.BorderStroke
44
import androidx.compose.foundation.Image
55
import androidx.compose.foundation.layout.*
6-
import androidx.compose.material.icons.Icons
7-
import androidx.compose.material.icons.filled.Add
8-
import androidx.compose.material.icons.filled.Delete
96
import androidx.compose.material3.*
107
import androidx.compose.runtime.*
118
import androidx.compose.ui.Alignment
@@ -121,7 +118,9 @@ fun PropertyMetadataEditor(def: CommonRulesPropertyMetadata,
121118
TextField(titleText, { s: String -> titleText = s; it.title = s }, readOnly = readOnly)
122119
if (!readOnly) {
123120
Button(onClick = { columns.removeAt(index) }) {
124-
Image(Icons.Default.Delete, "Delete")
121+
// FIXME: they are gone around Compose Multiplatform 1.9.0
122+
//Image(Icons.Default.Delete, "Delete")
123+
Text("Delete")
125124
}
126125
}
127126
}
@@ -148,7 +147,9 @@ fun PropertyMetadataEditor(def: CommonRulesPropertyMetadata,
148147
Button(onClick = {
149148
columns.add(PropertyResourceColumn())
150149
}) {
151-
Image(Icons.Default.Add, "Add")
150+
// FIXME: they are gone around Compose Multiplatform 1.9.0
151+
//Image(Icons.Default.Add, "Add")
152+
Text("Add")
152153
}
153154
}
154155
}

ktmidi-ci-tool/src/commonMain/kotlin/dev/atsushieno/ktmidi/citool/view/ResponderScreen.kt

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import androidx.compose.foundation.layout.Column
55
import androidx.compose.foundation.layout.Row
66
import androidx.compose.foundation.layout.padding
77
import androidx.compose.foundation.layout.width
8-
import androidx.compose.material.icons.Icons
9-
import androidx.compose.material.icons.filled.*
108
import androidx.compose.material3.*
119
import androidx.compose.runtime.*
1210
import androidx.compose.runtime.snapshots.Snapshot
@@ -92,7 +90,9 @@ fun LocalProfileList(vm: ResponderViewModel) {
9290
vm.addNewProfile(state)
9391
editedProfileName = state.profile.toString()
9492
}, enabled = !vm.isSelectedProfileIdEditing.value && profileIds.all { it != emptyId }) {
95-
Image(Icons.Default.Add, "Add")
93+
// FIXME: they are gone around Compose Multiplatform 1.9.0
94+
//Image(Icons.Default.Add, "Add")
95+
Text("Add")
9696
}
9797
if (vm.isSelectedProfileIdEditing.value) {
9898
Button(onClick = {
@@ -103,19 +103,25 @@ fun LocalProfileList(vm: ResponderViewModel) {
103103
vm.updateProfileName(vm.selectedProfile.value!!, newProfileId)
104104
}
105105
}) {
106-
Image(Icons.Default.Done, "Commit changes")
106+
// FIXME: they are gone around Compose Multiplatform 1.9.0
107+
//Image(Icons.Default.Done, "Commit changes")
108+
Text("Commit changes")
107109
}
108110
Button(onClick = {
109111
vm.isSelectedProfileIdEditing.value = false
110112
}) {
111-
Image(Icons.Default.Close, "Discard changes")
113+
// FIXME: they are gone around Compose Multiplatform 1.9.0
114+
//Image(Icons.Default.Close, "Discard changes")
115+
Text("Discard changes")
112116
}
113117
} else {
114118
Button(onClick = {
115119
editedProfileName = vm.selectedProfile.value?.toString() ?: ""
116120
vm.isSelectedProfileIdEditing.value = true
117121
}, enabled = vm.selectedProfile.value != null) {
118-
Image(Icons.Default.Edit, "Edit")
122+
// FIXME: they are gone around Compose Multiplatform 1.9.0
123+
//Image(Icons.Default.Edit, "Edit")
124+
Text("Edit")
119125
}
120126

121127
}
@@ -125,7 +131,9 @@ fun LocalProfileList(vm: ResponderViewModel) {
125131
Button(onClick = {
126132
vm.addTestProfileItems()
127133
}, enabled = !vm.isSelectedProfileIdEditing.value) {
128-
Image(Icons.Default.Add, "Add test items")
134+
// FIXME: they are gone around Compose Multiplatform 1.9.0
135+
//Image(Icons.Default.Add, "Add test items")
136+
Text("Add test items")
129137
}
130138
}
131139
}
@@ -177,7 +185,9 @@ fun LocalProfileDetails(vm: ResponderViewModel, profile: MidiCIProfileId) {
177185
onClick = { vm.removeProfileTarget(it.group.value, it.address.value, it.profile) },
178186
enabled = !vm.isSelectedProfileIdEditing.value,
179187
modifier = Modifier.padding(12.dp, 0.dp)) {
180-
Image(Icons.Default.Delete, "Delete")
188+
// FIXME: they are gone around Compose Multiplatform 1.9.0
189+
//Image(Icons.Default.Delete, "Delete")
190+
Text("Delete")
181191
}
182192
}
183193
}
@@ -187,7 +197,9 @@ fun LocalProfileDetails(vm: ResponderViewModel, profile: MidiCIProfileId) {
187197
vm.addNewProfileTarget(state)
188198
vm.selectedProfile.value = state.profile
189199
}, enabled = vm.selectedProfile.value != null && vm.model.localProfileStates.all { it.profile != profile || it.address.value != MidiCIConstants.ADDRESS_FUNCTION_BLOCK }) {
190-
Image(Icons.Default.Add, "Add")
200+
// FIXME: they are gone around Compose Multiplatform 1.9.0
201+
//Image(Icons.Default.Add, "Add")
202+
Text("Add")
191203
}
192204
}
193205
}
@@ -244,10 +256,14 @@ fun LocalPropertyList(properties: List<String>,
244256
}
245257
Row {
246258
Button(onClick = { createNewProperty() }) {
247-
Image(Icons.Default.Add, "Add")
259+
// FIXME: they are gone around Compose Multiplatform 1.9.0
260+
//Image(Icons.Default.Add, "Add")
261+
Text("Add")
248262
}
249263
Button(onClick = { removeSelectedProperty() }) {
250-
Image(Icons.Default.Delete, "Delete")
264+
// FIXME: they are gone around Compose Multiplatform 1.9.0
265+
//Image(Icons.Default.Delete, "Delete")
266+
Text("Delete")
251267
}
252268
}
253269
}

ktmidi-ci-tool/src/wasmJsMain/kotlin/main.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import androidx.compose.ui.ExperimentalComposeUiApi
22
import androidx.compose.ui.window.CanvasBasedWindow
3+
import androidx.compose.ui.window.ComposeViewport
34
import dev.atsushieno.ktmidi.WebMidiAccess
45
import dev.atsushieno.ktmidi.citool.AppModel
56
import dev.atsushieno.ktmidi.citool.initializeAppModel
@@ -13,6 +14,6 @@ fun main() {
1314
MainScope().launch { // we need this for delay
1415
while (!WebMidiAccess.isReady)
1516
delay(1)
16-
CanvasBasedWindow(canvasElementId = "ComposeTarget") { App() }
17+
ComposeViewport(viewportContainerId = "ComposeTarget") { App() }
1718
}
1819
}

0 commit comments

Comments
 (0)