Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup & Improvements. #413

Merged
merged 39 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ca1e6d5
Update test report paths.
thomaskioko Jan 24, 2025
3057966
Fix lint warnings.
thomaskioko Jan 24, 2025
4d53036
A little re-ordering. 😁
thomaskioko Jan 24, 2025
a60aedc
Remove shared module version
thomaskioko Jan 24, 2025
462e1fc
Cleanup plugins.
thomaskioko Jan 24, 2025
067c578
Switch from implementation to runtimeOnly
thomaskioko Jan 24, 2025
bc10505
Bump up snapshot package version.
thomaskioko Jan 25, 2025
74f57b5
Add color param: Make styling dynamic.
thomaskioko Jan 25, 2025
a5a62ba
Create ParallaxImage composable
thomaskioko Jan 25, 2025
ac4b395
Update pager implementation and use Parallax image.
thomaskioko Jan 25, 2025
c27e357
Add buttons.
thomaskioko Jan 26, 2025
f1fe3b4
Update TopBar implementation and use Slotting API.
thomaskioko Jan 26, 2025
d083961
Update TopBar usage.
thomaskioko Jan 26, 2025
d95f0af
Add CollapsingToolbar and implement
thomaskioko Jan 26, 2025
1ca9522
Rename Button and cleanup styling.
thomaskioko Jan 26, 2025
bd95285
Add imageVector and tint to params to SheetDragHandle.kt
thomaskioko Jan 26, 2025
fac46f2
Update strings.
thomaskioko Jan 26, 2025
820d558
Update show details view and add bottomSheet to add/select list.
thomaskioko Jan 26, 2025
5867c6e
Remove DynamicColorContainer and fix display for dark theme not being…
thomaskioko Jan 26, 2025
72c2342
Update screenshots
thomaskioko Jan 26, 2025
7a25f01
Some minor formatting.
thomaskioko Feb 1, 2025
9c37116
Add formatter tests and ensure the implementation is the same on Andr…
thomaskioko Feb 1, 2025
a252131
Add mapper, remove defaults and update tests
thomaskioko Feb 1, 2025
ae2de9c
Update ShowMetadata component
thomaskioko Feb 1, 2025
bed9c18
Cleanup Carousel implementation and update parallax effect.
thomaskioko Feb 2, 2025
a032318
Add autoscroll animation on the tabview
thomaskioko Feb 2, 2025
4408544
Minor cleanup:
thomaskioko Feb 2, 2025
fdffb26
Update README
thomaskioko Feb 2, 2025
03aff35
Update snapshot testing package.
thomaskioko Feb 2, 2025
81b7039
Remove unused dependency.
thomaskioko Feb 6, 2025
f3cf0f2
Merge branch 'main' into cleanup
thomaskioko Feb 6, 2025
c0e327c
Comment out JDK check
thomaskioko Feb 6, 2025
6acbec4
Delete TvManiacUI module and move classes to TvManiacKit
thomaskioko Feb 6, 2025
10b26ac
Update fastlane scheme name.
thomaskioko Feb 6, 2025
3cf754f
🤖 Beep Beep: Update screenshots 🤖
thomaskioko Feb 6, 2025
bcd2919
Update screenshots.
thomaskioko Feb 6, 2025
202feef
Require screenshot-tests before running build and lint jobs
thomaskioko Feb 6, 2025
a8dc88a
🤖 Beep Beep: Update screenshots 🤖
thomaskioko Feb 6, 2025
146d339
Move screenshot job a higher level
thomaskioko Feb 6, 2025
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
150 changes: 71 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:

jobs:
build-android:
needs: android-screenshot-test
runs-on: ubuntu-latest
env:
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
Expand Down Expand Up @@ -73,12 +74,19 @@ jobs:
-Pandroidx.baselineprofile.skipgeneration=true \
--no-configuration-cache


android-lint:
android-screenshot-test:
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.DISTRIBUTION }}
java-version: ${{ env.JDK_VERSION }}
Expand All @@ -91,17 +99,47 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Lint Project
run: ./gradlew lint
- name: Install Dependencies
run: ./gradlew dependencies

- name: Upload Lint Report
- name: Roborazzi Screenshot Tests
id: screenshotsverify
continue-on-error: true
run: ./gradlew clean verifyRoborazziDebug

