Skip to content

Commit 2df2973

Browse files
authored
Merge pull request #6 from yml-org/CM-1390_YTag_publish_changes
Updated package name and application id
2 parents 5176733 + c0d3214 commit 2df2973

File tree

55 files changed

+313
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+313
-311
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# AndroidYCoreUI
2-
3-
4-
## Y Tags
1+
# Y Tags
52

63
Y Tag is a UI element in Android (some times referred to as chips) which displays a piece of
74
information.

app/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
@Suppress("DSL_SCOPE_VIOLATION") // scope violation issue: work around suggested from: https://github.com/gradle/gradle/issues/22797
22
plugins {
3-
id("co.yml.coreui.application")
4-
id("co.yml.coreui.application.jacoco")
5-
id("co.yml.coreui.application.compose")
6-
id("co.yml.coreui.hilt")
3+
id("co.yml.ytag.application")
4+
id("co.yml.ytag.application.jacoco")
5+
id("co.yml.ytag.application.compose")
6+
id("co.yml.ytag.hilt")
77
}
88

99
android {
10-
namespace = "co.yml.coreui"
10+
namespace = "co.yml.ytag"
1111
defaultConfig {
12-
applicationId = "co.yml.coreui"
12+
applicationId = "co.yml.ytag"
1313
versionCode = 1
1414
versionName = "1.0"
1515
}

app/src/androidTest/java/co/yml/coreui/ApplicationTest.kt renamed to app/src/androidTest/java/co/yml/ytag/ApplicationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.yml.coreui
1+
package co.yml.ytag
22

33
import androidx.test.ext.junit.runners.AndroidJUnit4
44
import androidx.test.platform.app.InstrumentationRegistry
@@ -21,6 +21,6 @@ class ApplicationTest {
2121
fun testAppContext() {
2222
// Context of the app under test.
2323
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
24-
assertTrue(appContext.packageName.contains("co.yml.coreui"))
24+
assertTrue(appContext.packageName.contains("co.yml.ytag"))
2525
}
2626
}

app/src/androidTest/java/co/yml/coreui/MainActivityTest.kt renamed to app/src/androidTest/java/co/yml/ytag/MainActivityTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.yml.coreui
1+
package co.yml.ytag
22

33
import androidx.compose.ui.test.junit4.createAndroidComposeRule
44
import androidx.lifecycle.Lifecycle
@@ -38,7 +38,7 @@ class MainActivityTest {
3838
fun useAppContext() {
3939
// Context of the app under test.
4040
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
41-
Assert.assertTrue(appContext.packageName.contains("co.yml.coreui"))
41+
Assert.assertTrue(appContext.packageName.contains("co.yml.ytag"))
4242
}
4343

4444
/**
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package co.yml.ytag.ui
2+
3+
import androidx.compose.ui.test.assertIsDisplayed
4+
import androidx.compose.ui.test.junit4.createAndroidComposeRule
5+
import androidx.compose.ui.test.onNodeWithTag
6+
import co.yml.ytag.MainActivity
7+
import dagger.hilt.android.testing.HiltAndroidRule
8+
import dagger.hilt.android.testing.HiltAndroidTest
9+
import org.junit.Rule
10+
import org.junit.Test
11+
12+
/**
13+
* Main navigation kt test
14+
*
15+
* @constructor Creates empty Main navigation kt test
16+
*/
17+
@HiltAndroidTest
18+
class MainNavigationKtTest {
19+
@get:Rule(order = 0)
20+
var hiltRule = HiltAndroidRule(this)
21+
22+
@get:Rule(order = 1)
23+
val composeTestRule = createAndroidComposeRule<MainActivity>()
24+
25+
/**
26+
* Test navigation launched
27+
*
28+
*/
29+
@Test
30+
fun testNavigationLaunched() {
31+
composeTestRule.onNodeWithTag("y_tag").assertIsDisplayed()
32+
}
33+
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<uses-permission android:name="android.permission.INTERNET" />
66

77
<application
8-
android:name="co.yml.coreui.CoreUICatalog"
8+
android:name="co.yml.ytag.YTag"
99
tools:replace="android:allowBackup"
1010
android:allowBackup="false"
1111
android:dataExtractionRules="@xml/data_extraction_rules"
@@ -14,19 +14,18 @@
1414
android:label="@string/app_name"
1515
android:roundIcon="@mipmap/ic_launcher_round"
1616
android:supportsRtl="true"
17-
android:theme="@style/Theme.CoreUICatalog"
17+
android:theme="@style/Theme.YTag"
1818
tools:targetApi="31">
1919
<activity
2020
android:name=".MainActivity"
2121
android:exported="true"
22-
android:theme="@style/Theme.CoreUICatalog">
22+
android:theme="@style/Theme.YTag">
2323
<intent-filter>
2424
<action android:name="android.intent.action.MAIN" />
2525

2626
<category android:name="android.intent.category.LAUNCHER" />
2727
</intent-filter>
2828
</activity>
29-
<activity android:name=".feature.ytag.ui.YTagActivity"/>
3029
</application>
3130

3231
</manifest>

app/src/main/java/co/yml/coreui/MainActivity.kt

Lines changed: 0 additions & 57 deletions
This file was deleted.

app/src/main/java/co/yml/coreui/ui/presentation/CoreUIComponents.kt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package co.yml.ytag
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import co.yml.ytag.ui.AppScreen
7+
import dagger.hilt.android.AndroidEntryPoint
8+
9+
/**
10+
* [MainActivity]: Launcher Activity
11+
*
12+
* @constructor Create empty Main activity
13+
*/
14+
@AndroidEntryPoint
15+
class MainActivity : ComponentActivity() {
16+
override fun onCreate(savedInstanceState: Bundle?) {
17+
super.onCreate(savedInstanceState)
18+
setContent {
19+
AppScreen()
20+
}
21+
}
22+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package co.yml.coreui
1+
package co.yml.ytag
22

33
import android.app.Application
44
import dagger.hilt.android.HiltAndroidApp
@@ -7,4 +7,4 @@ import dagger.hilt.android.HiltAndroidApp
77
* Application class.
88
*/
99
@HiltAndroidApp
10-
class CoreUICatalog : Application()
10+
class YTag : Application()

0 commit comments

Comments
 (0)