Skip to content

Commit

Permalink
upgrade Kotlin to 1.9. AGP to 8.1.4, and then add citool Compose KMP …
Browse files Browse the repository at this point in the history
…module.

The KMP module is not really app yet. It's rather to check if it builds
and publishes packages fine.
  • Loading branch information
atsushieno committed Dec 18, 2023
1 parent 689e9a0 commit 5d63fa3
Show file tree
Hide file tree
Showing 56 changed files with 1,576 additions and 541 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,18 @@ build
.cxx
local.properties
.idea
*.iml
.gradle
**/build/
xcuserdata
!src/**/build/
local.properties
.DS_Store
captures
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings

14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
plugins {
id "org.jetbrains.kotlin.multiplatform" version "1.8.20" apply false
id "org.jetbrains.kotlin.jvm" version "1.8.22" apply false
id "com.android.library" version "7.4.2" apply false
id "org.jetbrains.dokka" version "1.8.20" apply false
id 'org.bytedeco.gradle-javacpp-build' version "1.5.9" apply false
id 'org.bytedeco.gradle-javacpp-platform' version '1.5.9' apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.gradleJavacppBuild) apply false
alias(libs.plugins.gradleJavacppPlatform) apply false
// FIXME: re-enable metalava when we could migrate to Gradle 8.x
//id 'me.tylerbwong.gradle.metalava' version '0.3.5' apply false
}
Expand Down
20 changes: 18 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
kotlin.code.style=official
kotlin.js.generate.executable.default=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1536M"
kotlin.incremental.useClasspathSnapshot=true
kotlin.native.cacheKind.linuxX64=none

#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"


#Android
android.nonTransitiveRClass=true
android.useAndroidX=true

#Compose
org.jetbrains.compose.experimental.wasm.enabled=true

#MPP
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true

#Development
development=true
42 changes: 37 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
[versions]
alsakt = "0.3.4"
core-ktx = "1.10.1"
agp = "8.1.4"
android-compileSdk = "34"
android-minSdk = "24"
android-targetSdk = "34"
androidx-activityCompose = "1.8.2"
androidx-appcompat = "1.6.1"
androidx-core-ktx = "1.12.0"
androidx-espresso-core = "3.5.1"
androidx-test-junit = "1.1.5"
compose = "1.5.4"
compose-compiler = "1.5.6"
compose-plugin = "1.6.0-alpha01"
junit = "4.13.2"
kotlin = "1.9.21"

alsakt = "0.3.4"
junit-jupiter-api = "5.9.0"
kotlin-test-junit = "1.9.0"
kotlinx-coroutines-core = "1.7.3"
kotlinx-datetime = "0.4.1"
ktor-io = "2.3.3"
metalava-gradle = "0.2.3"
rtmidi-javacpp = "0.1.3"
dokka = "1.9.0"
gradle-javacpp = "1.5.9"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" }
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }

alsakt = { module = "dev.atsushieno:alsakt", version.ref = "alsakt" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
junit = { module = "junit:junit", version.ref = "junit" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter-api" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter-api" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin-test-junit" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines-core" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
Expand All @@ -26,6 +50,14 @@ rtmidi-javacpp = { module = "dev.atsushieno:rtmidi-javacpp", version.ref = "rtmi
rtmidi-javacpp-platform = { module = "dev.atsushieno:rtmidi-javacpp-platform", version.ref = "rtmidi-javacpp" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleJavacppBuild = { id = "org.bytedeco.gradle-javacpp-build", version.ref = "gradle-javacpp" }
gradleJavacppPlatform = { id = "org.bytedeco.gradle-javacpp-platform", version.ref = "gradle-javacpp" }

[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 @@
#Wed Apr 07 14:09:15 JST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
10 changes: 7 additions & 3 deletions input-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ dependencies {
testRuntimeOnly libs.junit.jupiter.engine
}

kotlin {
jvmToolchain(17)
}

mainClassName = "dev.atsushieno.ktmidi.samples.inputsample.InputSampleKt"

jar {
manifest {
attributes["Main-Class"] = application.mainClassName
attributes["Main-Class"] = application.mainClass
}
}

Expand All @@ -28,6 +32,6 @@ run {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
Loading

0 comments on commit 5d63fa3

Please sign in to comment.