Skip to content

Commit

Permalink
Merge pull request #3 from CaZaIt/feature/mainactivity
Browse files Browse the repository at this point in the history
[Feat] main activity 추가
  • Loading branch information
YiBeomSeok authored Dec 21, 2023
2 parents 3dfafe2 + f7591ba commit 999a28b
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Android Pull Request CI

on:
pull_request:
branches: [ main ]
branches: [ develop ]

jobs:
verify:
Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ android {

dependencies {
implementation(projects.core.navigation)
implementation(projects.core.designsystem)
implementation(libs.androidx.appcompat)
}
21 changes: 19 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">


<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".CazaitApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand All @@ -11,6 +15,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CazaitAndroid"
tools:targetApi="31" />
tools:targetApi="34">

<activity
android:name=".ui.MainActivity"
android:configChanges="uiMode"
android:exported="true"
android:theme="@style/Theme.CazaitAndroid.TransparentSystemBar">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

</manifest>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
24 changes: 24 additions & 0 deletions app/src/main/kotlin/org/cazait/cazaitandroid/ui/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.cazait.cazaitandroid.ui

import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import dagger.hilt.android.AndroidEntryPoint
import org.cazait.cazaitandroid.core.designsystem.theme.CazaitTheme

@AndroidEntryPoint
class MainActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContent {
CazaitTheme {
Surface {
Text(text = "hello cazait")
}
}
}
}
}
16 changes: 0 additions & 16 deletions app/src/main/res/values-night/themes.xml

This file was deleted.

16 changes: 0 additions & 16 deletions app/src/main/res/values/themes.xml

This file was deleted.

14 changes: 14 additions & 0 deletions build-logic/src/main/kotlin/cazait.android.application.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import gradle.kotlin.dsl.accessors._9885c8525475a2a77e0b650bdf1e3c81.androidTestImplementation
import gradle.kotlin.dsl.accessors._9885c8525475a2a77e0b650bdf1e3c81.implementation
import org.cazait.cazaitandroid.configureHiltAndroid
import org.cazait.cazaitandroid.configureKotestAndroid
import org.cazait.cazaitandroid.configureKotlinAndroid
import org.cazait.cazaitandroid.libs

plugins {
id("com.android.application")
id("cazait.android.compose")
}

configureKotlinAndroid()
configureHiltAndroid()
configureKotestAndroid()

dependencies {
val libs = project.extensions.libs
implementation(libs.findLibrary("hilt.navigation.compose").get())
implementation(libs.findLibrary("androidx.compose.navigation").get())
androidTestImplementation(libs.findLibrary("androidx.compose.navigation.test").get())

implementation(libs.findLibrary("androidx.lifecycle.viewModelCompose").get())
implementation(libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ internal fun Project.configureKotlinAndroid() {

// Android settings
androidExtension.apply {
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
minSdk = 28
}

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion core/data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>

</manifest>
2 changes: 1 addition & 1 deletion core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {

dependencies {
implementation(libs.androidx.appcompat)

implementation(libs.landscapist.bom)
implementation(libs.landscapist.coil)
implementation(libs.landscapist.placeholder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import androidx.compose.runtime.compositionLocalOf
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
import androidx.glance.GlanceTheme
import androidx.glance.color.ColorProvider
import androidx.glance.color.colorProviders

private val DarkColorScheme = darkColorScheme(
primary = White,
Expand Down
11 changes: 11 additions & 0 deletions core/designsystem/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.CazaitAndroid" parent="Theme.AppCompat.DayNight.NoActionBar" />

<style name="Theme.CazaitAndroid.TransparentSystemBar">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

</resources>
2 changes: 1 addition & 1 deletion core/navigation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>

</manifest>
38 changes: 19 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
[versions]
androidGradlePlugin = "8.2.0"
androidDesugarJdkLibs = "1.2.2"
androidxCore = "1.9.0"
androidDesugarJdkLibs = "2.0.4"
androidxCore = "1.12.0"
androidxAppCompat = "1.6.1"
androidxLifecycle = "2.6.1"
androidxComposeBom = "2023.05.01"
androidxComposeCompiler = "1.4.7"
androidxComposeNavigation = "2.6.0"
androidxComposeMaterial3 = "1.1.0"
androidxActivity = "1.7.2"
hilt = "2.46.1"
hiltNavigationCompose = "1.0.0"

okhttp = "4.11.0"
androidxLifecycle = "2.6.2"
androidxComposeBom = "2023.10.01"
androidxComposeCompiler = "1.5.7"
androidxComposeNavigation = "2.7.6"
androidxComposeMaterial3 = "1.1.2"
androidxActivity = "1.8.2"
hilt = "2.49"
hiltNavigationCompose = "1.1.0"

okhttp = "4.12.0"
retrofit = "2.9.0"
retrofitKotlinxSerializationJson = "1.0.0"
kotlinxSerializationJson = "1.5.1"
kotlinxSerializationJson = "1.6.1"
kotlinxDatetime = "0.2.1"
kotlinxImmutable = "0.3.5"
kotlinxImmutable = "0.3.6"

landscapist = "2.2.5"
composeShimmer = "1.0.5"

junit4 = "4.13.2"
junitVintageEngine = "5.10.0"
kotlin = "1.8.21"
kotlin = "1.9.21"

androidxTestExt = "1.1.4"
androidxEspresso = "3.5.0"
androidxTestExt = "1.1.5"
androidxEspresso = "3.5.1"
kotest = "5.6.2"
# https://github.com/detekt/detekt
detekt = "1.23.0"
mockk = "1.13.5"
turbine = "1.0.0"

coroutine = "1.7.2"
coroutine = "1.7.3"

androidxDatastore = "1.0.0"

ossLicenses = "17.0.1"
ossLicensesPlugin = "0.10.6"

androidxGlance = "1.0.0-beta01"
androidxGlance = "1.0.0"
glanceExperimentalTools = "0.2.2"

[libraries]
Expand Down

0 comments on commit 999a28b

Please sign in to comment.