apply plugin: 'com.android.application' // 버전 정보를 properties 파일에서 동적으로 로드 def versionPropsFile = rootProject.file('version.properties') def versionProps = new Properties() if (versionPropsFile.exists()) { versionPropsFile.withInputStream { stream -> versionProps.load(stream) } } def versionName = versionProps['versionName'] ?: "1.1.1.2" def versionCode = (versionProps['versionCode'] ?: "6").toInteger() def buildNumber = (versionProps['buildNumber'] ?: "6").toInteger() // 버전 정보 로깅 println "버전 정보 로드: versionName=${versionName}, versionCode=${versionCode}, buildNumber=${buildNumber}" // 버전 정보를 직접 설정 android { namespace "com.lovable.zellyfinance" compileSdk rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.lovable.zellyfinance" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode versionCode versionName versionName // 빌드 번호 추가 - BuildConfig 필드로 정의 buildConfigField "int", "BUILD_NUMBER", buildNumber.toString() 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:!*~' } } // 서명 설정 추가 signingConfigs { release { storeFile file('/Users/hansoo./Dev/keys/google-key') storePassword "djqrP1dnl#" keyAlias "key0" keyPassword "aplfarm99##" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { minifyEnabled false debuggable true } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } buildFeatures { buildConfig true } } 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') // 스플래시 화면 플러그인 추가 implementation "androidx.core:core-splashscreen:1.0.0" } 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") }