- name: Generate Roborazzi Screenshot Report
id: screenshots-report
continue-on-error: true
run: ./gradlew compareRoborazziDebug

- name: Prevent Pushing New Screenshots if This is a Fork
id: checkfork_screenshots
if: steps.screenshotsverify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::error::Screenshot tests failed, please create a PR in your fork first." && exit 1

- name: Generate New Screenshots if Verification Failed and It's a PR
id: screenshotsrecord
if: steps.screenshotsverify.outcome == 'failure' && github.event_name == 'pull_request'
run: ./gradlew recordRoborazziDebug

- name: Push New Screenshots if Available
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.screenshotsrecord.outcome == 'success'
with:
file_pattern: '**/*.png'
disable_globbing: true
commit_message: "🤖 Beep Beep: Update screenshots 🤖"

- name: Upload Screenshot Results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
if: always()
with:
name: android-lint-report
path: app/build/reports/lint-results*.html
name: screenshot-test-results
path: '**/build/outputs/roborazzi/*_compare.png'

spotless:
android-lint:
needs: android-screenshot-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -118,20 +156,17 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Run Spotless
run: ./gradlew spotlessCheck
- name: Lint Project
run: ./gradlew :android:app:lintRelease

- name: Upload Spotless Report
- name: Upload Lint Report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
if: always()
with:
name: spotless-report
path: |
**/build/reports/spotless
app/build/reports/spotless

name: android-lint-report
path: '**/build/reports/lint-results-*.html'

dependency-health:
spotless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -148,29 +183,14 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Dependency Health
run: ./gradlew buildHealth

- name: Upload Dependency Report
uses: actions/upload-artifact@v4
if: always()
with:
name: dependency-health-report
path: ./**/build/reports/tests/
- name: Run Spotless
run: ./gradlew spotlessCheck --no-configuration-cache

android-screenshot-test:
dependency-health:
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: ${{ env.DISTRIBUTION }}
java-version: ${{ env.JDK_VERSION }}
Expand All @@ -183,43 +203,15 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Roborazzi screenshot tests
id: screenshotsverify
continue-on-error: true
run: ./gradlew clean verifyRoborazziDebug

- name: Generate Roborazzi screenshot Report
id: screenshots-report
continue-on-error: true
run: ./gradlew compareRoborazziDebug

- name: Prevent pushing new screenshots if this is a fork
id: checkfork_screenshots
continue-on-error: false
if: steps.screenshotsverify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::error::Screenshot tests failed, please create a PR in your fork first." && exit 1

- name: Generate new screenshots if verification failed and it's a PR
id: screenshotsrecord
if: steps.screenshotsverify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew recordRoborazziDebug

- name: Push new screenshots if available
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.screenshotsrecord.outcome == 'success'
with:
file_pattern: '*/*.png'
disable_globbing: true
commit_message: "🤖 Beep Beep: Update screenshots 🤖"
- name: Dependency Health
run: ./gradlew buildHealth

- name: Upload screenshot results
if: always()
- name: Upload Dependency health Report
uses: actions/upload-artifact@v4
if: always()
with:
name: screenshot-test-results
path: '**/build/outputs/roborazzi/*_compare.png'
name: dependency-health-report
path: '**/build/reports/dependency-analysis/build-health-report.txt'

jvm-test:
runs-on: ubuntu-latest
Expand All @@ -241,12 +233,12 @@ jobs:
- name: Run JVM Tests
run: ./gradlew jvmTest

- name: Upload Test Report
- name: Upload Test Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: jvm-test-report
path: ./**/build/reports/tests/
name: test-report
path: '**/build/reports/*'

common-test:
runs-on: macos-latest
Expand Down Expand Up @@ -282,7 +274,7 @@ jobs:
if: always()
with:
name: common-test-report
path: ./**/build/reports/tests/
path: '**/build/reports/*'

