Skip to content

Commit

Permalink
Prepare version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Aug 9, 2023
1 parent 391874b commit d869773
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
## [Unreleased]


## [1.2.0] - 2023-08-09

New:
- Support for specifying custom Compose compiler versions. This will allow you to use the latest
version of Molecule with newer versions of Kotlin than it explicitly supports.

See [the README](https://github.com/cashapp/molecule/#custom-compose-compiler) for more information.

Fixed:
- Ensure frame times sent by `RecompositionMode.Immediate` always increase. Previously,
when targeting JS, the same frame time could be seen since the clock only has millisecond
precision. Since the frame time is in nanoseconds, synthetic nanosecond offsets will be added to
ensure each timestamp is strictly greater than the last.
- Perform teardown of the composition on cancellation within an existing coroutine rather than in
a job completion listener. This ensures it executes on the same dispatcher as the rest of the
system, rather than on the canceling caller's thread.


## [1.1.0] - 2023-07-20

New:
Expand Down Expand Up @@ -161,7 +179,8 @@ Initial release



[Unreleased]: https://github.com/cashapp/molecule/compare/1.1.0...HEAD
[Unreleased]: https://github.com/cashapp/molecule/compare/1.2.0...HEAD
[1.2.0]: https://github.com/cashapp/molecule/releases/tag/1.2.0
[1.1.0]: https://github.com/cashapp/molecule/releases/tag/1.1.0
[1.0.0]: https://github.com/cashapp/molecule/releases/tag/1.0.0
[0.11.0]: https://github.com/cashapp/molecule/releases/tag/0.11.0
Expand Down
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'app.cash.molecule:molecule-gradle-plugin:1.1.0'
classpath 'app.cash.molecule:molecule-gradle-plugin:1.2.0'
}
}
Expand All @@ -183,7 +183,7 @@ certain versions of Kotlin.

| Kotlin | Molecule |
|--------|----------------|
| 1.9.0 | 1.1.0 |
| 1.9.0 | 1.1.0 - 1.2.0 |
| 1.8.22 | 0.11.0 - 1.0.0 |
| 1.8.21 | 0.10.0 |
| 1.8.20 | 0.9.0 |
Expand All @@ -208,7 +208,7 @@ buildscript {
}
}
dependencies {
classpath 'app.cash.molecule:molecule-gradle-plugin:1.2.0-SNAPSHOT'
classpath 'app.cash.molecule:molecule-gradle-plugin:1.3.0-SNAPSHOT'
}
}
Expand Down Expand Up @@ -270,6 +270,27 @@ android {
}
```

### Custom Compose Compiler

Each version of Molecule 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
molecule {
kotlinCompilerPlugin.set("1.4.8")
}
```

To use an alternate Compose compiler dependency:
```kotlin
molecule {
kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
}
```


## License

Copyright 2021 Square, Inc.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GROUP=app.cash.molecule

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

SONATYPE_AUTOMATIC_RELEASE=true
SONATYPE_HOST=DEFAULT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ interface MoleculeExtension {
*
* Example: using a custom version of the JetBrains Compose compiler
* ```kotlin
* redwood {
* molecule {
* kotlinCompilerPlugin.set("1.4.8")
* }
* ```
*
* Example: using a custom Maven coordinate for the Compose compiler
* ```kotlin
* redwood {
* molecule {
* kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
* }
* ```
Expand Down

0 comments on commit d869773

Please sign in to comment.