Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 9 additions & 31 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17.0.5'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4
gradle-version: wrapper

- name: Build androidApp
run: gradle :androidApp:buildDebug
Expand All @@ -36,7 +30,7 @@ jobs:

ios-build-check:
name: Build iosApp
runs-on: macos-latest
runs-on: macos-15

env:
API_KEY_TMDB: ''
Expand All @@ -48,34 +42,18 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17.0.5'
run: |
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
xcodebuild -version # Optional: verify selected version

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4

- name: Generate framework file
run: gradle :shared:generateDummyFramework

- name: Set up cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: latest

- name: Build xcworkspace
run: gradle podInstall
gradle-version: wrapper

- name: Build iosApp
run: xcodebuild clean build -workspace iosApp/iosApp.xcworkspace -scheme iosApp -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
run: |
xcodebuild clean build -project iosApp/iosApp.xcodeproj -scheme iosApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.3.1' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

#- name: Run Ios tests
# run: bash xcodebuild test -workspace iosApp/iosApp.xcworkspace -scheme iosApp -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# run: bash xcodebuild test -workspace iosApp/iosApp.xcworkspace -scheme iosApp -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ iosApp/Pods/*
iosApp/iosApp.xcworkspace/*
iosApp/iosApp.xcodeproj/*
!iosApp/iosApp.xcodeproj/project.pbxproj
shared/shared.podspec
shared/shared.podspec
/.kotlin/*
15 changes: 6 additions & 9 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.maps.secrets)
}

android {
namespace = "com.example.moveeapp_compose_kmm.android"
compileSdk = libs.versions.targetSdk.get().toInt()
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
applicationId = "com.example.moveeapp_compose_kmm.android"
Expand All @@ -29,12 +30,10 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
excludes += "META-INF/INDEX.LIST"
}
}
buildTypes {
Expand All @@ -61,16 +60,14 @@ android {
}

dependencies {
implementation(project(":shared"))
implementation(projects.shared)
implementation(libs.androidx.activity.compose)

coreLibraryDesugaring(libs.desugar.jdk.libs)

// Koin
with(libs.koin) {
implementation(android)
implementation(core)
}
implementation(libs.koin.android)
implementation(libs.koin.core)
}

secrets {
Expand Down
18 changes: 14 additions & 4 deletions androidApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".MoveeApplication"
android:allowBackup="false"
android:enableOnBackInvokedCallback="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:icon="@mipmap/ic_launcher">
tools:targetApi="33">
<activity
android:name=".MainActivity"
android:exported="true">
Expand All @@ -18,7 +23,12 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="${MAPS_API_KEY}"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${MAPS_API_KEY}" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
plugins {
alias(libs.plugins.android.application).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.multiplatform).apply(false)
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.kotlin.android).apply(false)
alias(libs.plugins.compose).apply(false)
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.kotlinx.serialization).apply(false)
alias(libs.plugins.moko.resources).apply(false)
alias(libs.plugins.buildKonfig).apply(false)
alias(libs.plugins.kotlin.cocoapods).apply(false)
alias(libs.plugins.maps.secrets).apply(false)
}

Expand Down
23 changes: 23 additions & 0 deletions desktopApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose.hotReload)
}

kotlin {
jvm()

sourceSets {
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.foundation)
}

jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(projects.shared)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.example.moveeapp_compose_kmm

import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState
import com.example.moveeapp_compose_kmm.di.init
import org.koin.compose.KoinApplication
import java.awt.Dimension

fun main() = application {
Window(
title = "Movee",
state = rememberWindowState(width = 360.dp, height = 720.dp),
onCloseRequest = ::exitApplication,
) {
window.minimumSize = Dimension(300, 600)
KoinApplication(application = {
init()
}) {
App()
}
}
}
8 changes: 2 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8

#Kotlin
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx2048M

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

#MPP
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.androidSourceSetLayoutVersion=2
org.jetbrains.compose.experimental.uikit.enabled=true

#URL
BASE_URL=https://api.themoviedb.org/3/
IMAGE_BASE_URL=https://image.tmdb.org/t/p/w342
Expand Down
69 changes: 32 additions & 37 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,35 @@

minSdk = "24"
targetSdk = "34"
compileSdk = "35"

kotlin = "1.9.23"
kotlinx-coroutines = "1.8.0"
kotlinx-serialization = "1.6.0"
kotlinx-datetime = "0.5.0"
ktor = "2.3.5"
agp = "8.3.2"
desugar_jdk_libs = "2.0.4"
compose = "1.6.2"
compose-compiler = "1.5.11"
compose-ui-tooling = "1.6.4"
androidx = "1.13.0"
androidx-activity = "1.9.0"
androidx-appcompat = "1.6.1"
voyager = "1.0.0-rc10"
napier = "2.6.1"
buildKonfig = "0.14.0"
koin = "3.5.0"
koin-compose = "1.1.0"
moko = "0.23.0"
seiko = "1.5.1"
mapsCompose = "2.15.0"
playServicesMaps = "18.2.0"
playServicesLocation = "21.2.0"
kotlin = "2.2.0"
kotlinx-coroutines = "1.10.2"
kotlinx-serialization = "1.8.1"
ktor = "3.1.3"
agp = "8.10.1"
desugar_jdk_libs = "2.1.5"
compose = "1.8.2"
composeHotReload = "1.0.0-alpha11"
androidx = "1.16.0"
androidx-activity = "1.10.1"
androidx-appcompat = "1.7.1"
voyager = "1.1.0-beta03"
napier = "2.7.1"
buildKonfig = "0.17.1"
koin = "4.1.0"
seiko = "1.10.0"
mapsCompose = "6.6.0"
playServicesLocation = "21.3.0"
maps-secrets = "2.0.1"
javafx = "24.0.1"

[libraries]

androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util", version.ref = "compose-ui-tooling" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-ui-tooling" }
androidx-compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-ui-tooling" }
maps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "mapsCompose" }
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "playServicesMaps" }
play-services-location = { module = "com.google.android.gms:play-services-location", version.ref = "playServicesLocation" }

desugar-jdk-libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
Expand All @@ -47,44 +40,46 @@ voyager-tabs = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.r
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
voyager-koin = { module = "cafe.adriel.voyager:voyager-koin", version.ref = "voyager" }

ui-backhandler = { module = "org.jetbrains.compose.ui:ui-backhandler", version.ref = "compose" }

logger = { module = "io.github.aakira:napier", version.ref = "napier" }

kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }

ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
ktor-client-android = { module = "io.ktor:ktor-client-android", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
ktor-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
ktor-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-logging-logback = { module = "ch.qos.logback:logback-classic", version = "1.2.11" }

koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin-compose" }
koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" }
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" }

image-loader = { module = "io.github.qdsfdhvh:image-loader", version.ref = "seiko" }

settings = { module = "com.liftric:kvault", version = "1.10.0" }
settings = { module = "com.russhwolf:multiplatform-settings", version = "1.3.0" }
encryptedprefs = { module = "dev.spght:encryptedprefs-ktx", version = "1.0.1" }

moko-resources = { module = "dev.icerock.moko:resources", version.ref = "moko" }
moko-resources-compose = { module = "dev.icerock.moko:resources-compose", version.ref = "moko" }
javafx-base = { module = "org.openjfx:javafx-base", version.ref = "javafx" }
javafx-graphics = { module = "org.openjfx:javafx-graphics", version.ref = "javafx" }
javafx-swing = { module = "org.openjfx:javafx-swing", version.ref = "javafx" }
javafx-web = { module = "org.openjfx:javafx-web", version.ref = "javafx" }

[plugins]

kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
compose-hotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "composeHotReload" }
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
moko-resources = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko" }
maps-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "maps-secrets" }
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 @@
#Tue Aug 01 14:19:46 TRT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 0 additions & 5 deletions iosApp/Podfile

This file was deleted.

Loading
Loading