Repository navigation
v2.1.0
2.1.0 tightens and extends the conventions in the architecture artifact. mvi and navigation are unchanged.
dependencies {
implementation("com.github.kaleidot725.PulseDesktop:mvi:v2.1.0")
implementation("com.github.kaleidot725.PulseDesktop:navigation:v2.1.0")
testImplementation("com.github.kaleidot725.PulseDesktop:architecture:v2.1.0")
}Changed checks
| Check | 2.1.0 |
|---|---|
assertMessagesAreSealedOrDataTypes |
A message is a sealed class whose cases are data class / data object, or a single data class / data object. Interfaces, including sealed interfaces, are reported |
assertSharedUiDependsOnlyOnTheDomain |
core/ui may also use the design system |
assertDomainIsFrameworkFree |
Matches only jp.kaleidot725.pulse.mvi / .navigation / .architecture, so an app whose own packages start with jp.kaleidot725.pulse is no longer flagged |
New checks
| Assertion | Checks |
|---|---|
assertStatesAndMessagesLiveInTheStatePackage |
states and messages live in a state package (part of assertPulseMviConventions) |
assertUseCasesLiveInTheUseCasePackage |
a …UseCase lives in a usecase package (part of assertPulseDomainConventions) |
assertUseCasesDoMoreThanOneLine |
no public function of a use case is a single line; a ViewModel may call the repository directly (part of assertPulseDomainConventions) |
assertDomainIsSplitIntoItsPackages |
the domain is split into model / repository / usecase (part of assertPulseModuleConventions) |
assertDataIsSplitIntoItsPackages |
data is split into repository / local (a data source that only persists) / model (part of assertPulseModuleConventions) |
assertDesignSystemDependsOnNothing |
core/designsystem depends on nothing but support modules, not even the domain (part of assertPulseModuleConventions) |
assertPulseResourceConventions |
new group: the domain holds no text, and composables read their text with stringResource |
Migrating from 2.0.0
PulseModuleLayoutgets adesignSystemlayer (defaultcore/designsystem), andsharedUinow defaults tocore/uionly. A layout passed with named arguments keeps compiling- The aggregate assertions run the new checks, so an app may need to move its message types to sealed classes, arrange its packages, and move its text into
composeResources
See Architecture checks for the details.