From b72206f7eed8c26548b4f5e2016a8e773e21b1b5 Mon Sep 17 00:00:00 2001 From: hbyang Date: Tue, 6 Oct 2026 15:19:13 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=9B=8C=EC=B9=98=20=EB=A6=B4?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=20=EB=B9=8C=EB=93=9C=20=EC=A4=80=EB=B9=84=20?= =?UTF-8?q?=E2=80=94=20=EC=97=85=EB=A1=9C=EB=93=9C=20=ED=82=A4=20=EC=84=9C?= =?UTF-8?q?=EB=AA=85,=20=EC=9A=B4=EC=98=81=20API=20=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=EC=86=8D=EC=84=B1=ED=99=94,=20R8,=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EC=84=A0=EC=8A=A4=20=EB=8F=99=EB=B4=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 서명·API 주소는 ~/.gradle/gradle.properties 의 NALSSIGAK_* 에서 읽음 (저장소에 키 없음) - 앱 R8·리소스 줄이기, 스킨은 dex 없게 R8 만 켜고 리소스 줄이기는 끔 - MIT·OFL 전문을 앱 assets 로 같이 실음, *.jks·*.keystore 무시 Co-Authored-By: Claude Opus 5.5 --- watch/.gitignore | 2 ++ watch/app/build.gradle.kts | 10 ++++++++-- watch/build.gradle.kts | 17 +++++++++++++++++ watch/licenses/LICENSE-fluent-emoji.txt | 22 ++++++++++++++++++++++ watch/watchface/build.gradle.kts | 6 ++++++ 5 files changed, 55 insertions(+), 2 deletions(-) diff --git a/watch/.gitignore b/watch/.gitignore index a4a956b..b33ab3f 100644 --- a/watch/.gitignore +++ b/watch/.gitignore @@ -3,3 +3,5 @@ build/ local.properties .idea/ *.iml +*.jks +*.keystore diff --git a/watch/app/build.gradle.kts b/watch/app/build.gradle.kts index 5c31c9b..ad65748 100644 --- a/watch/app/build.gradle.kts +++ b/watch/app/build.gradle.kts @@ -17,9 +17,15 @@ android { buildTypes { // 에뮬레이터에서 본 맥의 로컬 백엔드 (compose 포트 9810) debug { buildConfigField("String", "API_BASE", "\"http://10.0.2.2:9810\"") } - // ponytail: 운영 서버 배포 전이라 비워 둠. 배포하면 https 주소로 - release { buildConfigField("String", "API_BASE", "\"\"") } + // 운영 서버 https 주소는 -PNALSSIGAK_API_BASE=… 또는 ~/.gradle/gradle.properties 로 + release { + buildConfigField("String", "API_BASE", "\"${providers.gradleProperty("NALSSIGAK_API_BASE").getOrElse("")}\"") + isMinifyEnabled = true + isShrinkResources = true + } } + // 오픈소스 라이선스 전문을 앱에 같이 싣는다 (MIT·OFL 고지 조건) + sourceSets["main"].assets.directories.add("../licenses") buildFeatures { compose = true buildConfig = true diff --git a/watch/build.gradle.kts b/watch/build.gradle.kts index 12a7ab9..9cf18ac 100644 --- a/watch/build.gradle.kts +++ b/watch/build.gradle.kts @@ -2,3 +2,20 @@ plugins { id("com.android.application") version "9.4.1" apply false id("org.jetbrains.kotlin.plugin.compose") version "2.4.20" apply false } + +// 앱·스킨 공통 업로드 키. 키 파일·비밀번호는 저장소 밖 ~/.gradle/gradle.properties 에 둔다. +// 값이 없으면 서명 없는 릴리스가 나온다(Play 에 올릴 수 없음). +subprojects { + plugins.withId("com.android.application") { + extensions.configure { + val store = providers.gradleProperty("NALSSIGAK_STORE_FILE").orNull ?: return@configure + val upload = signingConfigs.create("upload") { + storeFile = file(store) + storePassword = providers.gradleProperty("NALSSIGAK_STORE_PASSWORD").get() + keyAlias = providers.gradleProperty("NALSSIGAK_KEY_ALIAS").get() + keyPassword = providers.gradleProperty("NALSSIGAK_KEY_PASSWORD").get() + } + buildTypes.getByName("release").signingConfig = upload + } + } +} diff --git a/watch/licenses/LICENSE-fluent-emoji.txt b/watch/licenses/LICENSE-fluent-emoji.txt index 4142304..fc6fd7f 100644 --- a/watch/licenses/LICENSE-fluent-emoji.txt +++ b/watch/licenses/LICENSE-fluent-emoji.txt @@ -1 +1,23 @@ 3D icons in this folder are from Microsoft Fluent Emoji (https://github.com/microsoft/fluentui-emoji), licensed under the MIT License. Copyright (c) Microsoft Corporation. + +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/watch/watchface/build.gradle.kts b/watch/watchface/build.gradle.kts index 4de48b6..85b7ff9 100644 --- a/watch/watchface/build.gradle.kts +++ b/watch/watchface/build.gradle.kts @@ -16,4 +16,10 @@ android { versionCode = 1 versionName = "0.1" } + buildTypes.getByName("release") { + // 스킨 번들엔 dex 가 없어야 한다. R8 이 R 클래스까지 다 걷어내게 + isMinifyEnabled = true + // 스킨 XML 이 이름으로만 부르는 아이콘·글꼴을 안 쓰는 걸로 보고 지운다. 켜지 말 것 + isShrinkResources = false + } }