Skip to content

Commit

Permalink
bump various packages to the latest versions for the next release 0.4.0.
Browse files Browse the repository at this point in the history
I had to disable metalava plugin as it does not work with Kotlin 1.9 (yet):
tylerbwong/metalava-gradle#81

(0.4.0 will not be released yet)
  • Loading branch information
atsushieno committed Feb 17, 2024
1 parent 1bb9f36 commit 2bb8e7c
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 63 deletions.
20 changes: 10 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ plugins {

android {
namespace = "org.androidaudioplugin.composeaudiocontrols.demoapp"
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "org.androidaudioplugin.composeaudiocontrols"
minSdk = 23
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"

Expand Down Expand Up @@ -41,7 +41,7 @@ android {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
kotlinCompilerExtensionVersion = "1.5.8"
}
packaging {
resources {
Expand All @@ -58,17 +58,17 @@ dependencies {
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.activity.compose)
implementation(platform(libs.compose.bom))
implementation(libs.ui)
implementation(libs.ui.graphics)
implementation(libs.ui.tooling.preview)
implementation(libs.material3)
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.material3)
implementation(libs.ktmidi)

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.ui.test.junit4)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)
androidTestImplementation(libs.compose.ui.test.junit4)
debugImplementation(libs.compose.ui.tooling)
debugImplementation(libs.compose.ui.test.manifest)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,8 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Checkbox
import androidx.compose.material3.Divider
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Slider
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand All @@ -37,7 +24,6 @@ import org.androidaudioplugin.composeaudiocontrols.defaultKnobMinSizeInDp
import org.androidaudioplugin.composeaudiocontrols.demoapp.ui.theme.ComposeAudioControlsTheme
import org.androidaudioplugin.composeaudiocontrols.midi.DiatonicLiveMidiKeyboard
import org.androidaudioplugin.composeaudiocontrols.midi.KtMidiDeviceAccessScope
import org.androidaudioplugin.composeaudiocontrols.midi.MidiDeviceAccessScope
import org.androidaudioplugin.composeaudiocontrols.midi.MidiDeviceConfigurator
import kotlin.math.pow

Expand All @@ -63,7 +49,7 @@ fun DiatonicMidiKeyboardDemo() {

@Composable
fun SectionLabel(text: String) {
Divider()
HorizontalDivider()
Text(
text, fontSize = 20.sp, color = MaterialTheme.colorScheme.inversePrimary,
modifier = Modifier
Expand Down Expand Up @@ -97,14 +83,14 @@ fun ImageStripKnobDemo() {
var knobSize: Int? by remember { mutableStateOf(null) }
KnobSizeSelector(knobSize, onSizeChange = { knobSize = it })

var knobStyle by remember { mutableStateOf(R.drawable.bright_life) }
var knobStyle by remember { mutableIntStateOf(R.drawable.bright_life) }
KnobStyleSelector(knobStyle, onSelectionChange = { knobStyle = it })

val scrollState = rememberScrollState()
Column(Modifier.verticalScroll(scrollState)) {
(0 until 10).forEach { paramIndex ->
Row {
var paramValue by remember { mutableStateOf(0f) }
var paramValue by remember { mutableFloatStateOf(0f) }
Text("Parameter $paramIndex: ", modifier = Modifier.align(Alignment.CenterVertically))
val minSize =
if (minSizeCheckedState) 1.dp
Expand Down Expand Up @@ -133,7 +119,7 @@ fun ImageStripKnobDemo() {
@Composable
fun KnobSizeSelector(size: Int?, onSizeChange: (size: Int?) -> Unit) {
var checkedState by remember { mutableStateOf(false) }
var sizeOnSlider by remember { mutableStateOf(size?.toFloat() ?: 48f) }
var sizeOnSlider by remember { mutableFloatStateOf(size?.toFloat() ?: 48f) }
val update = {
if (checkedState)
onSizeChange(sizeOnSlider.toInt())
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.dokkaPlugin) apply false
alias(libs.plugins.metalavaPlugin) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.jetbrainsComposePlugin) apply false
}

// Use system environment variables
Expand Down
14 changes: 9 additions & 5 deletions compose-audio-controls-midi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ buildscript {
plugins {
id("com.android.library")
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.4.0" // FIXME: can we avoid this? It may conflict with BOM
id("org.jetbrains.compose")
id("org.jetbrains.dokka")
id("maven-publish")
id("signing")
id("me.tylerbwong.gradle.metalava")
// FIXME: unblock this once this issue is really fixed: https://github.com/tylerbwong/metalava-gradle/issues/81
//id("me.tylerbwong.gradle.metalava")
}

group = "org.androidaudioplugin"
Expand Down Expand Up @@ -63,12 +64,13 @@ kotlin {
implementation(libs.core.ktx)
}
}
/*
val androidTest by getting {
dependencies {
implementation(kotlin("test-junit"))
implementation(libs.junit)
}
}
}*/
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
Expand All @@ -77,18 +79,20 @@ kotlin {
}
}

// FIXME: unblock this once this issue is really fixed: https://github.com/tylerbwong/metalava-gradle/issues/81
/*
metalava {
filename.set("api/$name-api.txt")
outputKotlinNulls.set(false)
includeSignatureVersion.set(false)
}
}*/

android {
namespace = "org.androidaudioplugin.composeaudiocontrols.midi"
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["test"].assets.srcDir("src/commonTest/resources") // kind of hack...
defaultConfig {
compileSdk = 33
compileSdk = 34
minSdk = 23
}
buildTypes {
Expand Down
14 changes: 9 additions & 5 deletions compose-audio-controls/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ buildscript {
plugins {
id("com.android.library")
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.4.0" // FIXME: can we avoid this? It may conflict with BOM
id("org.jetbrains.compose")
id("org.jetbrains.dokka")
id("maven-publish")
id("signing")
id("me.tylerbwong.gradle.metalava")
// FIXME: unblock this once this issue is really fixed: https://github.com/tylerbwong/metalava-gradle/issues/81
//id("me.tylerbwong.gradle.metalava")
}

group = "org.androidaudioplugin"
Expand Down Expand Up @@ -62,12 +63,13 @@ kotlin {
implementation(libs.core.ktx)
}
}
/*
val androidTest by getting {
dependencies {
implementation(kotlin("test-junit"))
implementation(libs.junit)
}
}
}*/
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
Expand All @@ -76,18 +78,20 @@ kotlin {
}
}

// FIXME: unblock this once this issue is really fixed: https://github.com/tylerbwong/metalava-gradle/issues/81
/*
metalava {
filename.set("api/$name-api.txt")
outputKotlinNulls.set(false)
includeSignatureVersion.set(false)
}
}*/

android {
namespace = "org.androidaudioplugin.composeaudiocontrols"
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["test"].assets.srcDir("src/commonTest/resources") // kind of hack...
defaultConfig {
compileSdk = 33
compileSdk = 34
minSdk = 23
}
buildTypes {
Expand Down
45 changes: 23 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[versions]
compose-audio-controls = "0.3.1" # ourselves
agp = "8.0.2"
compose-audio-controls = "0.4.0" # ourselves
agp = "8.2.2"
compose-markdown = "0.3.4"
kotlin = "1.8.10"
core-ktx = "1.10.1"
kotlin = "1.9.22"
core-ktx = "1.12.0"
junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"
kotlinx-coroutines-core = "1.6.4"
lifecycle-runtime-ktx = "2.6.1"
activity-compose = "1.7.2"
compose-bom = "2023.05.01"
metalava-gradle = "0.3.3"
dokka = "1.8.10"
ktmidi_version = "0.6.0-preview2"
kotlinx-coroutines-core = "1.7.3"
lifecycle-runtime-ktx = "2.7.0"
activity-compose = "1.8.2"
compose-bom = "2024.02.00"
metalava-gradle = "0.3.5"
dokka = "1.9.10"
ktmidi_version = "0.7.0"
appcompat = "1.6.1"
lifecycle-service = "2.6.1"
material = "1.9.0"
lifecycle-service = "2.7.0"
compose-plugin = "1.5.12" # dev. version that Google publishes

[libraries]
compose-markdown = { module = "com.github.jeziellago:compose-markdown", version.ref = "compose-markdown" }
Expand All @@ -29,24 +29,25 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activity-compose" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
ui = { group = "androidx.compose.ui", name = "ui" }
ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
material3 = { group = "androidx.compose.material3", name = "material3" }
compose-ui = { group = "androidx.compose.ui", name = "ui" }
compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
compose-material3 = { group = "androidx.compose.material3", name = "material3" }
ktmidi = { group = "dev.atsushieno", name = "ktmidi", version.ref = "ktmidi_version" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
androidx-lifecycle-service = { group = "androidx.lifecycle", name = "lifecycle-service", version.ref = "lifecycle-service" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
dokkaPlugin = { id = "org.jetbrains.dokka", version.ref = "dokka" }
metalavaPlugin = { id = "me.tylerbwong.gradle.metalava", version.ref = "metalava-gradle" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsComposePlugin = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }

[bundles]

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 30 14:53:45 JST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 2bb8e7c

Please sign in to comment.