- Play Billing 라이브러리·결제 코드·상품 화면 제거 (BILLING 권한 없음) - 유료 전용이던 스킨·보드는 보상형 광고 해금으로, 시즌 패스는 무료 트랙만 표시 - 화면 문구를 i18n/Strings 인터페이스로 분리: ko·en·ja·zh-Hans·zh-Hant·es·pt·fr·de·ru·tr·id·vi·th (그 외 언어는 영어) - 서버의 한국어 오류 문구를 앱에서 현재 언어로 바꿔 표시 (I18n.server) - 긴 번역이 칸을 넘으면 글자를 70%까지 줄이고 말줄임 (Mono autoSize) - 스토어 등록 답안·개인정보처리방침에서 결제 내용 제거 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
119 lines
4.7 KiB
Kotlin
119 lines
4.7 KiB
Kotlin
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.androidApplication)
|
|
alias(libs.plugins.composeMultiplatform)
|
|
alias(libs.plugins.composeCompiler)
|
|
}
|
|
|
|
// ── 버전 관리 ────────────────────────────────────────────────────
|
|
// 기본값은 gradle.properties. CI/릴리스 스크립트는
|
|
// ./gradlew assembleRelease -PappVersionName=1.2.0 -PappVersionCode=7
|
|
// 처럼 덮어쓴다.
|
|
val appVersionName: String = (findProperty("appVersionName") as String?) ?: "0.0.1"
|
|
val appVersionCode: Int = ((findProperty("appVersionCode") as String?) ?: "1").toInt()
|
|
|
|
kotlin {
|
|
androidTarget {
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
|
|
}
|
|
|
|
// iOS 타깃은 뺐다 (2026-09-24 결정). Apple Developer Program 연 $99 + 맥이
|
|
// 필요해 비용 대비 실익이 없다고 판단. 아이폰은 웹 PWA(tetrig.pages.dev)로 커버한다.
|
|
// 구조는 commonMain 중심 그대로라, 나중에 iosTarget 만 다시 추가하면 된다.
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(compose.ui)
|
|
implementation(compose.components.resources)
|
|
implementation(libs.androidx.lifecycle.viewmodel)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
androidMain.dependencies {
|
|
implementation(compose.preview)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.play.services.ads)
|
|
implementation(libs.ump)
|
|
// AdMob 미디에이션: AdMob 콘솔에서 미디에이션 그룹을 만들어야 실제로 입찰에 들어온다.
|
|
implementation(libs.admob.applovin)
|
|
implementation(libs.admob.pangle)
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "kr.tkrmagid.tetrig"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "kr.tkrmagid.tetrig"
|
|
minSdk = 24
|
|
targetSdk = 36
|
|
versionCode = appVersionCode
|
|
versionName = appVersionName
|
|
|
|
// AdMob — 기본값은 Google 공식 테스트 ID. 실제 ID 는 gradle.properties 의 admob* 값만 바꾸면 된다.
|
|
fun prop(k: String, d: String) = (findProperty(k) as String?)?.takeIf { it.isNotBlank() } ?: d
|
|
manifestPlaceholders["admobAppId"] = prop("admobAppId", "ca-app-pub-3940256099942544~3347511713")
|
|
resValue("string", "admob_banner", prop("admobBanner", "ca-app-pub-3940256099942544/9214589741"))
|
|
resValue("string", "admob_card", prop("admobCard", "ca-app-pub-3940256099942544/6300978111"))
|
|
resValue("string", "admob_interstitial", prop("admobInterstitial", "ca-app-pub-3940256099942544/1033173712"))
|
|
resValue("string", "admob_rewarded", prop("admobRewarded", "ca-app-pub-3940256099942544/5224354917"))
|
|
}
|
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
|
|
|
// keystore.properties 가 있으면 릴리스 서명을 붙인다. 없으면 unsigned.
|
|
val keystorePropsFile = rootProject.file("keystore.properties")
|
|
val keystoreProps = Properties().apply {
|
|
if (keystorePropsFile.exists()) keystorePropsFile.inputStream().use { load(it) }
|
|
}
|
|
if (keystoreProps.isNotEmpty()) {
|
|
signingConfigs {
|
|
create("release") {
|
|
storeFile = file(keystoreProps.getProperty("storeFile"))
|
|
storePassword = keystoreProps.getProperty("storePassword")
|
|
keyAlias = keystoreProps.getProperty("keyAlias")
|
|
keyPassword = keystoreProps.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("release") {
|
|
isMinifyEnabled = false
|
|
if (keystoreProps.isNotEmpty()) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
getByName("debug") {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
packaging {
|
|
resources.excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
debugImplementation(compose.uiTooling)
|
|
}
|