Skip to content
Merged
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: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ dependencies {
implementation(versionCatalogLibs.androidx.lifecycle.viewModelCompose)

implementation(project(mapOf("path" to ":core:ui")))
implementation(project(mapOf("path" to ":feature:post")))
implementation(project(mapOf("path" to ":feature:ytag")))

androidTestImplementation(versionCatalogLibs.androidx.test.core)
androidTestImplementation(versionCatalogLibs.androidx.test.core.ktx)
androidTestImplementation(versionCatalogLibs.androidx.test.ext)
androidTestImplementation(versionCatalogLibs.androidx.test.runner)
androidTestImplementation(versionCatalogLibs.androidx.test.rules)
debugImplementation("androidx.compose.ui:ui-test-manifest:${versionCatalogLibs.versions.compose.ui.testing}")

debugImplementation("androidx.compose.ui:ui-test-manifest:${versionCatalogLibs.versions.compose}")
androidTestImplementation(project(mapOf("path" to ":core:test")))
}
33 changes: 0 additions & 33 deletions app/src/androidTest/java/co/yml/coreui/ui/MainNavigationKtTest.kt

This file was deleted.

6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
android:theme="@style/Theme.CoreUICatalog"
tools:targetApi="31">
<activity
android:name="co.yml.coreui.MainActivity"
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.CoreUICatalog">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<activity android:name=".feature.ytag.ui.YTagActivity"/>
</application>

</manifest>
</manifest>
43 changes: 37 additions & 6 deletions app/src/main/java/co/yml/coreui/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
package co.yml.coreui

import android.content.Intent
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.core.view.WindowCompat
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
import androidx.compose.ui.Modifier
import co.yml.coreui.feature.ytag.ui.YTagActivity
import co.yml.coreui.core.ui.templates.AppBar
import co.yml.coreui.core.ui.theme.CoreUICatalogTheme
import co.yml.coreui.ui.R
import co.yml.coreui.ui.presentation.CoreUIComponents
import dagger.hilt.android.AndroidEntryPoint
import co.yml.coreui.ui.AppScreen

/**
* Main activity: Launcher Activity
* [MainActivity]: Launcher Activity
*
* @constructor Create empty Main activity
*/
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, true)
setContent {
// for larger screen get screen width size class here and pass it to app screen val widthSizeClass = calculateWindowSizeClass(this).widthSizeClass
AppScreen()
CoreUICatalogTheme {
Scaffold(modifier = Modifier.fillMaxSize(),
containerColor = CoreUICatalogTheme.colors.background,
topBar = { AppBar() })
{
Column(
modifier = Modifier
.padding(it)
.fillMaxSize(),
verticalArrangement = Arrangement.Center
) {
CoreUIComponents(title = getString(R.string.title_y_tag), onClick = {
startActivity(
Intent(
this@MainActivity,
YTagActivity::class.java
)
)
})
}
}
}
}
}
}
21 changes: 0 additions & 21 deletions app/src/main/java/co/yml/coreui/ui/AppScreen.kt

This file was deleted.

21 changes: 0 additions & 21 deletions app/src/main/java/co/yml/coreui/ui/MainNavigation.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package co.yml.coreui.ui.presentation

import androidx.compose.foundation.layout.*
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.unit.dp
import co.yml.coreui.core.ui.theme.CoreUICatalogTheme
import co.yml.coreui.ui.R

@Composable
fun CoreUIComponents(title: String, onClick: () -> Unit) {
Column {
Spacer(modifier = Modifier.height(dimensionResource(id = R.dimen.padding_normal_medium)))
Button(
modifier = Modifier
.padding(
end = dimensionResource(id = R.dimen.padding_normal_medium),
start = dimensionResource(
id = R.dimen.padding_normal_medium
)
)
.fillMaxWidth()
.height(48.dp), onClick = onClick,
colors = ButtonDefaults.buttonColors(containerColor = CoreUICatalogTheme.colors.button)
) {
Text(
text = title,
style = CoreUICatalogTheme.typography.button,
color = CoreUICatalogTheme.colors.text
)
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">CoreUICatalogApp</string>
</resources>
</resources>
16 changes: 0 additions & 16 deletions app/src/test/java/co/yml/coreui/ExampleUnitTest.kt

This file was deleted.

21 changes: 0 additions & 21 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ gradlePlugin {
implementationClass = "conventions.FeatureConventionPlugin"
}


register("androidHilt") {
id = "co.yml.coreui.hilt"
implementationClass = "conventions.HiltConventionPlugin"
Expand All @@ -77,25 +76,5 @@ gradlePlugin {
id = "co.yml.coreui.test"
implementationClass = "conventions.AndroidTestConventionPlugin"
}

register("analytics") {
id = "co.yml.coreui.analytics"
implementationClass = "conventions.AnalyticsConventionPlugin"
}

register("analyticsTest") {
id = "co.yml.coreui.analytics.test"
implementationClass = "conventions.AnalyticsTestConventionPlugin"
}

register("firebase") {
id = "co.yml.coreui.firebase"
implementationClass = "conventions.FirebaseConventionPlugin"
}

register("firebaseTest") {
id = "co.yml.coreui.firebase.test"
implementationClass = "conventions.FirebaseTestConventionPlugin"
}
}
}
21 changes: 0 additions & 21 deletions build-logic/src/main/java/conventions/AnalyticsConventionPlugin.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.getByType
import co.yml.coreui.configureFlavors
import co.yml.coreui.configureKotlinAndroid
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.kotlin

/**
* Application convention plugin
Expand Down
22 changes: 0 additions & 22 deletions build-logic/src/main/java/conventions/FirebaseConventionPlugin.kt

This file was deleted.

Loading