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

Migrate to Compose Multiplatform #1324

Merged
merged 23 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 52 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
./gradlew spotlessCheck \
:android-app:app:bundle \
:android-app:app:build \
jvmTest \
lint \
-x :android-app:app:assembleStandardBenchmark \
-x :android-app:app:bundleStandardBenchmark
Expand Down Expand Up @@ -102,17 +101,14 @@ jobs:
path: |
**/build/test-results/*

ios:
desktop:
runs-on: macos-latest
timeout-minutes: 60
env:
ORG_GRADLE_PROJECT_TIVI_TMDB_API_KEY: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TMDB_API_KEY }}
ORG_GRADLE_PROJECT_TIVI_TVDB_API_KEY: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TVDB_API_KEY }}
ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_ID: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_ID }}
ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_SECRET: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_SECRET }}
ORG_GRADLE_PROJECT_TIVI_RELEASE_KEYSTORE_PWD: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_RELEASE_KEYSTORE_PWD }}
ORG_GRADLE_PROJECT_TIVI_RELEASE_KEY_PWD: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_RELEASE_KEY_PWD }}
ORG_GRADLE_PROJECT_TIVI_PLAY_PUBLISHER_ACCOUNT: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_PLAY_PUBLISHER_ACCOUNT }}

steps:
- uses: actions/checkout@v3
Expand All @@ -130,17 +126,59 @@ jobs:
with:
gradle-home-cache-cleanup: true

- name: Decrypt secrets
run: ./release/decrypt-secrets.sh
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
- name: Build Desktop App
run: ./gradlew spotlessCheck jvmTest :desktop-app:package

- name: Build iOS libraries
run: ./gradlew spotlessCheck linkIosX64 iosX64Test
- name: Upload build outputs
if: always()
uses: actions/upload-artifact@v3
with:
name: desktop-build-binaries
path: desktop-app/build/compose/binaries

- name: Clean secrets
- name: Upload reports
if: always()
run: ./release/clean-secrets.sh
uses: actions/upload-artifact@v3
with:
name: desktop-reports
path: |
**/build/reports/*

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: desktop-test-results
path: |
**/build/test-results/*

ios:
runs-on: macos-latest
timeout-minutes: 60
env:
ORG_GRADLE_PROJECT_TIVI_TMDB_API_KEY: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TMDB_API_KEY }}
ORG_GRADLE_PROJECT_TIVI_TVDB_API_KEY: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TVDB_API_KEY }}
ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_ID: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_ID }}
ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_SECRET: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_TRAKT_CLIENT_SECRET }}

steps:
- uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Build iOS libraries
run: ./gradlew spotlessCheck :shared:linkIosX64 iosX64Test

- name: Upload reports
if: always()
Expand All @@ -160,7 +198,7 @@ jobs:

publish:
if: github.ref == 'refs/heads/main'
needs: [android, ios]
needs: [android, ios, desktop]
runs-on: ubuntu-latest
timeout-minutes: 20
env:
Expand Down
96 changes: 96 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,99 @@ org.eclipse.buildship.core.prefs
.classpath
.project
bin/


##########################################################################################
# Imported from https://github.com/github/gitignore/blob/main/Swift.gitignore
##########################################################################################

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
7 changes: 7 additions & 0 deletions .idea/dictionaries/chris.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 4 additions & 33 deletions android-app/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

plugins {
id("app.tivi.android.application")
id("app.tivi.android.compose")
id("app.tivi.kotlin.android")
alias(libs.plugins.ksp)
alias(libs.plugins.composeMultiplatform)
}

val appVersionCode = propOrDef("TIVI_VERSIONCODE", "1000").toInt()
Expand Down Expand Up @@ -148,51 +148,22 @@ androidComponents {

dependencies {
implementation(projects.shared)

implementation(projects.ui.account)
implementation(projects.ui.discover)
implementation(projects.ui.episode.details)
implementation(projects.ui.episode.track)
implementation(projects.ui.library)
implementation(projects.ui.popular)
implementation(projects.ui.trending)
implementation(projects.ui.recommended)
implementation(projects.ui.search)
implementation(projects.ui.show.details)
implementation(projects.ui.show.seasons)
implementation(projects.ui.settings)
implementation(projects.ui.upnext)

implementation(libs.circuit.overlay)

implementation(libs.androidx.lifecycle.viewmodel.ktx)

implementation(libs.androidx.activity.activity)
implementation(libs.androidx.activity.compose)

implementation(libs.androidx.emoji)

implementation(libs.compose.foundation.foundation)
implementation(libs.compose.foundation.layout)
implementation(libs.compose.material.material)
implementation(libs.compose.material.iconsext)
implementation(libs.compose.material3.material3)
implementation(libs.compose.material3.windowsizeclass)
implementation(libs.compose.animation.animation)
implementation(libs.compose.ui.tooling)

implementation(libs.timber)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.profileinstaller)

implementation(libs.kotlin.coroutines.android)

implementation(libs.androidx.profileinstaller)
implementation(libs.google.firebase.crashlytics)

implementation(libs.okhttp.loggingInterceptor)

ksp(libs.kotlininject.compiler)

implementation(libs.google.firebase.crashlytics)

qaImplementation(libs.chucker.library)

qaImplementation(libs.debugdrawer.debugdrawer)
Expand Down