Changes:
- update all examples to Kotlin 2.0
- migrate to using kotlin("plugin.compose") for Compose compiler
configuration
- remove deprecated Compose Web gradle API usages
- added a workaround for
https://github.com/JetBrains/compose-multiplatform/issues/4848 in
Jetsnack example
Testing:
- `./gradlew build` in every example
- run some examples in simulators (or desktop, browser)
(cherry picked from commit 4c01cbdec7)
Fix regression after
https://github.com/JetBrains/compose-multiplatform/pull/4433
`./gradlew compileReleaseKotlinAndroid` in `imageviewer` fails with:
```
* What went wrong:
Execution failed for task ':shared:compileReleaseKotlinAndroid'.
> Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlinAndroid' (17).
```
(JAVA_HOME points to JDK 17)
According to https://developer.android.com/build/jdks we should:
1. [use JDK 17 for API 34](https://developer.android.com/build/jdks#compileSdk)
2. [use toolchain](https://developer.android.com/build/jdks#toolchain):
```
We recommend that you always specify the Java toolchain, and either ensure that the specified JDK is installed, or add a toolchain resolver to your build.
```
As we don't want to force people to have JDK 17 on their machine, we apply toolchain resolver that is recommended by Gradle:
```
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
```
## Test
1. Remove JDK 17 from the computer, remove `jvmToolchain(17)`
2. Run `./gradlew assembleDebug`
3. It should fail with:
```
> Could not create task ':androidApp:compileDebugJavaWithJavac'.
> Failed to calculate the value of task ':androidApp:compileDebugJavaWithJavac' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
```
4. restore `jvmToolchain(17)`
5. Run `./gradlew assembleDebug` again
6. It should succeed
## Issues
Fixes https://github.com/JetBrains/compose-multiplatform/issues/3615
* Simplify resource management for iOS
Introduces new a new task 'sync<FRAMEWORK_CLASSIFIER>ComposeIosResources',
which collects resources from all source sets, included in iOS targets.
With this change:
* CocoaPods integration does not require any configuration or calling 'pod install' after changing resources.
* Important: existing projects need to remove 'extraSpecAttributes["resources"] = ...' from build scripts, and rerun `./gradlew podInstall` once!
* Without CocoaPods, the resource directory should be added to XCode build phases once.
Resolves#3073Resolves#3113Resolves#3066
* Design changes; move to material3
* Use animations to move between different images
* More design changes, rounded corners and animations
* Introduce square gallery view, start with granularizing state management
* Introduce square gallery view, start with granularizing state management
* Make PreviewImage not depend on the whole gallery state
* Move in initialization logic from composition into launched effect
* Highlight currently selected image
* Hoist state for FullscreenImage TopAppBar
Move from Custom Implementation to Material App Bar, use color scheme from main page
Extract hardcoded colors to ImageViewerColors
* Provide floating action buttons with nicer colors
* Provide keyboard events via SharedFlow (remove passing around MutableState in the composable hierarchy as it may potentially violate UDF)
Commonize IOScope initialization
* Provide German translation in shared R-strings
* Move from immutable data classes to Compose-aware State Holders.
* Fix gradlew formatting issue?
* Regenerate gradle wrapper after Android Studio autoformatting debacle
* Resolve rememberCoroutineScope issue
* Provide mock name for remaining picture in repo
* Restore TEAM_ID in project.pbxproj
* Use emptyFlow as default to simplify nullability handling for external events
* Remove extraneous newline and unnecessary print statement
* Provide German translation in XML format
Consistently rename title to "My Memories"
* Remove commented-out code, cleanup rendundant modifiers
Make Title Bar use callbacks instead of accessing ViewModel directly
Add toggle & icon for list and grid view