Skip to content

Commit

Permalink
Add snippet for Compose apps in the CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed Jul 6, 2023
1 parent 1d673ec commit 8c4a699
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,35 @@ dependencies {
}
```

```kts
// Add Jetpack Compose to a project in seconds with refreshVersions.
// NEW: The Compose BoM released on Android Dev Summit is supported!

// No need to search for the versions, refreshVersions will do it for you!
// It will add the latest most stable version, and will even add the updates
// as comments in the versions.properties file (auto-created on first use).

android {
buildFeatures.compose = true
composeOptions {
// Version and updates are in versions.properties
kotlinCompilerExtensionVersion = versionFor(AndroidX.compose.compiler)
}
}

dependencies {
// Version and updates of the BoM are in versions.properties too.
implementation(platform(AndroidX.compose.bom)) // Enables the BoM automatically
implementation(AndroidX.compose.runtime) // Version from the BoM
implementation(AndroidX.compose.icons.extended) // Version from the BoM

// What if you need a specific alpha/beta/rc version?
// withVersionPlaceholder() detaches the dependency from the BoM.
// Version and updates will therefore be in versions.properties
implementation(AndroidX.compose.material3.withVersionPlaceholder()) // Not from BoM
}
```

### Fix StabilityLevel calculation for number-less pre-versions

Since last changes in the Version class, versions like 1.7.20-RC and 1.7.20-Beta would be marked as stable instead of respectively ReleaseCandidate and Beta because the logic expected a number in all cases.
Expand Down

0 comments on commit 8c4a699

Please sign in to comment.