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
2 changes: 1 addition & 1 deletion .github/workflows/auto_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Checkout code
if: github.event.pull_request.merged == true
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Create tag by branch name
if: github.event.pull_request.merged == true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`2025.05.01`
`2026.02.00`

## template-android

Expand Down
65 changes: 51 additions & 14 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.jetbrains.kotlin.serialization)
alias(libs.plugins.jetbrains.compose.compiler)
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt.android)
alias(libs.plugins.androidx.room)
alias(libs.plugins.secrets)
alias(libs.plugins.ktorfit)
alias(libs.plugins.stability.analyzer)
alias(libs.plugins.gms.oss.licenses.plugin)
}

android {
namespace = "android.template"
compileSdk = 35
compileSdk {
version = release(36)
}

defaultConfig {
applicationId = "android.template"
minSdk = 26
targetSdk = 35
minSdk = 28
targetSdk = 36
versionCode = 1
versionName = "1.0"

Expand All @@ -36,22 +42,27 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)

// fixme : 언젠가 beta 풀리면 설정 활성화 하기
// sourceSets.all {
// languageSettings.enableLanguageFeature("ExplicitBackingFields")
// }
}
buildFeatures {
buildConfig = true
compose = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1,LICENSE*.md}"
}
}
testOptions.unitTests.isIncludeAndroidResources = true
lint {
baseline = file("lint-baseline.xml")
}
}

kotlin {
compilerOptions {
freeCompilerArgs.add("-Xwhen-guards")
freeCompilerArgs.add("-Xcontext-parameters")
freeCompilerArgs.add("-Xexplicit-backing-fields")
}
}

composeCompiler {
Expand All @@ -71,7 +82,33 @@ dependencies {
testImplementation(libs.bundles.kotlin.test)
androidTestImplementation(libs.bundles.kotlin.test)

implementation(libs.core.ktx)
// hilt
implementation(libs.dagger.hilt.android)
ksp(libs.dagger.hilt.compiler)
testImplementation(libs.dagger.hilt.android.testing)
androidTestImplementation(libs.dagger.hilt.android.testing)
kspTest(libs.dagger.hilt.android.compiler)
kspAndroidTest(libs.dagger.hilt.android.compiler)

// api
implementation(libs.bundles.ktor)
implementation(libs.bundles.ktorfit)
testImplementation(libs.ktor.client.mock)

// security
implementation(libs.androidx.security.crypto)

// database
ksp(libs.androidx.room.compiler)
implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
testImplementation(libs.androidx.room.testing)

implementation(libs.androidx.datastore)

implementation(libs.androidx.core.ktx)

implementation(libs.androidx.core.splashscreen)

implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.activity.compose)
Expand Down
6 changes: 4 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
alias(libs.plugins.jetbrains.compose.compiler) apply false
alias(libs.plugins.jetbrains.compose) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt.android) apply false
alias(libs.plugins.androidx.room) apply false
alias(libs.plugins.secrets) apply false
alias(libs.plugins.gms.oss.licenses.plugin) apply false
}
9 changes: 9 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
#android.newDsl=false
128 changes: 91 additions & 37 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,52 +1,57 @@
[versions]
agp = "8.9.2"
agp = "9.0.0"

kotlin = "2.1.20"
kotlinxDatetime = "0.6.1"
kotlinxSerializationJson = "1.8.0"
kotlinxCollectionsImmutable = "0.3.8"
turbine = "1.2.0"
kotlin = "2.3.10"
kotlinxDatetime = "0.7.1"
kotlinxSerializationJson = "1.10.0"
kotlinxCollectionsImmutable = "0.4.0"
turbine = "1.2.1"

lint = "31.9.2"
lint = "32.0.0"

ksp = "2.1.20-1.0.32"
ksp = "2.3.4"

hilt = "2.54"
hiltNavigation = "1.2.0"
hilt = "2.59.1"
hiltNavigation = "1.3.0"

secrets = "2.0.1"

coreKtx = "1.16.0"
coreKtx = "1.17.0"

splashscreen = "1.0.1"
splashscreen = "1.2.0"

lifecycleRuntime = "2.8.7"
activityCompose = "1.10.1"
lifecycleRuntime = "2.10.0"
activityCompose = "1.12.3"

composeBom = "2025.04.01"
navigationCompose = "2.8.9"
composeBom = "2026.01.01"
adaptiveMaterial3 = "1.3.0-alpha07"
navigation3 = "1.0.0"
coil = "2.7.0"
lottie = "6.7.1"
composeStabilityAnalyzer = "0.6.6"

retrofit = "2.11.0"
okhttp3 = "4.12.0"
ktor = "3.4.0"
ktorfit = "2.7.2"

