<commit_before># ConstraintLayout 🗜️📏

![core](https://github.com/androidx/constraintlayout/workflows/core/badge.svg) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)

<img src="https://img.shields.io/badge/stable-2.1.3-blue"/><img src="https://img.shields.io/badge/compose-1.0.0-blue"/> 


ConstraintLayout is a layout manager for Android which allows you to position and size widgets in a flexible way. It's available for both the Android view system and Jetpack Compose.

This repository contains the core Java engine, Android library, validation tools, and experiments.

[Android Reference Docs](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout)

[Reference Docs for Compose](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/package-summary)

Have a question that isn't answered here? Try StackOverflow for [ConstraintLayout](https://stackoverflow.com/questions/tagged/android-constraintlayout) or [MotionLayout](https://stackoverflow.com/questions/tagged/android-motionlayout).

## Using ConstraintLayout

### ⬇️ Installation

Add the Gradle dependency:

You need to make sure you have the Google repository included in the `build.gradle` file in the root of your project:

```gradle
repositories {
    google()
}
```

Next add a dependency in the `build.gradle` file of your Gradle module.

If using ConstraintLayout with the Android View system, add:

```gradle
dependencies {

    implementation("androidx.constraintlayout:constraintlayout:2.1.3")

}
```

If using ConstraintLayout with Jetpack Compose, add:

```gradle
dependencies {

    implementation("androidx.constraintlayout:constraintlayout-compose:1.0.0")

}
```

Additionally, for MotionLayout with Jetpack Compose, you require to opt-in to ExprimentalMotionApi:
```gradle
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        // For Kotlin 1.6.0+
        freeCompilerArgs += "-opt-in=androidx.constraintlayout.compose.ExperimentalMotionApi"
        
        // For older than Kotlin 1.6.0
        freeCompilerArgs += "-Xopt-in=androidx.constraintlayout.compose.ExperimentalMotionApi"
    }
}

```

### 🎒🥾 Requirements

- AndroidX (Your `gradle.properties` **must** include `android.useAndroidX=true`)
- Min SDK 14+
- Java 8+

### ✨🤩📱 Key Features

Hello World
<commit_msg>Update Readme with new stable versions<commit_after># ConstraintLayout 🗜️📏

![core](https://github.com/androidx/constraintlayout/workflows/core/badge.svg) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)

<img src="https://img.shields.io/badge/stable-2.1.4-blue"/><img src="https://img.shields.io/badge/compose-1.0.1-blue"/> 


ConstraintLayout is a layout manager for Android which allows you to position and size widgets in a flexible way. It's available for both the Android view system and Jetpack Compose.

This repository contains the core Java engine, Android library, validation tools, and experiments.

[Android Reference Docs](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout)

[Reference Docs for Compose](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/package-summary)

Have a question that isn't answered here? Try StackOverflow for [ConstraintLayout](https://stackoverflow.com/questions/tagged/android-constraintlayout) or [MotionLayout](https://stackoverflow.com/questions/tagged/android-motionlayout).

## Using ConstraintLayout

### ⬇️ Installation

Add the Gradle dependency:

You need to make sure you have the Google repository included in the `build.gradle` file in the root of your project:

```gradle
repositories {
    google()
}
```

Next add a dependency in the `build.gradle` file of your Gradle module.

If using ConstraintLayout with the Android View system, add:

```gradle
dependencies {

    implementation("androidx.constraintlayout:constraintlayout:2.1.4")

}
```

If using ConstraintLayout with Jetpack Compose, add:

```gradle
dependencies {

    implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")

}
```

Additionally, for MotionLayout with Jetpack Compose, you require to opt-in to ExprimentalMotionApi:
```gradle
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        // For Kotlin 1.6.0+
        freeCompilerArgs += "-opt-in=androidx.constraintlayout.compose.ExperimentalMotionApi"
        
        // For older than Kotlin 1.6.0
        freeCompilerArgs += "-Xopt-in=androidx.constraintlayout.compose.ExperimentalMotionApi"
    }
}

```

### 🎒🥾 Requirements

- AndroidX (Your `gradle.properties` **must** include `android.useAndroidX=true`)
- Min SDK 14+
- Java 8+

### ✨🤩📱 Key Features

Hello World

{'fraction_non_alphanumeric': 0.120686175580222, 'fraction_numerical': 0.01170534813319879, 'mean_word_length': 4.776223776223776, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 18, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1230269', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1472, 'n_words': 371}