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
69 changes: 43 additions & 26 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import com.android.build.api.artifact.SingleArtifact
import java.io.FileInputStream
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
alias(libs.plugins.google.services)
alias(libs.plugins.firebase.crashlytics)
id("kotlin-kapt")
id("kotlin-parcelize")
}

Expand Down Expand Up @@ -67,41 +69,55 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = libs.versions.targetJvm.get()
}
buildFeatures {
buildConfig = true
}

applicationVariants.all {
outputs.all {
val outputImpl = this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
val versionName = libs.versions.versionName.get()
val buildType = name.substringAfterLast('-')
val date = SimpleDateFormat("yyyyMMddHHmmss").format(Date())

// 현재 git 커밋 해시 앞 7자리
val gitHash = try {
Runtime.getRuntime().exec("git rev-parse --short=7 HEAD")
.inputStream.bufferedReader().readText().trim()
} catch (e: Exception) {
"nogit"
}

// apk 파일 이름 설정
val apkName = "app-$buildType-$versionName-$gitHash-$date.apk"
outputImpl.outputFileName = apkName
}
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.targetJvm.get()))
}
}

androidComponents {
onVariants { variant ->
val capitalizedName = variant.name.replaceFirstChar { it.uppercase() }
val apkDir = variant.artifacts.get(SingleArtifact.APK)
val gitHash = providers.exec {
commandLine("git", "rev-parse", "--short=7", "HEAD")
isIgnoreExitValue = true
}.standardOutput.asText.map { it.trim().ifEmpty { "nogit" } }

tasks.register("rename${capitalizedName}Apk") {
doLast {
val dir = apkDir.get().asFile
if (!dir.exists()) return@doLast
val versionName = libs.versions.versionName.get()
val buildType = variant.buildType ?: "unknown"
val hash = gitHash.get()
val date = SimpleDateFormat("yyyyMMddHHmmss").format(Date())
dir.listFiles()?.filter { it.extension == "apk" }?.forEach { apk ->
val newName = "app-$buildType-$versionName-$hash-$date.apk"
apk.renameTo(File(apk.parentFile, newName))
}
}
}

tasks.configureEach {
if (name == "assemble$capitalizedName") {
finalizedBy("rename${capitalizedName}Apk")
}
}
}
}

dependencies {
implementation(projects.domain)
implementation(projects.data)
Expand All @@ -117,7 +133,8 @@ dependencies {

implementation(libs.hilt.android)
implementation(libs.androidx.hilt.navigation.compose)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)
ksp(libs.kotlin.metadata.jvm)

implementation(libs.timber)
implementation(libs.zxing.android.embedded)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ plugins {
alias(libs.plugins.ksp) apply false
}

task("clean", Delete::class) {
delete = setOf(rootProject.buildDir)
tasks.register<Delete>("clean") {
delete = setOf(rootProject.layout.buildDirectory)
}

task("btTest") {
tasks.register("btTest") {
dependsOn(":domain:test", ":data:testDebugUnitTest", ":presentation:testDebugUnitTest")
}
11 changes: 8 additions & 3 deletions common/logger/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand Down Expand Up @@ -27,14 +29,17 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = libs.versions.targetJvm.get()
}
buildFeatures {
buildConfig = true
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.targetJvm.get()))
}
}

dependencies {
implementation(libs.kotlinx.coroutines.core.jvm)
implementation(libs.timber)
Expand Down
10 changes: 7 additions & 3 deletions common/tracker/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import java.io.FileInputStream
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

val localPropertiesFile = rootProject.file("local.properties")
val localProperties = Properties()
Expand Down Expand Up @@ -40,14 +41,17 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = libs.versions.targetJvm.get()
}
buildFeatures {
buildConfig = true
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.targetJvm.get()))
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
Expand Down
14 changes: 9 additions & 5 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import java.io.FileInputStream
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

val localPropertiesFile = rootProject.file("local.properties")
val localProperties = Properties()
Expand All @@ -11,7 +12,6 @@ plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.hilt)
id("kotlin-kapt")
}

android {
Expand Down Expand Up @@ -44,14 +44,17 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = libs.versions.targetJvm.get()
}
buildFeatures {
buildConfig = true
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.targetJvm.get()))
}
}