room = "2.7.1"
dataStore = "1.1.2"
securityCrypto = "1.1.0"

accompanist = "0.37.0"
room = "2.8.4"
dataStore = "1.2.0"

gmsPlugin = "4.4.2"
firebaseBom = "33.8.0"
firebaseCrashlytics = "3.0.3"
gmsPlugin = "4.4.4"
firebaseBom = "34.9.0"
firebaseCrashlytics = "3.0.6"
ossLicensesPlugin = "0.10.10"
playOssLicenses = "17.4.0"

timber = "5.0.1"

junit = "4.13.2"
junitExt = "1.2.1"
testCoreKtx = "1.6.1"
espressoCore = "3.6.1"
mockk = "1.13.16"
robolectric = "4.14.1"
junitExt = "1.3.0"
testCoreKtx = "1.7.0"
espressoCore = "3.7.0"
mockk = "1.14.9"
robolectric = "4.16.1"

[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" }
Expand All @@ -60,7 +65,33 @@ lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lint" }
lint-tests = { module = "com.android.tools.lint:lint-tests", version.ref = "lint" }

core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
dagger-hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
dagger-hilt-android-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" }
dagger-hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigation" }

androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "securityCrypto" }

ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }

ktorfit-lib = { module = "de.jensklingenberg.ktorfit:ktorfit-lib", version.ref = "ktorfit" }
ktorfit-converters-flow = { module = "de.jensklingenberg.ktorfit:ktorfit-converters-flow", version.ref = "ktorfit" }

androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "room" }

androidx-datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "dataStore" }

androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "splashscreen" }

androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleRuntime" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
Expand All @@ -76,10 +107,26 @@ androidx-ui-text-google-fonts = { module = "androidx.compose.ui:ui-text-google-f
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }

androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
androidx-navigation-testing = { module = "androidx.navigation:navigation-testing", version.ref = "navigationCompose" }
androidx-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "adaptiveMaterial3" }
androidx-adaptive-layout = { module = "androidx.compose.material3.adaptive:adaptive-layout", version.ref = "adaptiveMaterial3" }
androidx-adaptive-navigation3 = { module = "androidx.compose.material3.adaptive:adaptive-navigation3", version.ref = "adaptiveMaterial3" }

androidx-lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "lifecycleRuntime" }
androidx-navigation3-runtime = { module = "androidx.navigation3:navigation3-runtime", version.ref = "navigation3" }
androidx-navigation3-ui = { module = "androidx.navigation3:navigation3-ui", version.ref = "navigation3" }

coil = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }

lottie = { module = "com.airbnb.android:lottie-compose", version.ref = "lottie" }

firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
firebase-config = { module = "com.google.firebase:firebase-config" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
firebase-messaging = { module = "com.google.firebase:firebase-messaging" }

play-services-oss-licenses = { module = "com.google.android.gms:play-services-oss-licenses", version.ref = "playOssLicenses" }

timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }

Expand All @@ -102,25 +149,32 @@ kotlin = [
kotlin-test = ["kotlinx-coroutines-test", "turbine"]

compose = [
"androidx-navigation-compose",
"androidx-hilt-navigation-compose",
"androidx-ui", "androidx-ui-graphics", "androidx-ui-tooling-preview",
"androidx-material3", "androidx-material3-windowSizeClass",
"androidx-adaptive", "androidx-adaptive-layout", "androidx-adaptive-navigation3",
"androidx-ui-text-google-fonts",
"coil",
"coil", "coil-gif", "lottie",
"androidx-navigation3-runtime", "androidx-navigation3-ui", "androidx-lifecycle-viewmodel-navigation3"
]
compose-android-test = ["androidx-ui-test-junit4", "androidx-navigation-testing"]
compose-android-test = ["androidx-ui-test-junit4"]
compose-ui-test = ["androidx-ui-tooling", "androidx-ui-test-manifest"]
ktor = ["ktor-client-core", "ktor-client-cio", "ktor-client-content-negotiation", "ktor-serialization-kotlinx-json", "ktor-client-logging"]
ktorfit = ["ktorfit-lib", "ktorfit-converters-flow"]

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
jetbrains-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
jetbrains-kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
jetbrains-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
androidx-room = { id = "androidx.room", version.ref = "room" }
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
gms = { id = "com.google.gms.google-services", version.ref = "gmsPlugin" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }
android-lint = { id = "com.android.lint" }
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfit" }
stability-analyzer = { id = "com.github.skydoves.compose.stability.analyzer", version.ref = "composeStabilityAnalyzer" }
gms-oss-licenses-plugin = { id = "com.google.android.gms.oss-licenses-plugin", version.ref = "ossLicensesPlugin" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 30 00:50:22 KST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists