Skip to content

Commit

Permalink
modernize project to the latest aap-lv2 structure.
Browse files Browse the repository at this point in the history
- bump aap-lv2
- use Compose native UI
- AGP/Gradle migration with assistant.
  • Loading branch information
atsushieno committed Jul 5, 2023
1 parent 063c809 commit 0c5fe2d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-all: \
build-native \
build-java

build-native: dependencies/stamp-fluidsynth dependencies/stamp-aap-aar
build-native: dependencies/stamp-fluidsynth

external/fluidsynth/.patch-stamp:
cd external/fluidsynth && patch -i ../../fluidsynth-ndk24.patch -p1 && touch .patch-stamp
Expand All @@ -31,11 +31,6 @@ make-jniLibsDir:
mkdir -p app/src/main/jniLibs/$$a ; \
done

dependencies/stamp-aap-aar:
cp external/aap-lv2/external/aap-core/androidaudioplugin/build/outputs/aar/androidaudioplugin-release.aar .
unzip androidaudioplugin-release.aar -d dependencies/androidaudioplugin-aar
touch dependencies/stamp-aap-aar

build-aap-lv2:
cd external/aap-lv2 && make build-non-app

Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ android {
jniLibs.useLegacyPackaging = true
}

aaptOptions {
namespace 'org.androidaudioplugin.ports.lv2.aap_fluidsynth'
androidResources {
noCompress 'sf3'
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.androidaudioplugin.ports.lv2.aap_fluidsynth">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ org.gradle.caching=true
org.gradle.configureondemand=true

android.experimental.androidTest.useUnifiedTestPlatform=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

36 changes: 20 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]

aap-core = "0.7.6"
aap-lv2 = "0.2.6"
aap-core = "0.7.7-pre"
aap-lv2 = "0.2.7-pre"

agp = "7.4.2"
agp = "8.0.2"
kotlin = "1.8.10"
ndk = "25.2.9519653"
cmake = "3.22.1"
build-tools = "33.0.1"
dokka = "1.7.20"
compose = "1.3.3"
dokka = "1.8.10"
compose = "1.4.3"
kotlin-compose-compiler-extension = "1.4.3"
androidx-test = "1.5.0"
coroutines = "1.6.4"
coroutines = "1.7.0"

[libraries]

Expand All @@ -24,13 +24,15 @@ aap-testing = { module = "org.androidaudioplugin:androidaudioplugin-testing", ve

aap-lv2 = { module = "org.androidaudioplugin:androidaudioplugin-lv2", version.ref = "aap-lv2" }

compose-audio-controls = { module = "org.androidaudioplugin:compose-audio-controls", version = "0.1.3" }

tools-build-gradle = { module = "com.android.tools.build:gradle", version.ref = "agp" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }

compose-bom = { module = "androidx.compose:compose-bom", version = "2023.01.00" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.5.3" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.9.0"}
compose-bom = { module = "androidx.compose:compose-bom", version = "2023.06.01" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.6.0" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.10.1" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
startup-runtime = { module = "androidx.startup:startup-runtime", version = "1.1.1" }
Expand All @@ -39,15 +41,16 @@ coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-androi

preference-ktx = { module = "androidx.preference:preference-ktx", version = "1.2.0" }
libcxx-provider = { module = "dev.atsushieno:libcxx-provider", version.ref = "ndk" }
material = { module = "com.google.android.material:material", version = "1.8.0" }
material = { module = "com.google.android.material:material", version = "1.9.0" }

lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.6.0" }
activity-compose = { module = "androidx.activity:activity-compose", version = "1.6.1" }
webkit = { module = "androidx.webkit:webkit", version = "1.6.0" }
lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version = "2.6.1" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.6.1" }
activity-compose = { module = "androidx.activity:activity-compose", version = "1.7.2" }
webkit = { module = "androidx.webkit:webkit", version = "1.7.0" }

compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-material = { module = "androidx.compose.material:material", version = "1.3.1" }
compose-material = { module = "androidx.compose.material:material", version = "1.4.3" }
compose-ui-test-junit = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }

junit = { module = "junit:junit", version = "4.13.2" }
Expand All @@ -57,7 +60,8 @@ test-runner = { module = "androidx.test:runner", version = "1.5.2" }
test-ext-junit = { module = "androidx.test.ext:junit", version = "1.1.5" }
test-espresso-core = { module = "androidx.test.espresso:espresso-core", version = "3.5.1" }

ktmidi = { module = "dev.atsushieno:ktmidi", version = "0.4.1" }
mugene = { module = "dev.atsushieno:mugene", version = "0.3.0" }
ktmidi = { module = "dev.atsushieno:ktmidi", version = "0.5.0" }
mugene = { module = "dev.atsushieno:mugene", version = "0.4.0" }

oboe = { module = "com.google.oboe:oboe", version = "1.7.0" }
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version = "2.6.1" }
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 @@
#Sat Dec 18 18:22:22 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.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 0c5fe2d

Please sign in to comment.