Skip to content

Commit

Permalink
Merge pull request #6 from stoyan-vuchev/1.0.6/updated-dependencies-a…
Browse files Browse the repository at this point in the history
…nd-readme

Updated dependencies and README.md
  • Loading branch information
stoyan-vuchev authored Nov 19, 2023
2 parents 5930fc1 + 8386adc commit 5474c64
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 14 additions & 4 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 41 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Squircle Shape [![](https://jitpack.io/v/stoyan-vuchev/squircle-shape.svg)](https://jitpack.io/#stoyan-vuchev/squircle-shape)
# Squircle Shape

[![](https://jitpack.io/v/stoyan-vuchev/squircle-shape.svg)](https://jitpack.io/#stoyan-vuchev/squircle-shape)
[![API](https://img.shields.io/badge/API-23%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=23)
<a href="https://github.com/stoyan-vuchev/squircle-shape/commits/master"><img src="https://img.shields.io/github/last-commit/stoyan-vuchev/squircle-shape.svg?style=flat&logo=github&logoColor=white" alt="GitHub last commit"></a>
<a href="https://github.com/stoyan-vuchev/squircle-shape/issues"><img src="https://img.shields.io/github/issues-raw/stoyan-vuchev/squircle-shape.svg?style=flat&logo=github&logoColor=white" alt="GitHub issues"></a>
<a href="https://jetc.dev/issues/168.html"><img src="https://img.shields.io/badge/As_Seen_In-jetc.dev_Newsletter_Issue_%23168-blue?logo=Jetpack+Compose&amp;logoColor=white" alt="As Seen In - jetc.dev Newsletter Issue #168"></a>

> An Android Jetpack Compose library providing customizable Squircle shapes for UI components.
---

## Table of Contents

* [Why Squircle?](#why-squircle)
Expand All @@ -12,6 +20,8 @@
* [License](#license)
* [Contact](#contact)

---

## Why Squircle?

- The squircle is an intermediate shape between a square and a circle, present in digital and real
Expand All @@ -22,17 +32,24 @@
created, with the main goal being to provide an easy implementation of a squircle shape for UI
components built with Jetpack Compose.

---

## Requirements

- Project minSdk version - `23`
- Project compileSdk version - `34`
- Jetpack Compose version - `1.5.1`
- Jetpack Compose Compiler version - `1.5.3`
- Kotlin version - `1.9.10`
##### Base requirements:

- Project `minSdk` version - `23`
- Project `compileSdk` version - `34`

##### Version `1.0.x`:

- Jetpack Compose - `1.5.x`

---

## Gradle Kotlin DSL Setup

#### Step 1
##### Step 1

* Add the Jitpack maven repository in your `settings.gradle.kts` file.

Expand All @@ -42,7 +59,7 @@ repositories {
}
```

#### Step 2
##### Step 2

* Add the Squircle Shape dependency in your module `build.gradle.kts` file.
* Latest version: [![](https://jitpack.io/v/stoyan-vuchev/squircle-shape.svg)](https://jitpack.io/#stoyan-vuchev/squircle-shape)
Expand All @@ -51,7 +68,7 @@ repositories {
implementation("com.github.stoyan-vuchev:squircle-shape:<version>")
```

* Or if you're using a version catalog (e.g. `libs.versions.toml`), declare it there.
* Or if you're using a version catalog (e.g. `libs.versions.toml`), declare it in the catalog instead.

```toml
[versions]
Expand All @@ -69,9 +86,9 @@ implementation(libs.squircle.shape)

#### Step 3

* Sync and rebuild the project.
* Sync and rebuild the project. 🔄️🔨✅

<br/>
---

## Gradle Groovy Setup

Expand All @@ -90,17 +107,18 @@ allprojects {
#### Step 2

* Add the Squircle Shape dependency in your module `build.gradle` file.
* Latest version: [![](https://jitpack.io/v/stoyan-vuchev/squircle-shape.svg)](https://jitpack.io/#stoyan-vuchev/squircle-shape)
* Latest
version: [![](https://jitpack.io/v/stoyan-vuchev/squircle-shape.svg)](https://jitpack.io/#stoyan-vuchev/squircle-shape)

```groovy
implementation 'com.github.stoyan-vuchev:squircle-shape:<version>'
```

#### Step 3

* Sync and rebuild the project.
* Sync and rebuild the project. 🔄️🔨✅

<br/>
---

## Usage

Expand All @@ -111,7 +129,10 @@ implementation 'com.github.stoyan-vuchev:squircle-shape:<version>'
smoothness of the corners, the foundation of every squircle shape.


* Take a look at the [SquircleShape.kt](/squircle-shape/src/main/kotlin/sv/lib/squircleshape/SquircleShape.kt) and [CornerSmoothing.kt](/squircle-shape/src/main/kotlin/sv/lib/squircleshape/CornerSmoothing.kt) files for more information.
* Take a look at
the [SquircleShape.kt](/squircle-shape/src/main/kotlin/sv/lib/squircleshape/SquircleShape.kt)
and [CornerSmoothing.kt](/squircle-shape/src/main/kotlin/sv/lib/squircleshape/CornerSmoothing.kt)
files for more information.


* For a single percent based corner radius, use the variant of `SquircleShape()` with `precent: Int`
Expand Down Expand Up @@ -177,12 +198,16 @@ Image(
the [SquircleShapePath.kt](/squircle-shape/src/main/kotlin/sv/lib/squircleshape/SquircleShapePath.kt)
file.

<br/>
### Demo app coming soon! 📱✨

---

## License

This project is open source and available under the [MIT License](./LICENSE).

---

## Contact

Created by [@stoyan-vuchev](https://github.com/stoyan-vuchev/) - feel free to contact me! <br/>
Expand Down
3 changes: 0 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ dependencies {
implementation(libs.navigation.compose)
implementation(libs.material)

implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.ui.tooling.preview)
Expand All @@ -75,10 +74,8 @@ dependencies {
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.compose.ui.test.junit4)

debugImplementation(platform(libs.compose.bom))
debugImplementation(libs.compose.ui.tooling)
debugImplementation(libs.compose.ui.test.manifest)

Expand Down
36 changes: 17 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]

agp = "8.1.1"
kotlin = "1.9.10"
agp = "8.1.4"
kotlin = "1.9.20"

core-ktx = "1.12.0"
junit = "4.13.2"
Expand All @@ -14,14 +14,14 @@ lifecycle-runtime-ktx = "2.6.2"
lifecycle-runtime-compose = "2.6.2"
lifecycle-viewmodel-compose = "2.6.2"

activity-compose = "1.7.2"
navigation-compose = "2.7.2"
activity-compose = "1.8.0"
navigation-compose = "2.7.5"

compose-bom = "2023.09.00"
compose-version = "1.5.1"
compose-compiler-version = "1.5.3"
compose-compiler-version = "1.5.4"
compose-version = "1.5.4"
compose-m3-version = "1.1.2"

material = "1.9.0"
material = "1.10.0"

[libraries]

Expand All @@ -34,9 +34,6 @@ androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso-core" }

androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat-version" }
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "compose-version" }
androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "compose-version" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "compose-version" }

lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycle-runtime-compose" }
Expand All @@ -47,14 +44,15 @@ navigation-compose = { group = "androidx.navigation", name = "navigation-compose

material = { module = "com.google.android.material:material", version.ref = "material" }

compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
compose-ui = { group = "androidx.compose.ui", name = "ui" }
compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
compose-material3 = { group = "androidx.compose.material3", name = "material3" }
compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "compose-version" }
compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "compose-version" }
compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "compose-version" }
compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics", version.ref = "compose-version" }
compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "compose-version" }
compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "compose-version" }
compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "compose-version" }
compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "compose-version" }
compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "compose-m3-version" }

[plugins]

Expand Down
9 changes: 5 additions & 4 deletions squircle-shape/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ afterEvaluate {

groupId = "com.github.stoyan-vuchev"
artifactId = "squircle-shape"
version = "1.0.5"
version = "1.0.6"

afterEvaluate {
from(components["release"])
Expand All @@ -62,9 +62,10 @@ dependencies {

implementation(libs.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)

implementation(libs.compose.foundation)
implementation(libs.compose.runtime)
implementation(libs.compose.ui)

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
Expand Down

0 comments on commit 5474c64

Please sign in to comment.