build-ios:
runs-on: macos-15
Expand Down
65 changes: 1 addition & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ TvManiac
![kmp](https://img.shields.io/badge/multiplatform-%237F52FF.svg?style=for-the-badge&logo=kotlin&logoColor=white)
![compose](https://img.shields.io/badge/jetpack_compose-2bab6b.svg?style=for-the-badge&logo=android&logoColor=white)
![swiftui](https://img.shields.io/badge/swiftui-%23000000.svg?style=for-the-badge&logo=swift&logoColor=white)
[![TvManiac Debug](https://img.shields.io/badge/Debug--Apk-download-green?style=for-the-badge&logo=android)](https://github.com/c0de-wizard/tv-maniac/releases/latest/download/app-debug.apk)

**TvManiac** is a personalized entertainment tracking and recommendation Multiplatform app. By utilizing
[TMDB](https://developer.themoviedb.org/docs), we can view shows, create a watchlist get statistics, and much more. This project aims to demonstrate KMP development capabilities. This is currently running on:
Expand All @@ -17,7 +16,7 @@ This is my playground for learning Kotlin Multiplatform. With that said, I'm sur

| Android | iOS |
| -- | -- |
| <video src="https://github.com/thomaskioko/tv-maniac/assets/841885/a9991256-27a8-4a99-87f3-0f071c7cbc68" width=350/> | <video src="https://github.com/user-attachments/assets/d446aabc-5569-456b-9964-bbd1a9bfe371" width=350/> |
| <video src="https://github.com/user-attachments/assets/90ec7924-7d50-40a4-bb0b-89d79aa9bbcd" width=350/> | <video src="https://github.com/user-attachments/assets/69f101b7-e100-4775-9893-6687e455560c" width=350/> |


> [!IMPORTANT]
Expand All @@ -40,68 +39,6 @@ This is my playground for learning Kotlin Multiplatform. With that said, I'm sur
![TvManiac Architecture](https://github.com/thomaskioko/tv-maniac/assets/841885/84e314fc-71a5-40e5-b034-213e6b546f9a)


### Android Screenshots

<table>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/AndroidHomeLight.png?raw=true" alt="Home Screen Light" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/AndroidDetailLight.png?raw=true" alt="Home Screen Light" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/EpisodeListLight.png?raw=true" alt="Episodes List Light" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/AnroidHomeDark.png?raw=true" alt="Show Details Dark" width="500"/>
</p>
</td>
</tr>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/AnroidDetailDark.png?raw=true" alt="Show Details Dark" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/EpisodeListDark.png?raw=true" alt="Episodes List Dark" width="500"/>
</p>
</td>
</table>

### 🔆 iOS Screenshots

<table>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/iOSHomeLight.png?raw=true" alt="Home Screen Light" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/iOSDetailLight.png?raw=true" alt="Home Screen Light" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/iOSHomeDark.png?raw=true" alt="Home Screen Dark" width="500"/>
</p>
</td>
<td>
<p align="center">
<img src="https://github.com/c0de-wizard/tv-maniac/blob/main/art/iOSDetailDark.png?raw=true" alt="Show Details Dark" width="500"/>
</p>
</td>
</tr>
</table>

## Libraries Used
### Android
* [Accompanist](https://github.com/google/accompanist)
Expand Down
3 changes: 2 additions & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ dependencies {
implementation(libs.androidx.core.core)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.profileinstaller)
implementation(libs.appauth)

implementation(libs.decompose.decompose)
Expand All @@ -99,6 +98,8 @@ dependencies {
implementation(libs.ktor.core)

baselineProfile(projects.android.benchmark)

runtimeOnly(libs.androidx.profileinstaller)
}

baselineProfile {
Expand Down
5 changes: 1 addition & 4 deletions android/app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background_tint">#FCFCFC</color>
<color name="ic_launcher_foreground_tint">#1F2123</color>
</resources>
<resources></resources>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<style name="NightAdjusted.Theme.TvManiac" parent="android:Theme.Material.NoActionBar" />

<style name="NightAdjusted.Theme.Splash" parent="Theme.SplashScreen">
<item name="android:windowLightStatusBar" tools:targetApi="23">false</item>
<item name="android:windowLightStatusBar" >false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
</style>

Expand Down
5 changes: 1 addition & 4 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background_tint">#000000</color>
<color name="ic_launcher_foreground_tint">#FCFCFC</color>
</resources>
<resources></resources>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<style name="Theme.TvManiac" parent="NightAdjusted.Theme.TvManiac" />

<style name="NightAdjusted.Theme.Splash" parent="Theme.SplashScreen">
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
<item name="android:windowLightStatusBar" >true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="27">true</item>
</style>

Expand Down
Loading
Loading