Skip to content

Commit

Permalink
breaking: fix for kotlin and gradle versions and fixes in GaYaChip
Browse files Browse the repository at this point in the history
  • Loading branch information
hayna-foursys committed Oct 2, 2024
1 parent 9ea157c commit 739b6d6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
apply from: 'jacoco/project.gradle'

buildscript {
ext.kotlin_version = '1.6.21'
ext.android_tools_gradle = '7.4.2'
ext.kotlin_version = '1.7.10'
ext.android_tools_gradle = '8.0.0'
ext.screen_shot_plugin = '0.14.0'
ext.dokka_version_plugin = '1.5.31'
ext.dokka_version_plugin = '1.7.0'
ext.lintVersion = '27.2.1'

repositories {
Expand Down Expand Up @@ -55,8 +55,8 @@ ext {
// Sdk and tools
minSdkVersion = 21
targetSdkVersion = 34
compileSdkVersion = 31
buildToolsVersion = '30.0.3'
compileSdkVersion = 34
buildToolsVersion = '34.0.0'

// App dependencies
constraintLayout = '2.1.2'
Expand All @@ -74,5 +74,5 @@ ext {
mockKVersion = '1.10.0'
coreKTXVersion = '1.3.0'
coilVersion = "1.3.2"
composeVersion = "1.0.0"
composeVersion = "1.3.0"
}
22 changes: 14 additions & 8 deletions designsystem/src/main/kotlin/com/natura/android/chip/GaYaChip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,58 +45,60 @@ class GaYaChip : ConstraintLayout {
private lateinit var typedArray: TypedArray

var label: String = ""
@JvmName("internalSetLabel")
set(value) {
field = value
setContentLabel(value)
configureAppearance(getDrawable())
}

var size: Int = SEMI
@JvmName("internalSetSize")
set(value) {
field = value
configureSize(getDrawable())
configureAppearance(getDrawable())
}

var isSelected: Boolean = false
set(value) {
field = value
configureAppearance(getDrawable())
}

var isComponentEnabled: Boolean = true

var color: Int = PRIMARY
@JvmName("internalSetColor")
set(value) {
field = value
configureAppearance(getDrawable())
}

var helperRightType: Int = NONE_TYPE
@JvmName("internalSetHelperRightType")
set(value) {
field = value
configureHelpers()
}

var helperLeftType: Int = NONE_TYPE
@JvmName("internalSetHelperLeftType")
set(value) {
field = value
configureHelpers()
}

var helperLeft: Int = RESOURCE_NOT_DEFINED
@JvmName("internalSetHelperLeft")
set(value) {
field = value
configureHelpers()
}

var helperRight: Int = RESOURCE_NOT_DEFINED
@JvmName("internalSetHelperRight")
set(value) {
field = value
configureHelpers()
}

var hasAction: Boolean = false
@JvmName("internalSetHasAction")
set(value) {
field = value
configureAction()
Expand Down Expand Up @@ -126,8 +128,7 @@ class GaYaChip : ConstraintLayout {

mainContainer.setOnClickListener {
if (!hasAction) {
isSelected = !isSelected
configureAppearance(getDrawable())
toggleSelection()
}
}

Expand All @@ -146,6 +147,11 @@ class GaYaChip : ConstraintLayout {
super.setEnabled(enabled)
}

private fun toggleSelection() {
isSelected = !isSelected
configureAppearance(getDrawable())
}

fun setSize(size: Int) {
this.size = size
configureSize(getDrawable())
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand All @@ -19,3 +19,7 @@ android.useAndroidX=true
android.enableJetifier=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
org.gradle.java.home=/usr/local/opt/openjdk@17
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Dec 22 10:26:50 BRT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
5 changes: 3 additions & 2 deletions jacoco/modules.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ project.afterEvaluate {
description = "Generate Jacoco coverage reports for the debug build."

reports {
html.enabled = true
xml.enabled = true
xml.required.set(false)
csv.required.set(false)
html.required.set(true)
}

def excludes = [
Expand Down
5 changes: 3 additions & 2 deletions jacoco/project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ project.afterEvaluate {
description = "Generate overall Jacoco coverage report for the debug build."

reports {
html.enabled = true
xml.enabled = true
xml.required.set(false)
csv.required.set(false)
html.required.set(true)
}

def excludes = [
Expand Down

0 comments on commit 739b6d6

Please sign in to comment.