0.12.0
New:
- Upgrade to Kotlin 2.0!
- Added a basic DOM-based
LazyList
implementation. TreehouseApp.close()
stops the app and prevents it from being started again later.- Added
UiConfiguration.layoutDirection
to support reading the host's layout direction. - New
redwood-bom
artifact can be used to ensure all Redwood artifacts use the same version. See Gradle's documentation on how to use the BOM in your build.
Changed:
- The
app.cash.redwood
Gradle plugin has been removed. This plugin did two things: apply the Compose compiler and add a dependency on theredwood-compose
artifact. The Compose compiler can now be added by applying theorg.jetbrains.kotlin.plugin.compose
Gradle plugin. Dependencies on Redwood artifacts can be added manually. - Removed deprecated
typealias
es for generated-WidgetFactories
type which was renamed to-WidgetSystem
in 0.10.0. - Removed deprecated
Modifier.flex
extension function which is now supported natively byRow
andColumn
since 0.8.0. - Removed deprecated
TreehouseWidgetView
andTreehouseUIKitView
type aliases forTreehouseLayout
andTreehouseUIView
which were renamed in 0.7.0. - Removed deprecated
TreehouseAppFactory
functions with the oldFileSystem
andPath
order which were changed in 0.11.0. - Rename the two types named
ProtocolBridge
toProtocolHost
andProtocolGuest
.
Fixed:
- Fix memory leaks caused by reference cycles on iOS. We got into trouble mixing garbage-collected Kotlin objects with reference-counted Swift objects.
Breaking:
TreehouseApp.zipline
is now aStateFlow<Zipline?>
instead of aZipline?
.CodeListener.onCodeDetached()
replacesonUncaughtException()
. The new function is called
whenever code stops driving a view for any reason. The new function accepts aThrowable?
that is
non-null if it's detached due to exception.Content.awaitContent()
now accepts an optionalInt
parameter for the number of updates to
observe before the function returns.- MacOS targets have been (temporarily) removed from all modules.
Upgraded:
- Kotlin 2.0.0
- Zipline 1.13.0
- kotlinx.serialization 1.7.0
Gradle plugin removed
This version of Redwood removes the custom Gradle plugin in favor of the official JetBrains Compose compiler plugin which ships as part of Kotlin itself.
Each module in which you had previously applied the app.cash.redwood
plugin should be changed to apply org.jetbrains.kotlin.plugin.compose
instead.
The Redwood dependencies will no longer be added as a result of the plugin change, and so any module which references Redwoods APIs should add those dependencies explicitly.
For posterity, the Kotlin version compatibility table and compiler version customization for our old Redwood Gradle plugin will be archived here:
Redwood 0.12.0 Gradle plugin Kotlin compatibility table
Since Kotlin compiler plugins are an unstable API, certain versions of Redwood only work with
certain versions of Kotlin.
Kotlin | Redwood |
---|---|
1.9.24 | 0.11.0 |
1.9.23 | 0.10.0 |
1.9.22 | 0.8.0 - 0.9.0 |
1.9.10 | 0.7.0 |
1.9.0 | 0.6.0 |
1.8.22 | 0.5.0 |
1.8.20 | 0.3.0 - 0.4.0 |
1.7.20 | 0.1.0 - 0.2.1 |
Redwood 0.12.0 Gradle plugin Compose compiler customization instructions
Each version of Redwood ships with a specific JetBrains Compose compiler version which works with
a single version of Kotlin (see version table 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:
redwood {
kotlinCompilerPlugin.set("1.4.8")
}
To use an alternate Compose compiler dependency:
redwood {
kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
}