From 7affe099a1b3c6e20d2bad7446b9b2f5d19362aa Mon Sep 17 00:00:00 2001 From: Deepak KK Date: Wed, 19 Jul 2023 10:47:46 +0530 Subject: [PATCH 1/6] Integrated publish task. --- build.gradle.kts | 3 ++ core/ui/build.gradle.kts | 95 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index feee4c0..3dfc871 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,9 @@ buildscript { mavenCentral() google() gradlePluginPortal() + maven { + url = uri("https://plugins.gradle.org/m2/") + } } dependencies { classpath(versionCatalogLibs.android.gradle.plugin) diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index d0d1744..7ebb5be 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -3,13 +3,108 @@ plugins { id("co.yml.ytag.library.compose") id("co.yml.ytag.library") id("co.yml.ytag.library.jacoco") + id("maven-publish") + id("signing") + id("org.jetbrains.dokka") } android { namespace = "co.yml.ytag.ui" + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } } dependencies { testImplementation(project(mapOf("path" to ":core:test"))) androidTestImplementation(project(mapOf("path" to ":core:test"))) } +val dokkaOutputDir = "$buildDir/dokka" + +tasks.dokkaHtml { + outputDirectory.set(file(dokkaOutputDir)) +} + +val deleteDokkaOutputDir by tasks.register("deleteDokkaOutputDirectory") { + delete(dokkaOutputDir) +} +val javadocJar = tasks.register("javadocJar") { + dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) + archiveClassifier.set("javadoc") + from(dokkaOutputDir) +} + +publishing { + repositories { + maven { + name = "YTag" + setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") + credentials { + username = project.findProperty("mavenCentralUsername")?.toString() ?: System.getenv("MAVEN_USERNAME") + password = project.findProperty("mavenCentralPassword")?.toString() ?: System.getenv("MAVEN_PASSWORD") + } + } + } + publications { + register("release") { + groupId = "co.yml" + artifactId = "ytag" + version = "1.0.0" + afterEvaluate { + println("Components:${components.names}") + from(components["productionRelease"]) + } + artifact(javadocJar) + pom { + name.set("YTag") + description.set("Y Tag is a UI element in Android (some times referred to as chips) which displays a piece of information. It consist of a leading icon(optional), Text and a trailing icon (optional).") + url.set("https://github.com/yml-org/YTag-android") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("sreekuttancj") + name.set("Sreekuttan C J") + url.set("https://github.com/sreekuttancj") + } + developer { + id.set("dkk009") + name.set("Deepak KK") + url.set("https://github.com/dkk009") + } + developer { + id.set("kikoso") + name.set("Enrique López Mañas") + url.set("https://github.com/kikoso") + } + } + scm { + url.set("https://github.com/yml-org/YTag-android") + connection.set("scm:git:git://github.com/yml-org/YTag-android.git") + developerConnection.set("scm:git:ssh://git@github.com:yml-org/YTag-android.git") + } + } + } + } +} + + +signing { + useInMemoryPgpKeys( + project.findProperty("signing.keyId")?.toString() ?: System.getenv("SIGNINGKEY"), + project.findProperty("signing.InMemoryKey")?.toString() ?: System.getenv("MEMORY_KEY"), + project.findProperty("signing.password")?.toString()?:System.getenv("SIGNINGPASSWORD") + ) + sign(publishing.publications) +} From 114c8d513bbb4f53d1ab6b1bab32d830b58f8b1a Mon Sep 17 00:00:00 2001 From: Deepak KK Date: Wed, 19 Jul 2023 10:54:15 +0530 Subject: [PATCH 2/6] Updated readme file. --- README.md | 2 +- feature/ytag/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1024b2c..f3ce295 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ It consist of a leading icon(optional), Text and a trailing icon (optional). - Built with Compose UI ## Usage - +implementation("co.yml:ytag:1.0.0") **Basic** diff --git a/feature/ytag/build.gradle.kts b/feature/ytag/build.gradle.kts index efee87d..9a3766b 100644 --- a/feature/ytag/build.gradle.kts +++ b/feature/ytag/build.gradle.kts @@ -25,7 +25,7 @@ android { dependencies { implementation(versionCatalogLibs.hilt.nav.compose) implementation(versionCatalogLibs.androidx.lifecycle.viewModelCompose) - implementation(project(mapOf("path" to ":core:ui"))) + implementation("co.yml:ytag:1.0.0") implementation(project(mapOf("path" to ":core:test"))) testImplementation(project(mapOf("path" to ":core:test"))) From a96665b2c3c7854b60be7260596c51859897656a Mon Sep 17 00:00:00 2001 From: Deepak KK Date: Thu, 20 Jul 2023 08:32:15 +0530 Subject: [PATCH 3/6] Updated git flow java version --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 740c2ee..d536a1e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: set up JDK 11 + - name: set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: gradle From 669b6de2f2c664c8e26080066157dae946ff1259 Mon Sep 17 00:00:00 2001 From: Deepak KK Date: Thu, 20 Jul 2023 09:00:14 +0530 Subject: [PATCH 4/6] Updated the application name. --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e39ffb1..c845f3e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,7 +9,7 @@ plugins { android { namespace = "co.yml.ytag" defaultConfig { - applicationId = "co.yml.ytag" + applicationId = "co.yml.ytag.app" versionCode = 1 versionName = "1.0" } From 1c1e466c1ede8818f180e7bdd6ea67b79116678b Mon Sep 17 00:00:00 2001 From: Deepak KK Date: Thu, 20 Jul 2023 09:40:57 +0530 Subject: [PATCH 5/6] Refactored the package name. --- app/build.gradle.kts | 2 +- .../java/co/yml/ytag/{ => app}/ApplicationTest.kt | 2 +- .../java/co/yml/ytag/{ => app}/MainActivityTest.kt | 4 ++-- .../java/co/yml/ytag/{ => app}/ui/MainNavigationKtTest.kt | 4 ++-- app/src/main/AndroidManifest.xml | 5 +++-- app/src/main/java/co/yml/ytag/{ => app}/MainActivity.kt | 4 ++-- app/src/main/java/co/yml/ytag/{ => app}/YTag.kt | 2 +- app/src/main/java/co/yml/ytag/{ => app}/ui/AppScreen.kt | 2 +- app/src/main/java/co/yml/ytag/{ => app}/ui/MainNavigation.kt | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) rename app/src/androidTest/java/co/yml/ytag/{ => app}/ApplicationTest.kt (96%) rename app/src/androidTest/java/co/yml/ytag/{ => app}/MainActivityTest.kt (97%) rename app/src/androidTest/java/co/yml/ytag/{ => app}/ui/MainNavigationKtTest.kt (92%) rename app/src/main/java/co/yml/ytag/{ => app}/MainActivity.kt (88%) rename app/src/main/java/co/yml/ytag/{ => app}/YTag.kt (86%) rename app/src/main/java/co/yml/ytag/{ => app}/ui/AppScreen.kt (95%) rename app/src/main/java/co/yml/ytag/{ => app}/ui/MainNavigation.kt (94%) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c845f3e..973e880 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } android { - namespace = "co.yml.ytag" + namespace = "co.yml.ytag.app" defaultConfig { applicationId = "co.yml.ytag.app" versionCode = 1 diff --git a/app/src/androidTest/java/co/yml/ytag/ApplicationTest.kt b/app/src/androidTest/java/co/yml/ytag/app/ApplicationTest.kt similarity index 96% rename from app/src/androidTest/java/co/yml/ytag/ApplicationTest.kt rename to app/src/androidTest/java/co/yml/ytag/app/ApplicationTest.kt index b0386ef..e09020c 100644 --- a/app/src/androidTest/java/co/yml/ytag/ApplicationTest.kt +++ b/app/src/androidTest/java/co/yml/ytag/app/ApplicationTest.kt @@ -1,4 +1,4 @@ -package co.yml.ytag +package co.yml.ytag.app import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry diff --git a/app/src/androidTest/java/co/yml/ytag/MainActivityTest.kt b/app/src/androidTest/java/co/yml/ytag/app/MainActivityTest.kt similarity index 97% rename from app/src/androidTest/java/co/yml/ytag/MainActivityTest.kt rename to app/src/androidTest/java/co/yml/ytag/app/MainActivityTest.kt index 54fc30c..5a59ffb 100644 --- a/app/src/androidTest/java/co/yml/ytag/MainActivityTest.kt +++ b/app/src/androidTest/java/co/yml/ytag/app/MainActivityTest.kt @@ -1,4 +1,4 @@ -package co.yml.ytag +package co.yml.ytag.app import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.lifecycle.Lifecycle @@ -38,7 +38,7 @@ class MainActivityTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - Assert.assertTrue(appContext.packageName.contains("co.yml.ytag")) + Assert.assertTrue(appContext.packageName.contains("co.yml.ytag.app")) } /** diff --git a/app/src/androidTest/java/co/yml/ytag/ui/MainNavigationKtTest.kt b/app/src/androidTest/java/co/yml/ytag/app/ui/MainNavigationKtTest.kt similarity index 92% rename from app/src/androidTest/java/co/yml/ytag/ui/MainNavigationKtTest.kt rename to app/src/androidTest/java/co/yml/ytag/app/ui/MainNavigationKtTest.kt index 6c0936b..f3b9371 100644 --- a/app/src/androidTest/java/co/yml/ytag/ui/MainNavigationKtTest.kt +++ b/app/src/androidTest/java/co/yml/ytag/app/ui/MainNavigationKtTest.kt @@ -1,9 +1,9 @@ -package co.yml.ytag.ui +package co.yml.ytag.app.ui import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.compose.ui.test.onNodeWithTag -import co.yml.ytag.MainActivity +import co.yml.ytag.app.MainActivity import dagger.hilt.android.testing.HiltAndroidRule import dagger.hilt.android.testing.HiltAndroidTest import org.junit.Rule diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cc409e9..6e38199 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,11 +1,12 @@ + xmlns:tools="http://schemas.android.com/tools" + package="co.yml.ytag.app"> Date: Thu, 20 Jul 2023 13:00:15 +0530 Subject: [PATCH 6/6] Code refactored. Fixed the package conflict. --- .../main/java/co/yml/ytag/app/ui/AppScreen.kt | 2 +- core/ui/build.gradle.kts | 21 ++++++------------- .../ui/ytag/TagViewContainerTesting.kt | 13 +++++++----- .../ytag/{ => core}/ui/ytag/TagViewTest.kt | 11 ++++++---- .../ytag/{ => core}/ui/templates/AppBar.kt | 6 +++--- .../ytag/{ => core}/ui/theme/AppDimensions.kt | 2 +- .../co/yml/ytag/{ => core}/ui/theme/Color.kt | 2 +- .../co/yml/ytag/{ => core}/ui/theme/Shape.kt | 2 +- .../co/yml/ytag/{ => core}/ui/theme/Theme.kt | 2 +- .../co/yml/ytag/{ => core}/ui/theme/Type.kt | 2 +- .../co/yml/ytag/{ => core}/ui/ytag/TagView.kt | 6 +++--- .../{ => core}/ui/ytag/TagViewContainer.kt | 10 ++++----- .../ytag/model/TagViewContainerModifiers.kt | 2 +- .../{ => core}/ui/ytag/model/TagViewData.kt | 2 +- .../ui/ytag/model/TagViewModifiers.kt | 2 +- .../yml/ytag/feature/ytag/ui/YTagCatalog.kt | 20 ++++++++++-------- gradlew | 0 17 files changed, 52 insertions(+), 53 deletions(-) rename core/ui/src/androidTest/java/co/yml/ytag/{ => core}/ui/ytag/TagViewContainerTesting.kt (89%) rename core/ui/src/androidTest/java/co/yml/ytag/{ => core}/ui/ytag/TagViewTest.kt (94%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/templates/AppBar.kt (96%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/theme/AppDimensions.kt (96%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/theme/Color.kt (97%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/theme/Shape.kt (92%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/theme/Theme.kt (97%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/theme/Type.kt (95%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/ytag/TagView.kt (98%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/ytag/TagViewContainer.kt (98%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/ytag/model/TagViewContainerModifiers.kt (99%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/ytag/model/TagViewData.kt (96%) rename core/ui/src/main/java/co/yml/ytag/{ => core}/ui/ytag/model/TagViewModifiers.kt (99%) mode change 100644 => 100755 gradlew diff --git a/app/src/main/java/co/yml/ytag/app/ui/AppScreen.kt b/app/src/main/java/co/yml/ytag/app/ui/AppScreen.kt index d284794..4037d29 100644 --- a/app/src/main/java/co/yml/ytag/app/ui/AppScreen.kt +++ b/app/src/main/java/co/yml/ytag/app/ui/AppScreen.kt @@ -5,7 +5,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import co.yml.ytag.ui.theme.YTagTheme +import co.yml.ytag.core.ui.theme.YTagTheme @Composable fun AppScreen() { diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 7ebb5be..04c760c 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -9,16 +9,7 @@ plugins { } android { - namespace = "co.yml.ytag.ui" - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } + namespace = "co.yml.ytag.core.ui" } dependencies { @@ -46,8 +37,10 @@ publishing { name = "YTag" setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") credentials { - username = project.findProperty("mavenCentralUsername")?.toString() ?: System.getenv("MAVEN_USERNAME") - password = project.findProperty("mavenCentralPassword")?.toString() ?: System.getenv("MAVEN_PASSWORD") + username = project.findProperty("mavenCentralUsername")?.toString() + ?: System.getenv("MAVEN_USERNAME") + password = project.findProperty("mavenCentralPassword")?.toString() + ?: System.getenv("MAVEN_PASSWORD") } } } @@ -98,13 +91,11 @@ publishing { } } } - - signing { useInMemoryPgpKeys( project.findProperty("signing.keyId")?.toString() ?: System.getenv("SIGNINGKEY"), project.findProperty("signing.InMemoryKey")?.toString() ?: System.getenv("MEMORY_KEY"), - project.findProperty("signing.password")?.toString()?:System.getenv("SIGNINGPASSWORD") + project.findProperty("signing.password")?.toString() ?: System.getenv("SIGNINGPASSWORD") ) sign(publishing.publications) } diff --git a/core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewContainerTesting.kt b/core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewContainerTesting.kt similarity index 89% rename from core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewContainerTesting.kt rename to core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewContainerTesting.kt index ac4c7b6..b591486 100644 --- a/core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewContainerTesting.kt +++ b/core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewContainerTesting.kt @@ -1,15 +1,18 @@ -package co.yml.ytag.ui.ytag +package co.yml.ytag.core.ui.ytag import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.ui.graphics.Color -import androidx.compose.ui.test.* +import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.printToString import androidx.compose.ui.unit.dp -import co.yml.ytag.ui.ytag.model.TagViewContainerModifiers -import co.yml.ytag.ui.ytag.model.TagViewData -import co.yml.ytag.ui.ytag.model.TagViewModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewContainerModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewData +import co.yml.ytag.core.ui.ytag.model.TagViewModifiers import org.junit.Rule import org.junit.Test diff --git a/core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewTest.kt b/core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewTest.kt similarity index 94% rename from core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewTest.kt rename to core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewTest.kt index 160eeb2..d4329e1 100644 --- a/core/ui/src/androidTest/java/co/yml/ytag/ui/ytag/TagViewTest.kt +++ b/core/ui/src/androidTest/java/co/yml/ytag/core/ui/ytag/TagViewTest.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag +package co.yml.ytag.core.ui.ytag import android.R import androidx.compose.foundation.layout.PaddingValues @@ -10,8 +10,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource -import androidx.compose.ui.test.* +import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.printToString import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle @@ -21,8 +24,8 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import co.yml.ytag.ui.ytag.model.TagViewData -import co.yml.ytag.ui.ytag.model.TagViewModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewData +import co.yml.ytag.core.ui.ytag.model.TagViewModifiers import org.junit.Rule import org.junit.Test diff --git a/core/ui/src/main/java/co/yml/ytag/ui/templates/AppBar.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/templates/AppBar.kt similarity index 96% rename from core/ui/src/main/java/co/yml/ytag/ui/templates/AppBar.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/templates/AppBar.kt index 3c442c9..ff3e1a5 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/templates/AppBar.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/templates/AppBar.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalMaterial3Api::class) -package co.yml.ytag.ui.templates +package co.yml.ytag.core.ui.templates import androidx.compose.foundation.layout.* import androidx.compose.material3.* @@ -12,8 +12,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import co.yml.ytag.ui.R -import co.yml.ytag.ui.theme.YTagTheme +import co.yml.ytag.core.ui.R +import co.yml.ytag.core.ui.theme.YTagTheme /** * Top app bars display information at the top of a screen. diff --git a/core/ui/src/main/java/co/yml/ytag/ui/theme/AppDimensions.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/AppDimensions.kt similarity index 96% rename from core/ui/src/main/java/co/yml/ytag/ui/theme/AppDimensions.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/theme/AppDimensions.kt index edc9fd7..1f5d6dc 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/theme/AppDimensions.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/AppDimensions.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.theme +package co.yml.ytag.core.ui.theme import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp diff --git a/core/ui/src/main/java/co/yml/ytag/ui/theme/Color.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Color.kt similarity index 97% rename from core/ui/src/main/java/co/yml/ytag/ui/theme/Color.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/theme/Color.kt index 457ba12..ddf1edb 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/theme/Color.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Color.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.theme +package co.yml.ytag.core.ui.theme import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/core/ui/src/main/java/co/yml/ytag/ui/theme/Shape.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Shape.kt similarity index 92% rename from core/ui/src/main/java/co/yml/ytag/ui/theme/Shape.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/theme/Shape.kt index b99eec5..49a77af 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/theme/Shape.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Shape.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.theme +package co.yml.ytag.core.ui.theme import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.runtime.staticCompositionLocalOf diff --git a/core/ui/src/main/java/co/yml/ytag/ui/theme/Theme.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Theme.kt similarity index 97% rename from core/ui/src/main/java/co/yml/ytag/ui/theme/Theme.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/theme/Theme.kt index ac4f473..5e34223 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/theme/Theme.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Theme.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.theme +package co.yml.ytag.core.ui.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.runtime.Composable diff --git a/core/ui/src/main/java/co/yml/ytag/ui/theme/Type.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Type.kt similarity index 95% rename from core/ui/src/main/java/co/yml/ytag/ui/theme/Type.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/theme/Type.kt index 7ff36b7..651a78e 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/theme/Type.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/theme/Type.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.theme +package co.yml.ytag.core.ui.theme import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.text.TextStyle diff --git a/core/ui/src/main/java/co/yml/ytag/ui/ytag/TagView.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagView.kt similarity index 98% rename from core/ui/src/main/java/co/yml/ytag/ui/ytag/TagView.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagView.kt index bfbef66..3e4ce65 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/ytag/TagView.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagView.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag +package co.yml.ytag.core.ui.ytag import android.R import android.annotation.SuppressLint @@ -30,8 +30,8 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.constraintlayout.compose.ConstraintLayout import androidx.constraintlayout.compose.Dimension -import co.yml.ytag.ui.ytag.model.TagViewData -import co.yml.ytag.ui.ytag.model.TagViewModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewData +import co.yml.ytag.core.ui.ytag.model.TagViewModifiers /** * [TagView] Compose method used for creating a custom chip diff --git a/core/ui/src/main/java/co/yml/ytag/ui/ytag/TagViewContainer.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagViewContainer.kt similarity index 98% rename from core/ui/src/main/java/co/yml/ytag/ui/ytag/TagViewContainer.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagViewContainer.kt index e760522..0dea6f5 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/ytag/TagViewContainer.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/TagViewContainer.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag +package co.yml.ytag.core.ui.ytag import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.LinearEasing @@ -24,10 +24,10 @@ import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.semantics import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.* -import co.yml.ytag.ui.R -import co.yml.ytag.ui.ytag.model.TagViewContainerModifiers -import co.yml.ytag.ui.ytag.model.TagViewData -import co.yml.ytag.ui.ytag.model.TagViewModifiers +import co.yml.ytag.core.ui.R +import co.yml.ytag.core.ui.ytag.model.TagViewContainerModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewData +import co.yml.ytag.core.ui.ytag.model.TagViewModifiers /** * [TagViewContainer] compose method used for hosting multiple chips diff --git a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewContainerModifiers.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewContainerModifiers.kt similarity index 99% rename from core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewContainerModifiers.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewContainerModifiers.kt index 8b6104c..340a555 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewContainerModifiers.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewContainerModifiers.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag.model +package co.yml.ytag.core.ui.ytag.model import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.shape.CircleShape diff --git a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewData.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewData.kt similarity index 96% rename from core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewData.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewData.kt index 9a397bd..c85e143 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewData.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewData.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag.model +package co.yml.ytag.core.ui.ytag.model import androidx.compose.runtime.Composable diff --git a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewModifiers.kt b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewModifiers.kt similarity index 99% rename from core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewModifiers.kt rename to core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewModifiers.kt index a9b3d73..a06909d 100644 --- a/core/ui/src/main/java/co/yml/ytag/ui/ytag/model/TagViewModifiers.kt +++ b/core/ui/src/main/java/co/yml/ytag/core/ui/ytag/model/TagViewModifiers.kt @@ -1,4 +1,4 @@ -package co.yml.ytag.ui.ytag.model +package co.yml.ytag.core.ui.ytag.model import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.graphics.Color diff --git a/feature/ytag/src/main/java/co/yml/ytag/feature/ytag/ui/YTagCatalog.kt b/feature/ytag/src/main/java/co/yml/ytag/feature/ytag/ui/YTagCatalog.kt index d81e54c..f5e2f43 100644 --- a/feature/ytag/src/main/java/co/yml/ytag/feature/ytag/ui/YTagCatalog.kt +++ b/feature/ytag/src/main/java/co/yml/ytag/feature/ytag/ui/YTagCatalog.kt @@ -40,14 +40,14 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import co.yml.ytag.core.ui.templates.AppBar +import co.yml.ytag.core.ui.theme.YTagTheme +import co.yml.ytag.core.ui.ytag.TagViewContainer +import co.yml.ytag.core.ui.ytag.model.AlphaAnimation +import co.yml.ytag.core.ui.ytag.model.TagViewContainerModifiers +import co.yml.ytag.core.ui.ytag.model.TagViewData +import co.yml.ytag.core.ui.ytag.model.TagViewModifiers import co.yml.ytag.ui.R -import co.yml.ytag.ui.templates.AppBar -import co.yml.ytag.ui.theme.YTagTheme -import co.yml.ytag.ui.ytag.TagViewContainer -import co.yml.ytag.ui.ytag.model.AlphaAnimation -import co.yml.ytag.ui.ytag.model.TagViewContainerModifiers -import co.yml.ytag.ui.ytag.model.TagViewData -import co.yml.ytag.ui.ytag.model.TagViewModifiers import kotlin.random.Random @OptIn(ExperimentalMaterial3Api::class) @@ -55,7 +55,8 @@ import kotlin.random.Random fun YTagCatalog() { YTagTheme { Scaffold( - modifier = Modifier.fillMaxSize() + modifier = Modifier + .fillMaxSize() .testTag("y_tag"), containerColor = YTagTheme.colors.background, topBar = { @@ -185,7 +186,8 @@ fun DefaultTagViewContainer(tagViewData: MutableList) { ) }", tagViewModifiers = TagViewModifiers.Builder().width(90.dp).shape(CircleShape) - .backgroundColor(tagColor).textColor(Color.Black).style(textStyle).alphaAnimation( + .backgroundColor(tagColor).textColor(Color.Black).style(textStyle) + .alphaAnimation( AlphaAnimation(enabled = true) ).build() ) diff --git a/gradlew b/gradlew old mode 100644 new mode 100755