[go: nahoru, domu]

Adding some convenience API for ConstraintLayout

It's now possible to apply the same constraints to multiple references
at a time.

Within a ConstraintSet users can also create multiple references and
assign them using destructuring declarations. Since this can be an error
prone pattern, added a lint check to verify that given parameters match
the assigned variables.

Relnote: "Apply constraints to multiple elements with `constrain(box,
button, text)`.
In Constraintsets, it's now possible to create multiple references: `val (box, text, button) = createRefsFor(\"box\", \"text\",\"button\")`. Within a ConstrainScope, you may now intuitively set a fixed dimension with Dp.asDimension: `width = 10.dp.asDimension`. "

Bug: 257158748
Test: ConstraintLayoutTest, ConstraintSetScopeDetectorTest
Change-Id: Ia0960697ea260a26cba3323b43bdeeea549ba6cd
diff --git a/settings.gradle b/settings.gradle
index cf57a94..0c566cf 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -579,6 +579,7 @@
 includeProject(":concurrent:concurrent-futures", [BuildType.MAIN, BuildType.CAMERA, BuildType.COMPOSE])
 includeProject(":concurrent:concurrent-futures-ktx", [BuildType.MAIN, BuildType.CAMERA])
 includeProject(":constraintlayout:constraintlayout-compose", [BuildType.COMPOSE])
+includeProject(":constraintlayout:constraintlayout-compose-lint", [BuildType.COMPOSE])
 includeProject(":constraintlayout:constraintlayout-compose:integration-tests:constraintlayout-compose-demos", [BuildType.COMPOSE])
 includeProject(":constraintlayout:constraintlayout-compose:integration-tests:macrobenchmark", [BuildType.COMPOSE])
 includeProject(":constraintlayout:constraintlayout-compose:integration-tests:macrobenchmark-target", [BuildType.COMPOSE])