diff --git a/CHANGELOG.md b/CHANGELOG.md index 298dc0c10..85298da36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,77 @@ Fixed: - Nothing yet! +## [0.13.0] - 2024-05-28 + +New: +- Support Kotlin 2.0.0! + +Changed: +- Remove our Gradle plugin in favor of JetBrains' (see below for more). + +Note: Version 0.12.0 was also released today, but it still supports Kotlin 1.9.24. +Check out [its release entry](https://github.com/JakeWharton/mosaic/releases/tag/0.12.0) for more on what's new. + + +### Gradle plugin removed + +This version of Mosaic removes the custom Gradle plugin in favor of [the official JetBrains Compose compiler plugin](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html) which ships as part of Kotlin itself. +Each module in which you had previously applied the `com.jakewharton.mosaic` plugin should be changed to apply `org.jetbrains.kotlin.plugin.compose` instead. +The Mosaic runtime will no longer be added as a result of the plugin change, and so any module which references Mosaic APIs should apply the `com.jakewharton.mosaic:mosaic-runtime` dependency. + +For posterity, the Kotlin version compatibility table and compiler version customization for our old Mosaic Gradle plugin will be archived here: + +
+Mosaic 0.12.0 Gradle plugin Kotlin compatibility table +

+ +Since Kotlin compiler plugins are an unstable API, certain versions of Mosaic only work with +certain versions of Kotlin. + +| Kotlin | Mosaic | +|--------|---------------| +| 1.9.24 | 0.12.0 | +| 1.9.22 | 0.11.0 | +| 1.9.20 | 0.10.0 | +| 1.9.10 | 0.9.1 | +| 1.9.0 | 0.8.0 - 0.9.0 | +| 1.8.22 | 0.7.1 | +| 1.8.21 | 0.7.0 | +| 1.8.20 | 0.6.0 | +| 1.8.10 | 0.5.0 | +| 1.8.0 | 0.3.0 - 0.4.0 | +| 1.7.10 | 0.2.0 | +| 1.5.10 | 0.1.0 | + +

+
+ +
+Mosaic 0.12.0 Gradle plugin Compose compiler customization instructions +

