Skip to content

Commit

Permalink
Updating Package to Kotlin 2.1 + Fixing Copy Issue in Tarka Icons (#259)
Browse files Browse the repository at this point in the history
* Updating Kotlin version.

* Updating Compose version.

* Added needed visibility annotation to prevent error.

* Updating the fluent system icons

* Updating gradle version

* Updating the version of tarka icons

* Fixing the class by removing uneeded modifier of data.

* Updating the deps versions.

* Using new TarkaIcon with custom icon.

* Making the constructor public and using data class again.

* Updating the versions.
  • Loading branch information
Younes-Charfaoui authored Dec 16, 2024
1 parent 75eead3 commit 8a75f01
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 25 deletions.
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.

4 changes: 4 additions & 0 deletions .idea/runConfigurations.xml

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

10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ buildscript {
}

plugins {
id("com.android.application") version "8.7.1" apply false
id("com.android.library") version "8.7.1" apply false
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
id("com.vanniktech.maven.publish") version "0.27.0"
id("com.android.application") version "8.7.3" apply false
id("com.android.library") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("com.vanniktech.maven.publish") version "0.28.0"
id("org.jetbrains.dokka") version "1.9.20" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" apply false
}

subprojects {
Expand Down
15 changes: 11 additions & 4 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ android {
}

dependencies {
implementation(project(":tarka-ui"))
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation("com.tarkalabs:tarkaui-icons:1.0.5")
implementation("com.microsoft.design:fluent-system-icons:1.1.261@aar")
// Using the local tarka ui
//implementation(project(":tarka-ui"))
//implementation(project(":tarka-ui-icons"))

// Using the real package of tarka ui
implementation("com.tarkalabs:tarkaui:1.2.21")
implementation("com.tarkalabs:tarkaui-icons:1.0.10")

implementation(platform("androidx.compose:compose-bom:2024.11.00"))
implementation("com.microsoft.design:fluent-system-icons:1.1.266@aar")
implementation("androidx.core:core-ktx:1.10.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.7.1")
Expand All @@ -55,6 +61,7 @@ dependencies {
implementation ("androidx.compose.material3:material3:1.2.0")

testImplementation("junit:junit:4.13.2")
androidTestImplementation(platform("androidx.compose:compose-bom:2024.11.00"))
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("org.mockito.kotlin:mockito-kotlin:4.0.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.tarkalabs.tarkaui.components.TUIAppTopBar
import com.tarkalabs.tarkaui.components.TUISearchBar
import com.tarkalabs.tarkaui.icons.BarcodeScanner24
import com.tarkalabs.tarkaui.icons.ChevronRight20
import com.tarkalabs.tarkaui.icons.Dismiss16
import com.tarkalabs.tarkaui.icons.TarkaIcon
import com.tarkalabs.tarkaui.icons.TarkaIcons.Filled
import com.tarkalabs.tarkaui.icons.TarkaIcons.Regular
import com.tarkalabs.tarkaui.theme.TUITheme
Expand All @@ -47,7 +49,11 @@ class UIComponentListActivity : ComponentActivity() {
navigationIcon = Regular.ChevronRight20,
menuItemIconOne = Regular.ChevronRight20,
menuItemIconTwo = Regular.ChevronRight20,
menuItemIconThree = Regular.ChevronRight20,
menuItemIconThree = TarkaIcon(
iconRes = R.drawable.ic_refresh,
contentDescription = "Refresh",
tintColor = Color.Red
),
)
}) { paddingValues ->
Column(
Expand Down
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 @@
#Thu Apr 06 13:09:30 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
6 changes: 3 additions & 3 deletions tarka-ui-icons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ publishing {
register<MavenPublication>("gpr") {
groupId = "com.tarkalabs"
artifactId = "tarkaui-icons"
version = "1.0.6"
version = "1.0.10"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-icons-release.aar")
}
}
Expand All @@ -74,10 +74,10 @@ publishing {
dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation(platform("androidx.compose:compose-bom:2024.11.00"))
implementation("androidx.compose.runtime:runtime")
implementation("androidx.compose.ui:ui")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")
api("com.microsoft.design:fluent-system-icons:1.1.266@aar")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import androidx.compose.runtime.Immutable
import androidx.compose.ui.graphics.Color

@Immutable
data class TarkaIcon internal constructor(
data class TarkaIcon public constructor(
@DrawableRes val iconRes: Int,
val contentDescription: String,
val tintColor: Color? = null,
){
fun copy(contentDescription: String): TarkaIcon {
return TarkaIcon(this.iconRes, contentDescription)
}
val tintColor: Color? = null
) {

override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand Down
13 changes: 9 additions & 4 deletions tarka-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,32 @@ publishing {
create<MavenPublication>("gpr") {
groupId = "com.tarkalabs"
artifactId = "tarkaui"
version = "1.2.0"
version = "1.2.21"
artifact("${layout.buildDirectory.get()}/outputs/aar/tarka-ui-release.aar")
}
}
}

dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation(platform("androidx.compose:compose-bom:2024.10.00"))
implementation(platform("androidx.compose:compose-bom:2024.11.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.compose.foundation:foundation")
api("com.tarkalabs:tarkaui-icons:1.0.6")
// Using the local tarka icons
//api(project(":tarka-ui-icons"))

// Using the real package tarka icons
api("com.tarkalabs:tarkaui-icons:1.0.10")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.8")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("org.mockito.kotlin:mockito-kotlin:4.0.0")
api("com.microsoft.design:fluent-system-icons:1.1.261@aar")
api("com.microsoft.design:fluent-system-icons:1.1.266@aar")

androidTestImplementation(platform("androidx.compose:compose-bom:2024.11.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
androidTestImplementation("org.mockito:mockito-android:4.5.1")
debugImplementation("androidx.compose.ui:ui-test-manifest")
Expand Down

0 comments on commit 8a75f01

Please sign in to comment.