Repository navigation
Droidcore 1.3.1
The core changes involve restructuring the project to support common, Android, and iOS source sets. The build configurations have been updated significantly to incorporate the Kotlin Multiplatform and Compose Multiplatform Gradle plugins. Existing Compose components within the droidcore module have been adapted to work within the common source set, with platform-specific implementations provided where necessary (e.g., for Toast messages, Network Images, and Context handling). New components, such as FlipCard and CustomCarousel, have also been added or integrated into the common module. The sample application (app module) has been updated to demonstrate the multiplatform setup, including new entry points for Android and iOS.
Highlights
- Kotlin Multiplatform Migration: The project has been migrated to Kotlin Multiplatform, enabling code sharing between Android and iOS platforms.
- Compose Multiplatform Integration: Compose Multiplatform is now used for building the UI components in the common module, allowing the
Droidcorelibrary to provide Compose components for multiple platforms. - Project Structure Update: The project structure has been updated to include
commonMain,androidMain, andiosMainsource sets. - Component Adaptation and Addition: Existing Compose components have been adapted for the common module, and new components like
FlipCardandCustomCarouselhave been added. Platform-specific implementations are provided for certain functionalities. - Build Configuration Changes: Gradle build files (
build.gradle.kts,settings.gradle.kts,libs.versions.toml,gradle.properties) have been extensively modified to support KMP and CMP, including dependency updates and plugin configurations. - iOS Application Setup: A new
iosAppmodule has been added with necessary Xcode project files and Swift code to launch the Compose Multiplatform UI on iOS.
Changelog
Click here to see the changelog
- .gitignore
- Added
.idea,.kotlin, and iOS user data directories to ignore list.
- Added
- README.md
- Updated library description to reflect Kotlin Multiplatform and Compose-Multiplatform.
- Updated dependency version to 1.3.0.
- Added 'Flipcard' and 'NeoToast' to the list of components.
- app/build.gradle.kts
- Applied
kotlinMultiplatform,compose.compiler, andcomposeMultiplatformplugins. - Configured Android and iOS targets.
- Defined source sets (
androidMain,androidUnitTest,androidInstrumentedTest,iosMain,commonMain) and their dependencies. - Commented out old Android/Compose dependencies.
- Set
isMinifyEnabledtofalsefor both debug and release build types. - Updated
compileOptionssource and target compatibility toJavaVersion.VERSION_11. - Added
debugImplementation(compose.uiTooling).
- Applied
- app/src/androidMain/kotlin/id/neotica/droidcore/MainActivity.kt
- Added new file for Android-specific
MainActivityto host the common Compose UI.
- Added new file for Android-specific
- app/src/commonMain/kotlin/id/neotica/droidcore/CommonApp.kt
- Moved/adapted main application composable logic to
CommonAppandTestContentin the common source set. - Removed Android-specific imports (
android.content.res.Configuration,android.os.Bundle,androidx.activity.ComponentActivity, etc.). - Changed
numberStatefrommutableIntStateOftomutableLongStateOf. - Removed
LocalContextusage. - Added state and logic for showing
NeoToast. - Added
NeoButtonto trigger the alert dialog. - Removed preview functions (moved to
androidMain).
- Moved/adapted main application composable logic to
- app/src/iosMain/kotlin/id/neotica/droidcore/MainViewController.kt
- Added new file for iOS entry point using
ComposeUIViewController.
- Added new file for iOS entry point using
- build.gradle.kts
- Applied
kotlinMultiplatform,compose.compiler, andcomposeMultiplatformplugins withapply false. - Commented out the old
jetbrainsKotlinAndroidplugin.
- Applied
- droidcore/build.gradle.kts
- Applied
kotlinMultiplatform,composeMultiplatform, andcompose.compilerplugins. - Configured Android and iOS targets.
- Defined source sets (
androidMain,commonMain,androidUnitTest,iosMain) and their dependencies. - Updated
compileSdkto 36. - Commented out
testInstrumentationRunner. - Removed
composeOptionsandkotlinOptionsblocks. - Removed old Android/Compose dependencies.
- Updated maven publish version to 1.3.0.
- Applied
- droidcore/src/androidMain/kotlin/id/neotica/droidcore/component/alert/NeoToast.android.kt
- Added new file for Android-specific implementation of
NeoToastusingBasicAlertDialog.
- Added new file for Android-specific implementation of
- droidcore/src/androidMain/kotlin/id/neotica/droidcore/component/context/ContextPlatform.android.kt
- Added new file for Android-specific implementation of
AppContext.
- Added new file for Android-specific implementation of
- droidcore/src/androidMain/kotlin/id/neotica/droidcore/component/image/NetworkImage.kt
- Marked
NetworkImageasactual.
- Marked
- droidcore/src/commonMain/composeResources/drawable/ic_check_circle.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/ic_clear.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/ic_info_filled.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/ic_lock.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/ic_warning_filled.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/lock_24dp.svg
- Added new SVG drawable resource.
- droidcore/src/commonMain/composeResources/drawable/visibility_off.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/composeResources/drawable/visibility_on.xml
- Added new vector drawable resource.
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/alert/NeoAlert.kt
- Updated
AlertIconusage to usepainterResourcefrom generated resources.
- Updated
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/alert/NeoToast.kt
- Added new file defining the
expect fun NeoToast.
- Added new file defining the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/alert/dump/PrimaryAlert.kt
- Commented out the entire file content.
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/cards/ButtonCard.kt
- Added
onClick()lambda call to theNeoButton.
- Added
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/cards/FlipCard.kt
- Added new file implementing the
FlipCardcomposable.
- Added new file implementing the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/cards/deprecated/NeoCard.kt
- Removed string interpolation for the
titleparameter.
- Removed string interpolation for the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/carousel/CustomCarousel.kt
- Added new file implementing the
CustomCarouselcomposable.
- Added new file implementing the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/context/ContextPlatform.kt
- Added new file defining the
expect object AppContext.
- Added new file defining the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/icon/AlertIcon.kt
- Changed
iconparameter type fromImageVectortoPainterand updated usage.
- Changed
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/image/NetworkImage.kt
- Added new file defining the
expect fun NetworkImageandNetworkImageInterface.
- Added new file defining the
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/textfield/NeoTextField.kt
- Added
enabledparameter and applied it toOutlinedTextField.
- Added
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/textfield/NumberField.kt
- Changed
valuetype fromMutableState<Int>toMutableState<Long>. - Updated internal state handling and parsing logic.
- Added
Textto display the current number state. - Added KDoc.
- Changed
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/textfield/PasswordTextField.kt
- Commented out old AndroidX icon imports.
- Updated icon usage to use
painterResourcefrom generated resources.
- droidcore/src/commonMain/kotlin/id/neotica/droidcore/component/textfield/deprecated/PasswordTextFieldLegacy.kt
- Commented out old AndroidX icon imports.
- Added
@Deprecatedannotation. - Updated icon usage to use
painterResourcefrom generated resources.
- droidcore/src/iosMain/kotlin/id/neotica/droidcore/component/alert/NeoToast.ios.kt
- Added new file for iOS-specific implementation of
NeoToastusingBasicAlertDialog.
- Added new file for iOS-specific implementation of
- droidcore/src/iosMain/kotlin/id/neotica/droidcore/component/context/ContextPlatform.ios.kt
- Added new file for iOS-specific implementation of
AppContext.
- Added new file for iOS-specific implementation of
- droidcore/src/iosMain/kotlin/id/neotica/droidcore/component/image/NetworkImage.ios.kt
- Added new file for iOS-specific implementation of
NetworkImage(currently displays URL as text).
- Added new file for iOS-specific implementation of
- droidcore/src/main/res/drawable/ic_check_circle.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/ic_clear.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/ic_info_filled.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/ic_lock.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/ic_warning_filled.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/visibility_off.xml
- Added new Android vector drawable resource.
- droidcore/src/main/res/drawable/visibility_on.xml
- Added new Android vector drawable resource.
- gradle.properties
- Added
kotlin.native.cacheKind=none.
- Added
- gradle/libs.versions.toml
- Updated AGP, Kotlin, Lifecycle, and Compose Multiplatform versions.
- Removed AndroidX Compose BOM, appcompat, and material dependencies.
- Added Compose Multiplatform specific dependencies and bundle.
- Added
androidx-material-icons-extended.
- gradle/wrapper/gradle-wrapper.properties
- Updated Gradle distribution URL to 8.11.1.
- iosApp/Configuration/Config.xcconfig
- Added new Xcode configuration file.
- iosApp/droidcoreIos.xcodeproj/project.xcworkspace/contents.xcworkspacedata
- Added new Xcode workspace data file.
- iosApp/iosApp.xcodeproj/project.pbxproj
- Added new Xcode project file for the iOS application.
- iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata
- Added new Xcode workspace data file with self reference.
- iosApp/iosApp.xcodeproj/xcuserdata/ryomartin.xcuserdatad/xcschemes/xcschememanagement.plist
- Added new Xcode user scheme management file.
- iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json
- Added new Xcode asset catalog configuration.
- iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
- Added new Xcode asset catalog configuration for App Icon.
- iosApp/iosApp/Assets.xcassets/Contents.json
- Added new Xcode asset catalog configuration.
- iosApp/iosApp/ContentView.swift
- Added new Swift file to wrap the Compose UIViewController for SwiftUI.
- iosApp/iosApp/Info.plist
- Added new iOS application Info.plist file.
- iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json
- Added new Xcode asset catalog configuration for previews.
- iosApp/iosApp/iOSApp.swift
- Added new Swift file as the iOS application entry point.