- 게스트 자동 발급, 이메일 가입/로그인(게스트 기록 이전), 닉네임 변경, 계정 삭제 - 커스텀 방 만들기/참가, 로비(호스트 규칙), 1:1·FFA 대전, 가비지 게이지·상쇄·삽입, 상대 미니보드 탭 타겟팅, KO 피드, 관전, 리매치 투표, 재접속 - 리그 대기열·매칭·FT3/FT5·결과(TR/배치), 리더보드 4종, 프로필 전적 - AdMob(UMP 동의) 배너·결과 카드·전면(3판당 1회, 첫 판 제외), 기본은 테스트 ID - 서버: 앱 레벨 keepalive(auto-response), KO 후 로비 갱신, 재접속 시 결과 재전송, x-info 헤더 ASCII 인코딩, 계정 삭제 API - 개인정보처리방침·스토어 등록정보 갱신 (온라인·광고 반영) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
115 lines
4.4 KiB
Kotlin
115 lines
4.4 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)
|
|
}
|
|
}
|
|
}
|
|
|
|
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"))
|
|
}
|
|
|
|
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)
|
|
}
|