Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(progressbars): add rounded corner to progress bars #157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions appbars/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
api(project(":menus"))
implementation(AndroidX.compose.ui.tooling)
}

android {
namespace = "com.decathlon.vitamin.compose.appbars"
}
2 changes: 0 additions & 2 deletions appbars/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions badges/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ dependencies {
api(project(":foundation:foundation"))
implementation(AndroidX.compose.ui.tooling)
}

android {
namespace = "com.decathlon.vitamin.compose.badges"
}
2 changes: 0 additions & 2 deletions badges/src/main/AndroidManifest.xml

This file was deleted.

8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ sonarqube {
conventionalCommits {
scopes = subprojects.map { module -> module.name }.toList()
failureMessage = "Error : The commit message does not meet the Conventional Commit standard\n" +
"An example of a valid message is:\n" +
"feat(buttons): add the small size button\n" +
"Available scopes : ${scopes}\n" +
"More details at: https://www.conventionalcommits.org/en/v1.0.0/#summary"
"An example of a valid message is:\n" +
"feat(buttons): add the small size button\n" +
"Available scopes : ${scopes}\n" +
"More details at: https://www.conventionalcommits.org/en/v1.0.0/#summary"
}

tasks.create<Delete>("clean") {
Expand Down
19 changes: 14 additions & 5 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.4.31"
kotlin("jvm") version "1.8.21"
`kotlin-dsl`
}

Expand All @@ -11,7 +11,16 @@ repositories {
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.apiVersion = "1.6"
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
apiVersion = "1.6"
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

gradlePlugin {
Expand All @@ -23,9 +32,9 @@ gradlePlugin {

dependencies {
implementation(gradleApi())
implementation("com.android.tools.build:gradle:7.4.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
implementation("com.android.tools.build:gradle:8.0.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
implementation("app.cash.licensee:licensee-gradle-plugin:1.4.1")
implementation("app.cash.paparazzi:paparazzi-gradle-plugin:1.2.0")
implementation("app.cash.paparazzi:paparazzi-gradle-plugin:1.3.0")
}
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ object Libs {
const val vitamin_assets = "com.decathlon.vitamin:foundation-assets:_"

const val compose_ui = "androidx.compose.ui:ui:_"
const val compose_compiler = "androidx.compose.compiler:compiler:_"

const val compose_ui_util = "androidx.compose.ui:ui-util:_"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.android.build.api.dsl.LibraryExtension
import org.gradle.api.JavaVersion
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
Expand All @@ -17,7 +18,6 @@ class VitaminComposeLibraryPlugin : Plugin<Project> {
target.apply(plugin = "app.cash.licensee")
target.configure<app.cash.licensee.LicenseeExtension> {
allow("Apache-2.0")
allow("MIT")
}
target.repositories {
google()
Expand Down Expand Up @@ -52,29 +52,29 @@ internal fun Project.configureAndroid() = this.extensions.getByType(LibraryExten
useSupportLibrary = true
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
composeOptions {
kotlinCompilerExtensionVersion = Libs.compose_ui.split(":").last()
kotlinCompilerExtensionVersion = Libs.compose_compiler.split(":").last()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
allWarningsAsErrors = true
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn"
"-opt-in=kotlin.RequiresOptIn",
)
}
}

buildFeatures {
compose = true
}

packagingOptions {
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
Expand Down
4 changes: 4 additions & 0 deletions buttons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.buttons"
}
2 changes: 0 additions & 2 deletions buttons/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions cards/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.cards"
}
2 changes: 0 additions & 2 deletions cards/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions checkboxes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ dependencies {
api(project(":foundation:foundation"))
implementation(AndroidX.compose.ui.tooling)
}

android {
namespace = "com.decathlon.vitamin.compose.checkboxes"
}
5 changes: 0 additions & 5 deletions checkboxes/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions chips/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ dependencies {
testImplementation(project(":foundation:foundation-assets"))
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.chips"
}
2 changes: 0 additions & 2 deletions chips/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions dividers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.dividers"
}
2 changes: 0 additions & 2 deletions dividers/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions fabs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.fabs"
}
2 changes: 0 additions & 2 deletions fabs/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions foundation/foundation-assets/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ dependencies {
api(AndroidX.compose.ui)
api(AndroidX.compose.material)
}

android {
namespace = "com.decathlon.vitamin.compose.vitaminassets"
}
2 changes: 0 additions & 2 deletions foundation/foundation-assets/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions foundation/foundation-icons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ dependencies {
api(AndroidX.compose.ui)
api(AndroidX.compose.material)
}

android {
namespace = "com.decathlon.vitamin.compose.vitaminicons"
}
2 changes: 0 additions & 2 deletions foundation/foundation-icons/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions foundation/foundation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ dependencies {
api(AndroidX.compose.ui)
api(AndroidX.compose.material)
}

android {
namespace = "com.decathlon.vitamin.compose.foundation"
}
2 changes: 0 additions & 2 deletions foundation/foundation/src/main/AndroidManifest.xml

This file was deleted.

19 changes: 18 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ org.gradle.daemon=true
org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g

android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":

# buildconfig is not generated at build by default since AGP 8.0 for all project.
# Next step: add this into gradle module that needs the BuildConfig file.
# https://developer.android.com/build/releases/gradle-plugin#default-changes
# https://medium.com/androiddevelopers/5-ways-to-prepare-your-app-build-for-android-studio-flamingo-release-da34616bb946
android.defaults.buildfeatures.buildconfig=true
# nonTransitiveRClass is at true by default since AGP 8.0.
# Next step: Run the migration assistant from Android studio to migrate to Non-Transitive R Classes.
# https://developer.android.com/build/releases/gradle-plugin#default-changes
# https://medium.com/androiddevelopers/5-ways-to-prepare-your-app-build-for-android-studio-flamingo-release-da34616bb946
android.nonTransitiveRClass=false
# AGP 8.0 generates R classes with non-final fields by default.
# Next step: Move to non-final fields.
# https://developer.android.com/build/releases/gradle-plugin#default-changes
android.nonFinalResIds=false

kotlin.incremental=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 20 17:22:46 CET 2023
#Fri Jun 16 16:03:05 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions menus/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ dependencies {
api(project(":foundation:foundation"))
implementation(AndroidX.compose.ui.tooling)
}

android {
namespace = "com.decathlon.vitamin.compose.menus"
}
2 changes: 0 additions & 2 deletions menus/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions modals/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ dependencies {
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
testImplementation(project(":foundation:foundation-icons"))
}

android {
namespace = "com.decathlon.vitamin.compose.modals"
}
2 changes: 0 additions & 2 deletions modals/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions prices/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.prices"
}
2 changes: 0 additions & 2 deletions prices/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions progressbars/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.progressbars"
}
2 changes: 0 additions & 2 deletions progressbars/src/main/AndroidManifest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
Expand Down Expand Up @@ -67,7 +68,8 @@ object VitaminProgressBars {
progress = progress,
modifier = Modifier.vitaminLinearProgressModifier(sizes.strokeSize),
color = colors.progressColor,
backgroundColor = colors.backgroundColor
backgroundColor = colors.backgroundColor,
strokeCap = StrokeCap.Round
)
}
}
Expand Down Expand Up @@ -100,7 +102,8 @@ object VitaminProgressBars {
LinearProgressIndicator(
modifier = Modifier.vitaminLinearProgressModifier(sizes.strokeSize),
color = colors.progressColor,
backgroundColor = colors.backgroundColor
backgroundColor = colors.backgroundColor,
strokeCap = StrokeCap.Round
)
}
}
Expand Down Expand Up @@ -140,7 +143,8 @@ object VitaminProgressBars {
.align(Alignment.Center)
.size(sizes.boxSize),
color = colors.progressColor,
strokeWidth = sizes.strokeSize
strokeWidth = sizes.strokeSize,
strokeCap = StrokeCap.Round
)
}
}
Expand Down Expand Up @@ -176,7 +180,8 @@ object VitaminProgressBars {
.align(Alignment.Center)
.size(sizes.boxSize),
color = colors.progressColor,
strokeWidth = sizes.strokeSize
strokeWidth = sizes.strokeSize,
strokeCap = StrokeCap.Round
)
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions quantity-pickers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.quantity.pickers"
}
2 changes: 0 additions & 2 deletions quantity-pickers/src/main/AndroidManifest.xml

This file was deleted.

4 changes: 4 additions & 0 deletions radiobuttons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dependencies {
implementation(AndroidX.compose.ui.tooling)
testImplementation("com.google.testparameterinjector:test-parameter-injector:1.8")
}

android {
namespace = "com.decathlon.vitamin.compose.radiobuttons"
}
Loading