This is a Kotlin Multiplatform project targeting Android, iOS, Desktop (JVM).
-
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
- commonMain is for code that’s common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, the iosMain folder would be the right place for such calls. Similarly, if you want to edit the Desktop (JVM) specific part, the jvmMain folder is the appropriate location.
-
/iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
- on macOS/Linux
./gradlew :composeApp:assembleDebug
- on Windows
.\gradlew.bat :composeApp:assembleDebug
To build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
- on macOS/Linux
./gradlew :composeApp:run
- on Windows
.\gradlew.bat :composeApp:run
To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
To enable Calendar sync and file import capabilities:
-
Enable APIs: Go to the Google Cloud Console and enable the following APIs for your project:
- Google Calendar API: Enable Calendar API
- Google Drive API: Enable Drive API
-
Configure OAuth Consent:
- Go to APIs & Services > OAuth Consent Screen.
- Set the User Type to External and the Publishing Status to Testing.
- Under Test users, add your Google Account email (e.g.
your-email@gmail.com). - Under Scopes, ensure the following scopes are added:
.../auth/calendar.../auth/drive.readonly
-
Create Credentials:
- Go to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Select application type Desktop app.
- Copy the generated Client ID and Client Secret.
-
Add to
.env: Create a.envfile at the root of the project (copying from.env_template) and populate it:GOOGLE_CLIENT_ID=your_client_id_here GOOGLE_CLIENT_SECRET=your_client_secret_here
-
CI/CD Repository Secrets (for GitHub Releases): When GitHub Actions packages and builds the desktop installers (
.dmg,.msi,.deb), it requires the OAuth credentials to be configured as Repository Secrets on GitHub. To configure these:- Go to your repository on GitHub.
- Click Settings > Secrets and variables > Actions > New repository secret.
- Add the following secrets:
GOOGLE_CLIENT_ID: (Your Google Client ID)GOOGLE_CLIENT_SECRET: (Your Google Client Secret)WEB3FORMS_ACCESS_KEY: (Optional. Web3Forms access key for anonymous bug reporting)
Learn more about Kotlin Multiplatform…