-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat/#1_initial_setting] 기초 세팅
- Loading branch information
Showing
43 changed files
with
986 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,123 @@ | ||
import com.zucchini.buildsrc.Constants | ||
|
||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
kotlin("android") | ||
kotlin("kapt") | ||
id("kotlin-parcelize") | ||
id("dagger.hilt.android.plugin") | ||
id("com.google.android.gms.oss-licenses-plugin") | ||
} | ||
|
||
android { | ||
namespace = "com.zucchini.ssuplector" | ||
compileSdk = 34 | ||
namespace = Constants.packageName | ||
compileSdk = Constants.compileSdk | ||
|
||
defaultConfig { | ||
applicationId = "com.zucchini.ssuplector" | ||
minSdk = 28 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
applicationId = Constants.packageName | ||
minSdk = Constants.minSdk | ||
targetSdk = Constants.targetSdk | ||
versionCode = Constants.versionCode | ||
versionName = Constants.versionName | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
|
||
// buildConfigField( | ||
// "String", | ||
// "NATIVE_APP_KEY", | ||
// gradleLocalProperties(rootDir).getProperty("native.app.key"), | ||
// ) | ||
// manifestPlaceholders["NATIVE_APP_KEY"] = | ||
// gradleLocalProperties(rootDir).getProperty("nativeAppKey") | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
// buildConfigField( | ||
// "String", | ||
// "BASE_URL", | ||
// gradleLocalProperties(rootDir).getProperty("test.base.url") | ||
// ) | ||
} | ||
release { | ||
// buildConfigField( | ||
// "String", | ||
// "BASE_URL", | ||
// gradleLocalProperties(rootDir).getProperty("base.url") | ||
// ) | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
"proguard-rules.pro", | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
sourceCompatibility = Versions.javaVersion | ||
targetCompatibility = Versions.javaVersion | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
jvmTarget = Versions.jvmVersion | ||
} | ||
|
||
buildFeatures { | ||
buildConfig = true | ||
dataBinding = true | ||
viewBinding = true | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.1" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core")) | ||
implementation(project(":data")) | ||
implementation(project(":domain")) | ||
implementation(project(":feature:projects")) | ||
implementation(project(":feature:devInfo")) | ||
implementation(project(":feature:mypage")) | ||
|
||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") | ||
implementation("androidx.activity:activity-compose:1.8.2") | ||
implementation(platform("androidx.compose:compose-bom:2023.08.00")) | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.ui:ui-graphics") | ||
implementation("androidx.compose.ui:ui-tooling-preview") | ||
implementation("androidx.compose.material3:material3") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00")) | ||
androidTestImplementation("androidx.compose.ui:ui-test-junit4") | ||
debugImplementation("androidx.compose.ui:ui-tooling") | ||
debugImplementation("androidx.compose.ui:ui-test-manifest") | ||
KotlinDependencies.run { | ||
implementation(kotlin) | ||
implementation(coroutines) | ||
implementation(jsonSerialization) | ||
} | ||
|
||
AndroidXDependencies.run { | ||
implementation(coreKtx) | ||
implementation(appCompat) | ||
implementation(hilt) | ||
implementation(workManager) | ||
implementation(hiltWorkManager) | ||
implementation(constraintLayout) | ||
} | ||
|
||
KaptDependencies.run { | ||
kapt(hiltCompiler) | ||
kapt(hiltWorkManagerCompiler) | ||
} | ||
|
||
TestDependencies.run { | ||
testImplementation(jUnit) | ||
androidTestImplementation(androidTest) | ||
androidTestImplementation(espresso) | ||
} | ||
|
||
ThirdPartyDependencies.run { | ||
implementation(platform(okHttpBom)) | ||
implementation(okHttp) | ||
implementation(okHttpLoggingInterceptor) | ||
implementation(retrofit) | ||
implementation(retrofitJsonConverter) | ||
implementation(timber) | ||
implementation(ossLicense) | ||
} | ||
|
||
ComposeDependencies.run { | ||
implementation(composeUi) | ||
implementation(composeActivity) | ||
implementation(composeMaterial3) | ||
implementation(composeTooling) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 13 additions & 38 deletions
51
app/src/main/java/com/zucchini/ssuplector/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
package com.zucchini.ssuplector | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.zucchini.ssuplector.ui.theme.SSUPlectorAndroidTheme | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.zucchini.ssuplector.databinding.ActivityMainBinding | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
|
||
class MainActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivityMainBinding | ||
|
||
class MainActivity : ComponentActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
binding = ActivityMainBinding.inflate(layoutInflater) | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
SSUPlectorAndroidTheme { | ||
// A surface container using the 'background' color from the theme | ||
Surface( | ||
modifier = Modifier.fillMaxSize(), | ||
color = MaterialTheme.colorScheme.background | ||
) { | ||
Greeting("Android") | ||
} | ||
} | ||
} | ||
setContentView(binding.root) | ||
// startActivity(Intent(this, LoginActivity::class.java)) | ||
// finish() | ||
} | ||
} | ||
|
||
@Composable | ||
fun Greeting(name: String, modifier: Modifier = Modifier) { | ||
Text( | ||
text = "Hello $name!", | ||
modifier = modifier | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun GreetingPreview() { | ||
SSUPlectorAndroidTheme { | ||
Greeting("Android") | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/zucchini/ssuplector/SSUPlectorApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.zucchini.ssuplector | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
import timber.log.Timber | ||
|
||
@HiltAndroidApp | ||
class SSUPlectorApplication : Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
|
||
initTimber() | ||
} | ||
} | ||
|
||
private fun initTimber() { | ||
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<string name="app_name">SSUPlector-Android</string> | ||
<string name="app_name">SSUPlector</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
id("com.android.application") version "8.2.0" apply false | ||
id("org.jetbrains.kotlin.android") version "1.9.0" apply false | ||
} | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath(ClassPathPlugins.gradle) | ||
classpath(ClassPathPlugins.kotlinGradle) | ||
classpath(ClassPathPlugins.hilt) | ||
classpath(ClassPathPlugins.oss) | ||
} | ||
} | ||
|
||
tasks.register("clean", Delete::class) { | ||
delete(rootProject.buildDir) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.zucchini.buildsrc | ||
|
||
object Constants { | ||
const val packageName = "com.zucchini.ssuplector" | ||
const val compileSdk = 34 | ||
const val minSdk = 28 | ||
const val targetSdk = 34 | ||
const val versionCode = 12 | ||
const val versionName = "1.0.0" | ||
} |
Oops, something went wrong.