Skip to content
Draft

KMP #52

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b4bbc07
Migrate build configuration from Groovy to Kotlin and upgrade Kotlin …
aidewoode Jun 12, 2024
14a9320
Migrate to version catalogs
aidewoode Jun 13, 2024
6c35433
Upgrade Gradle and Kotlin
aidewoode Jun 26, 2025
1fc57b5
Upgrade AGP and add annotation-experimental dependency
aidewoode Nov 25, 2025
181e4c3
Add shared module
aidewoode Nov 25, 2025
e182f91
Upgrade Ktlint to 1.8.0 and fix lint issues
aidewoode Nov 25, 2025
447d30c
Move PreferencesDataSource and ServerAddressRepository to shared module
aidewoode Dec 3, 2025
dc059f4
Move APIService to shared module
aidewoode Dec 4, 2025
4c0132c
Move UserRepository, EncryptedDataSource, and Cookies to shared module
aidewoode Dec 9, 2025
1717d6c
Move AlertMessage and PlaybackMode to shared module
aidewoode Dec 10, 2025
f295e5c
Move media services to share module
aidewoode Dec 11, 2025
2a1499f
Move view models to share module
aidewoode Dec 15, 2025
30e809a
Move di to shared module
aidewoode Dec 16, 2025
99a91fa
Migrate to hotwire native
aidewoode Jan 22, 2026
1d0875f
Adopt hotwire bridge components
aidewoode Jan 26, 2026
bfec480
Remove turbo native lib
aidewoode Jan 27, 2026
924a958
Initialize iOS app
aidewoode Jan 28, 2026
a7588ff
Move main view model to shared module
aidewoode Jan 29, 2026
cb6a1f3
Implement login screen
aidewoode Feb 2, 2026
87b560d
Integrate Hotwire Native and implement iOS cookie management
aidewoode Feb 3, 2026
4a110da
Add account bridge component and Keychain support
aidewoode Feb 4, 2026
8f7dbe0
Add search bar
aidewoode Feb 5, 2026
632a808
Add mini player
aidewoode Feb 9, 2026
c9605fc
Add static player screen
aidewoode Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
test_lint:
android_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -12,10 +12,19 @@ jobs:
distribution: 'zulu'
java-version: '17'
- run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.8.0/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/

- name: Kotlin lint
run: ktlint

- name: Android Lint
run: ./gradlew lint

ios_lint:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Lint
run: |
swiftlint
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ local.properties
.env
.idea
/app/release/
/fastlane/report.xml
/fastlane/report.xml
.kotlin
xcuserdata/
iosApp.xcconfig
*.zip
*.ipa
4 changes: 4 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
disabled_rules:
- line_length
excluded:
- shared/build/
File renamed without changes.
92 changes: 92 additions & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
}

android {
namespace = "org.blackcandy.android"
compileSdk = 36

defaultConfig {
applicationId = "org.blackcandy.android"
minSdk = 28
targetSdk = 34
versionCode = 3
versionName = "1.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

lint {
abortOnError = true
}

buildTypes {
getByName("release") {
isShrinkResources = true
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

buildFeatures {
viewBinding = true
compose = true
}
}

dependencies {
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.windowSizeClass)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.window)
implementation(libs.androidx.window.core)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.security.crypto)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.annotation.experimental)

implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.session)
implementation(libs.androidx.media3.datasource.okhttp)

implementation(libs.google.material)
implementation(libs.google.accompanist.themeadapter.material3)

implementation(libs.kotlinx.serialization.json)
implementation(libs.koin.androidx.compose)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.okhttp)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.ktor.client.auth)
implementation(libs.coil.compose)
implementation(libs.reorderable)
implementation(libs.hotwire.core)
implementation(libs.hotwire.navigation.fragments)

implementation(project(":shared"))

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro → androidApp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</intent-filter>
</activity>
<service
android:name=".media.MusicService"
android:name="org.blackcandy.shared.media.MusicService"
android:foregroundServiceType="mediaPlayback"
android:exported="true">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"properties": {
"context": "default",
"uri": "turbo://fragment/web",
"uri": "hotwire://fragment/web",
"pull_to_refresh_enabled": true
}
},
Expand All @@ -19,7 +19,7 @@
"^/$"
],
"properties": {
"uri": "turbo://fragment/web/home",
"uri": "hotwire://fragment/web/home",
"presentation": "replace_root"
}
},
Expand All @@ -28,26 +28,17 @@
"^/library$"
],
"properties": {
"uri": "turbo://fragment/web/library",
"uri": "hotwire://fragment/web/library",
"presentation": "replace_root"
}
},
{
"patterns": [
"^/account$"
],
"properties": {
"context": "modal",
"uri": "turbo://fragment/sheets/account"
}
},
{
"patterns": [
"^/dialog/*"
],
"properties": {
"context": "modal",
"uri": "turbo://fragment/web/bottom_sheet",
"uri": "hotwire://fragment/web/bottom_sheet",
"pull_to_refresh_enabled": false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.lifecycle.repeatOnLifecycle
import com.google.accompanist.themeadapter.material3.Mdc3Theme
import kotlinx.coroutines.launch
import org.blackcandy.android.compose.login.LoginScreen
import org.blackcandy.android.viewmodels.LoginViewModel
import org.blackcandy.shared.viewmodels.LoginViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel

class LoginActivity : ComponentActivity() {
Expand Down
Loading
Loading