Skip to content

Commit

Permalink
Prepare version 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed May 29, 2024
1 parent ca05ca8 commit 5167547
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 77 deletions.
74 changes: 73 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<details>
<summary>Mosaic 0.12.0 Gradle plugin Kotlin compatibility table</summary>
<p>

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 |

</p>
</details>

<details>
<summary>Mosaic 0.12.0 Gradle plugin Compose compiler customization instructions</summary>
<p>

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")
}
```

</p>
</details>


## [0.12.0] - 2024-05-28

New:
Expand Down Expand Up @@ -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
Expand Down
86 changes: 13 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<details>
<summary>Snapshots of the development version are available in Sonatype's snapshots repository.</summary>
<p>

```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/).
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5167547

Please sign in to comment.