YouTube Clone KMP is a sophisticated project developed using Kotlin Multiplatform (KMP), enabling the creation of versatile applications across Android, iOS, Web, and Desktop platforms with shared code. This comprehensive YouTube clone mirrors the functionalities of the official YouTube app, offering a seamless user experience across various devices.
- Cross-Platform Compatibility
- Video Playback
- Sharing Options
- Download Capability
- Playlist Viewing
- Comprehensive Search
- Video Detail
- Trending Videos
- Subscribe Channels
- View Verified Channel Badges
- Offiline Video Support
- Smooth Interation
- Responsive UI
- Material Design Components
- Top Videos
- Shorts Videos
- Video Details
- Channel Screen
- Channel Home
- Live Streams
- Community
- Playlists
- Channel Details Screen
- Share Channel, Videos, and Shorts
- Like and Comment Features
- Download Videos
- Relevance Videos
- Subscriptions
- Library
- Shimmer Loading Screen
- Top Categories
- Navigation Rail for Foldable Devices
- Desktop and Web Version Support
- TV and Wear OS Versions
Feel free to contribute to the project and stay tuned for more exciting updates!
- Kotlin Multiplatform:
1.9.23
- AGP (Android Gradle Plugin):
8.2.2
- Compose:
1.6.1
androidx-appcompat
:1.6.1
androidx-activityCompose
:1.8.2
compose-uitooling
:1.6.2
composeImageLoader
:1.7.1
composeIcons
:1.1.0
- Core Libraries:
12.1.0
- Kotlinx Libraries:
kotlinx-coroutines
:1.8.0
kotlinx-serialization
:1.6.3
kotlinx-datetime
:0.5.0
- Networking:
coilNetwork
:3.0.0-alpha01
ktor
:2.3.8
- Dependency Injection:
koin
:3.5.1
- UI/UX:
compose-uitooling
:1.6.3
composeIcons
:1.1.0
- Media Handling:
media3Ui
:1.3.0
media3ExoplayerDash
:1.3.0
media3Exoplayer
:1.3.0
- Logging:
napier
:2.6.1
- Database/Storage:
libres
:1.2.2
- Web and Networking:
webview-kmp
:1.8.0
- JSON Parsing:
gson
:2.10.1
- Build Configurations:
buildConfig
:4.1.1
- Cross-Platform Image Loading:
composeImageLoader
:1.7.1
- Size Measurement:
size
:0.3.1
- Voyager Navigation:
1.0.0
- Other Utilities:
moko-mvvm
:0.16.1
vlcj
:4.7.0
ffmpegPlatform
:4.1-1.4.4
kamelImage
:0.9.2
- JavaFX:
22-ea+16
π Getting Started To use the app, follow these steps:
- Create YouTube API V3 credentials.
- Add the credentials to
local.properties
likeBASE_URL = Your_API_VALUE
.
Feel free to reach out if you have any questions or need further assistance!
Connect with me to discuss potential projects, job opportunities, or any other collaboration.
Let's chat about potential projects, job opportunities, or any other collaboration! Feel free to connect with me through the following channels:
If you find my work helpful, you can support me by buying me a coffee.
![]() |
![]() |
![]() |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- check your system with KDoctor
- install JDK 17 on your machine
- add
local.properties
file to the project root and set a path to Android SDK there
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration
To build the application bundle:
- run
./gradlew :composeApp:assembleDebug
- find
.apk
file incomposeApp/build/outputs/apk/debug/composeApp-debug.apk
Run the desktop application: ./gradlew :composeApp:run
To run the application on iPhone device/simulator:
- Open
iosApp/iosApp.xcproject
in Xcode and run standard configuration - Or use Kotlin Multiplatform Mobile plugin for Android Studio
Run the browser application: ./gradlew :composeApp:jsBrowserDevelopmentRun
- to create .apk file for the Andorid. We simply need to 'build > Build Bundles > Build APK'.
-
to create Native Distributable for the Desktop Windows, MacOS, Linux. We need to follow the procedure.
-
'First of all following inside the 'build.gradle.kts' ' compose.desktop { application { mainClass = "MainKt"
nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "org.company.app.desktopApp" packageVersion = "1.0.0" description = "YouTube Clone Using Kotlin Multiplatform" copyright = "Β© 2024 Muhammad Khubaib Imtiaz. All rights reserved." windows { iconFile.set(project.file("src/commonMain/resources/youtube_music.png")) } macOS { iconFile.set(project.file("src/commonMain/resources/youtube_music.png")) } linux { iconFile.set(project.file("src/commonMain/resources/youtube_music.png")) } }
} }'
-
Now simply run the command 'gradle createDistributable or ./gradlew createDistributable'
- for the Js Web App, we simply need to execute the 'gradle jsBrowserWebpack'