2026-05-31 19:13:12 +09:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
2026-06-28 17:16:59 +09:00
|
|
|
// 릴리스 서명: android/key.properties 가 있으면 사용, 없으면 디버그 서명으로 폴백.
|
|
|
|
|
def keystorePropsFile = rootProject.file("key.properties")
|
|
|
|
|
def keystoreProps = new Properties()
|
|
|
|
|
if (keystorePropsFile.exists()) {
|
|
|
|
|
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
|
|
|
|
}
|
|
|
|
|
def hasReleaseKeystore = keystorePropsFile.exists()
|
|
|
|
|
|
2026-05-31 19:13:12 +09:00
|
|
|
android {
|
|
|
|
|
namespace = "kr.sblog.slimbudget"
|
|
|
|
|
compileSdk = rootProject.ext.compileSdkVersion
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId "kr.sblog.slimbudget"
|
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
2026-06-29 21:42:05 +09:00
|
|
|
versionCode 2
|
|
|
|
|
versionName "1.0.1"
|
2026-05-31 19:13:12 +09:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
aaptOptions {
|
|
|
|
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
|
|
|
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
|
|
|
|
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-06-28 17:16:59 +09:00
|
|
|
signingConfigs {
|
|
|
|
|
if (hasReleaseKeystore) {
|
|
|
|
|
release {
|
|
|
|
|
storeFile rootProject.file(keystoreProps['storeFile'])
|
|
|
|
|
storePassword keystoreProps['storePassword']
|
|
|
|
|
keyAlias keystoreProps['keyAlias']
|
|
|
|
|
keyPassword keystoreProps['keyPassword']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-05-31 19:13:12 +09:00
|
|
|
buildTypes {
|
|
|
|
|
release {
|
2026-06-28 17:16:59 +09:00
|
|
|
// 키스토어가 있으면 릴리스 서명, 없으면 디버그 서명(로컬 테스트용)
|
|
|
|
|
signingConfig hasReleaseKeystore ? signingConfigs.release : signingConfigs.debug
|
2026-05-31 19:13:12 +09:00
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
flatDir{
|
|
|
|
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
|
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
|
|
|
|
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
|
|
|
|
implementation project(':capacitor-android')
|
|
|
|
|
testImplementation "junit:junit:$junitVersion"
|
|
|
|
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
|
|
|
implementation project(':capacitor-cordova-android-plugins')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply from: 'capacitor.build.gradle'
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
def servicesJSON = file('google-services.json')
|
|
|
|
|
if (servicesJSON.text) {
|
|
|
|
|
apply plugin: 'com.google.gms.google-services'
|
|
|
|
|
}
|
|
|
|
|
} catch(Exception e) {
|
|
|
|
|
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
|
|
|
}
|