Skip to content

Commit d869773

Browse files
committed
Prepare version 1.2.0
1 parent 391874b commit d869773

File tree

4 files changed

+47
-7
lines changed

4 files changed

+47
-7
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
## [Unreleased]
44

55

6+
## [1.2.0] - 2023-08-09
7+
8+
New:
9+
- Support for specifying custom Compose compiler versions. This will allow you to use the latest
10+
version of Molecule with newer versions of Kotlin than it explicitly supports.
11+
12+
See [the README](https://github.com/cashapp/molecule/#custom-compose-compiler) for more information.
13+
14+
Fixed:
15+
- Ensure frame times sent by `RecompositionMode.Immediate` always increase. Previously,
16+
when targeting JS, the same frame time could be seen since the clock only has millisecond
17+
precision. Since the frame time is in nanoseconds, synthetic nanosecond offsets will be added to
18+
ensure each timestamp is strictly greater than the last.
19+
- Perform teardown of the composition on cancellation within an existing coroutine rather than in
20+
a job completion listener. This ensures it executes on the same dispatcher as the rest of the
21+
system, rather than on the canceling caller's thread.
22+
23+
624
## [1.1.0] - 2023-07-20
725

826
New:
@@ -161,7 +179,8 @@ Initial release
161179

162180

163181

164-
[Unreleased]: https://github.com/cashapp/molecule/compare/1.1.0...HEAD
182+
[Unreleased]: https://github.com/cashapp/molecule/compare/1.2.0...HEAD
183+
[1.2.0]: https://github.com/cashapp/molecule/releases/tag/1.2.0
165184
[1.1.0]: https://github.com/cashapp/molecule/releases/tag/1.1.0
166185
[1.0.0]: https://github.com/cashapp/molecule/releases/tag/1.0.0
167186
[0.11.0]: https://github.com/cashapp/molecule/releases/tag/0.11.0

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ buildscript {
171171
mavenCentral()
172172
}
173173
dependencies {
174-
classpath 'app.cash.molecule:molecule-gradle-plugin:1.1.0'
174+
classpath 'app.cash.molecule:molecule-gradle-plugin:1.2.0'
175175
}
176176
}
177177
@@ -183,7 +183,7 @@ certain versions of Kotlin.
183183

184184
| Kotlin | Molecule |
185185
|--------|----------------|
186-
| 1.9.0 | 1.1.0 |
186+
| 1.9.0 | 1.1.0 - 1.2.0 |
187187
| 1.8.22 | 0.11.0 - 1.0.0 |
188188
| 1.8.21 | 0.10.0 |
189189
| 1.8.20 | 0.9.0 |
@@ -208,7 +208,7 @@ buildscript {
208208
}
209209
}
210210
dependencies {
211-
classpath 'app.cash.molecule:molecule-gradle-plugin:1.2.0-SNAPSHOT'
211+
classpath 'app.cash.molecule:molecule-gradle-plugin:1.3.0-SNAPSHOT'
212212
}
213213
}
214214
@@ -270,6 +270,27 @@ android {
270270
}
271271
```
272272

273+
### Custom Compose Compiler
274+
275+
Each version of Molecule ships with a specific JetBrains Compose compiler version which works with
276+
a single version of Kotlin (see [version table](#Usage) above). Newer versions of the Compose
277+
compiler or alternate Compose compilers can be specified using the Gradle extension.
278+
279+
To use a new version of the JetBrains Compose compiler version:
280+
```kotlin
281+
molecule {
282+
kotlinCompilerPlugin.set("1.4.8")
283+
}
284+
```
285+
286+
To use an alternate Compose compiler dependency:
287+
```kotlin
288+
molecule {
289+
kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
290+
}
291+
```
292+
293+
273294
## License
274295

275296
Copyright 2021 Square, Inc.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GROUP=app.cash.molecule
22

33
# HEY! If you change the major version here be sure to update release.yaml doc target folder!
4-
VERSION_NAME=1.2.0-SNAPSHOT
4+
VERSION_NAME=1.2.0
55

66
SONATYPE_AUTOMATIC_RELEASE=true
77
SONATYPE_HOST=DEFAULT

molecule-gradle-plugin/src/main/java/app/cash/molecule/gradle/MoleculeExtension.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ interface MoleculeExtension {
2424
*
2525
* Example: using a custom version of the JetBrains Compose compiler
2626
* ```kotlin
27-
* redwood {
27+
* molecule {
2828
* kotlinCompilerPlugin.set("1.4.8")
2929
* }
3030
* ```
3131
*
3232
* Example: using a custom Maven coordinate for the Compose compiler
3333
* ```kotlin
34-
* redwood {
34+
* molecule {
3535
* kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
3636
* }
3737
* ```

0 commit comments

Comments
 (0)