dependencies {
implementation(projects.domain)
implementation(projects.common.tracker)
Expand All @@ -67,7 +70,8 @@ dependencies {
implementation(libs.bundles.coroutines)

implementation(libs.hilt.android)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)
ksp(libs.kotlin.metadata.jvm)

implementation(libs.timber)

Expand Down
4 changes: 2 additions & 2 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

tasks.getByName<Test>("test") {
tasks.named<Test>("test") {
useJUnitPlatform()
reports {
junitXml.required.set(false)
}
systemProperty("gradle.build.dir", project.buildDir)
systemProperty("gradle.build.dir", project.layout.buildDirectory.get().asFile)
}

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.builtInKotlin=false
android.newDsl=false
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
Expand Down
41 changes: 21 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@ versionName = "1.13.0"
packageName = "com.nexters.boolti"
compileSdk = "36"
targetJvm = "17"
kotlin = "2.2.20"
android = "8.13.0"
ksp = "2.2.20-2.0.4"
composeBom = "2025.10.00"
kotlin = "2.3.10"
android = "9.0.0"
ksp = "2.3.6"
composeBom = "2026.02.00"

activity-ktx = "1.11.0"
lifecycle = "2.9.4"
activity-ktx = "1.12.4"
lifecycle = "2.10.0"
androidx-junit = "1.3.0"
appcompat = "1.7.1"
constraintlayout = "2.2.1"
constraintlayoutCompose = "1.1.1"
coreSplashscreen = "1.0.1"
navigationCompose = "2.9.5"
coreSplashscreen = "1.2.0"
navigationCompose = "2.9.7"
core-ktx = "1.17.0"
datastore = "1.1.7"
datastore = "1.2.0"
espresso = "3.7.0"
firebase-bom = "34.4.0"
firebase-bom = "34.9.0"
coroutines = "1.10.2"
hilt = "2.57.2"
hilt = "2.59.2"
hiltNavigationCompose = "1.3.0"
javax-inject = "1"
junit = "4.13.2"
coil = "2.7.0"
kotlinx-serialization-json = "1.9.0"
kotlinx-serialization-json = "1.10.0"
serializationConverter = "1.0.0"
logging-interceptor = "5.2.1"
lottie = "6.6.10"
logging-interceptor = "5.3.2"
lottie = "6.7.1"
material = "1.13.0"
material3Android = "1.4.0"
materialIcons = "1.7.8"
retrofit = "3.0.0"
room = "2.8.2"
room = "2.8.4"
google-services = "4.4.4"
firebase-crashlytics = "3.0.6"
kotest = "6.0.4"
zoomable = "2.8.2"
kotest = "6.1.3"
zoomable = "2.11.0"
zxing = "4.3.0"
kakao = "2.22.0"
kakao = "2.23.2"
timber = "5.0.1"
mockk = "1.14.6"
mockk = "1.14.9"
tosspayments = "0.1.15"
immutable = "0.4.0"
reorderable = "0.9.6"
mixpanel = "8.2.4"
mixpanel = "8.3.0"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-ktx" }
Expand Down Expand Up @@ -85,6 +85,7 @@ coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hilt-android-gradle-plugin = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" }
kotlin-metadata-jvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlin" }
javax-inject = { module = "javax.inject:javax.inject", version.ref = "javax-inject" }
junit = { module = "junit:junit", version.ref = "junit" }
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
Expand Down
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 Jan 16 01:10:08 KST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 10 additions & 8 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import java.io.FileInputStream
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

val localPropertiesFile = rootProject.file("local.properties")
val localProperties = Properties()
Expand All @@ -9,9 +10,9 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlin.serialization)
id("kotlin-kapt")
id("kotlin-parcelize")
}

Expand Down Expand Up @@ -50,23 +51,23 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = libs.versions.targetJvm.get()
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.10"
}
testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.targetJvm.get()))
}
}

dependencies {
implementation(projects.domain)
implementation(projects.tosspayments)
Expand Down Expand Up @@ -94,7 +95,8 @@ dependencies {
implementation(libs.kotlinx.serialization.json)
implementation(libs.androidx.material3.android)
implementation(libs.zoomable)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)
ksp(libs.kotlin.metadata.jvm)

implementation(libs.lottie)
implementation(libs.bundles.coil)
Expand Down
Loading