+ +Each version of Mosaic ships with a specific JetBrains Compose compiler version which works with +a single version of Kotlin (see [version table](#usage) above). Newer versions of the Compose +compiler or alternate Compose compilers can be specified using the Gradle extension. + +To use a new version of the JetBrains Compose compiler version: +```kotlin +mosaic { + kotlinCompilerPlugin.set("1.4.8") +} +``` + +To use an alternate Compose compiler dependency: +```kotlin +mosaic { + kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0") +} +``` + +

+
+ + ## [0.12.0] - 2024-05-28 New: @@ -206,7 +277,8 @@ Breaking: Initial release! -[Unreleased]: https://github.com/JakeWharton/mosaic/compare/0.12.0...HEAD +[Unreleased]: https://github.com/JakeWharton/mosaic/compare/0.13.0...HEAD +[0.13.0]: https://github.com/JakeWharton/mosaic/releases/tag/0.13.0 [0.12.0]: https://github.com/JakeWharton/mosaic/releases/tag/0.12.0 [0.11.0]: https://github.com/JakeWharton/mosaic/releases/tag/0.11.0 [0.10.0]: https://github.com/JakeWharton/mosaic/releases/tag/0.10.0 diff --git a/README.md b/README.md index 38fe85424..93b6c7822 100644 --- a/README.md +++ b/README.md @@ -79,73 +79,34 @@ fun main() = runMosaic { ## Usage -In order to use Mosaic you must write your code in Kotlin and must apply the Compose Kotlin -compiler plugin. +Mosaic is a library for Compose, and it relies on JetBrains' Kotlin Compose plugin to be present for use. +Any module which wants to call `runMosaic` or define `@Composable` functions for use with Mosaic must have this plugin applied. +For more information, see [the JetBrains Compose compiler documentation](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html). -For Gradle users, the Mosaic Gradle plugin will take care of applying the compiler plugin. +Mosaic itself can then be added like any other dependency: ```groovy -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24' - classpath 'com.jakewharton.mosaic:mosaic-gradle-plugin:0.12.0' - } +dependencies { + implementation("com.jakewharton.mosaic:mosaic-runtime:0.13.0") } - -apply plugin: 'org.jetbrains.kotlin.jvm' -apply plugin: 'com.jakewharton.mosaic' ``` -The runtime APIs will be made available automatically by applying the plugin. Documentation is available at [jakewharton.github.io/mosaic/docs/0.x/](https://jakewharton.github.io/mosaic/docs/0.x/). -**Note**: Any module which contains a `@Composable`-annotated function or lambda must apply the -Mosaic plugin. While the runtime dependency will be available to downstream modules as a -transitive dependency, the compiler plugin is not inherited and must be applied to every module. - -Since Kotlin compiler plugins are an unstable API, certain versions of Mosaic only work with -certain versions of Kotlin. - -| Kotlin | Mosaic | -|--------|---------------| -| 1.9.24 | 0.12.0 | -| 1.9.22 | 0.11.0 | -| 1.9.20 | 0.10.0 | -| 1.9.10 | 0.9.1 | -| 1.9.0 | 0.8.0 - 0.9.0 | -| 1.8.22 | 0.7.1 | -| 1.8.21 | 0.7.0 | -| 1.8.20 | 0.6.0 | -| 1.8.10 | 0.5.0 | -| 1.8.0 | 0.3.0 - 0.4.0 | -| 1.7.10 | 0.2.0 | -| 1.5.10 | 0.1.0 | - -Versions newer than those listed may be supported but are untested. -
Snapshots of the development version are available in Sonatype's snapshots repository.

```groovy -buildscript { - repository { - mavenCentral() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24' - classpath 'com.jakewharton.mosaic:mosaic-gradle-plugin:0.13.0-SNAPSHOT' +repository { + mavenCentral() + maven { + url 'https://oss.sonatype.org/content/repositories/snapshots/' } } - -apply plugin: 'org.jetbrains.kotlin.jvm' -apply plugin: 'com.jakewharton.mosaic' +dependencies { + implementation("com.jakewharton.mosaic:mosaic-runtime:0.14.0-SNAPSHOT") +} ``` Snapshot documentation is available at [jakewharton.github.io/mosaic/docs/latest/](https://jakewharton.github.io/mosaic/docs/latest/). @@ -214,27 +175,6 @@ fun main() = runMosaic { } ``` -### Custom Compose Compiler - -Each version of Mosaic ships with a specific JetBrains Compose compiler version which works with -a single version of Kotlin (see [version table](#usage) above). Newer versions of the Compose -compiler or alternate Compose compilers can be specified using the Gradle extension. - -To use a new version of the JetBrains Compose compiler version: -```kotlin -mosaic { - kotlinCompilerPlugin.set("1.4.8") -} -``` - -To use an alternate Compose compiler dependency: -```kotlin -mosaic { - kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0") -} -``` - - # License Copyright 2020 Jake Wharton diff --git a/RELEASING.md b/RELEASING.md index c18120b41..d856d4053 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -9,8 +9,7 @@ 3. Update the `README.md`: 1. Change the "Download" section to reflect the new release version. - 2. Update the compatibility chart with our new version and if it supports a new Kotlin version. - 3. Change the snapshot section to reflect the next "SNAPSHOT" version, if it is changing. + 2. Change the snapshot section to reflect the next "SNAPSHOT" version, if it is changing. 4. Commit diff --git a/gradle.properties b/gradle.properties index 7d1161d99..2ee495da8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.jakewharton.mosaic -VERSION_NAME=0.13.0-SNAPSHOT +VERSION_NAME=0.13.0 SONATYPE_HOST=DEFAULT SONATYPE_AUTOMATIC_RELEASE=true