Google Dev Öne Çıkanlar
Bu uygulama, çoklu platform desteği ile MidJourney'ın oluşturduğu resimleri göstermek için geliştirilmiştir. Uygulama, Compose Multiplatform ile geliştirilmiştir. Uygulama, Android, iOS, Web, Wear OS, Android Automotive, Android TV platformlarında çalışmaktadır.
Kotlin ve Jetpack Compose kullanılarak MVVM konseptinde geliştirtirildi. Network request state'leri, endless pagination, image loading, çevrimdışı modu ve image caching işlemleri yapılmıştır.- Compose Multiplatform
- Ktor
- Koin
- Kotlinx Serialization
- Kotlinx Coroutines
- Coil
- Multiplatform Settings
Consumer App'ler herhangi bir komplex yapıya sahip değildir. Ortak ui layer'ı kullanırlar(viewModel dahil) ve MjImagesApp'i oluşturmakla sorumludurlar. MjImagesApp ve bu Composable'nin dependency'si MjImagesViewModel, Tüm platformlarda ortak çalışır.
- MacOS
- Linkteki gibi ortam kurulu olmalıdır.
Android uygulamasını derlemek için aşağıdaki komutu çalıştırın:
./gradlew :androidApp:assembleDebug
Proje build edildikten sonra iOS uygulaması herhangi bir emulator veya cihaz üzerinde çalıştırılabilir. Android Studio veya Xcode kullanılabilir.
Proje build edildikten sonra Wear OS uygulaması herhangi bir emulator veya cihaz üzerinde çalıştırılabilir.
./gradlew :wearApp:assembleDebug
Proje build edildikten sonra Android TV uygulaması herhangi bir emulator veya cihaz üzerinde çalıştırılabilir.
./gradlew :televisionApp:assembleDebug
Proje build edildikten sonra Android Automotive uygulaması herhangi bir emulator(Android Studio Hedgehog gerektirir) veya cihaz üzerinde çalıştırılabilir.
./gradlew :automotiveApp:assembleDebug
Bu proje Windows, Debian ve MacOS için oluşturulabilir.
./gradlew desktopApp:run
./gradlew :desktop:packageDistributionForCurrentOS
# çıktılar desktopApp/build/compose/binaries dizinine yazılır
Bu proje Web(JS) için oluşturulabilir. Demo
./gradlew :compose-web:jsBrowserDevelopmentRun
./gradlew :webApp:jsBrowserDevelopmentExecutableDistribution
./gradlew :webApp:jsBrowserDistribution
Bu proje Web(Wasm) için oluşturulabilir. Demo
./gradlew :wasmApp:wasmBrowserDevelopmentRun
./gradlew :wasmApp:wasmBrowserDevelopmentExecutableDistribution
./gradlew :wasmApp:wasmJsBrowserDistribution
Uygulama compose ui test,maestro ui test ve unit testlere sahiptir. Unit testler common paket altında, fake data ile yazılmıştır. UI testler ise androidTest paketi altında yazılmıştır. Maestro testleri ise maestro paketi altında yazılmıştır.
-
Unit Testleri çalıştırmak için aşağıdaki komutu çalıştırın:
./gradlew :shared:cleanTestDebugUnitTest :shared:testDebugUnitTest
-
Maestro Testleri çalıştırmak için aşağıdaki komutu çalıştırın:
maestro test .maestro
-
Android Instrumented UI testleri çalıştırmak için aşağıdaki komutu çalıştırın:
./gradlew :shared:connectedDebugAndroidTest
Uygulama için kullanılan API, mj.akgns.com şeklindedir.
Daha fazla bilgi için Medium yazısına göz atabilirsiniz.
Lütfen issue açmakta özgür hissedin; her türlü katkı memnuniyetle karşılanacaktır! Şimdiden elinize sağlık ✌️
- Linkedin: https://www.linkedin.com/in/mbakgun
- Twitter: https://twitter.com/mbakguns
- Mastodon: https://androiddev.social/@mbakgun
MIT License
Copyright (c) 2023 Mehmet Burak Akgün
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.