plugins { id 'com.android.application' } android { namespace 'top.ouaone.workhours' compileSdk 34 defaultConfig { applicationId "top.ouaone.workhours" minSdk 23 targetSdk 34 versionCode 2 versionName "1.0.1" } signingConfigs { release { def keyFilePath = System.getenv("SIGNING_KEY_FILE") if (keyFilePath && file(keyFilePath).exists()) { storeFile file(keyFilePath) storePassword System.getenv("KEY_STORE_PASSWORD") ?: "workhours123" keyAlias System.getenv("ALIAS") ?: "workhours" keyPassword System.getenv("KEY_PASSWORD") ?: "workhours123" if (System.getenv("KEYSTORE_TYPE")) { storeType System.getenv("KEYSTORE_TYPE") } } } } lint { abortOnError false checkReleaseBuilds false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' def keyFilePath = System.getenv("SIGNING_KEY_FILE") if (keyFilePath && file(keyFilePath).exists()) { signingConfig signingConfigs.release } else { signingConfig signingConfigs.debug } } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } } dependencies { // 强制对齐 Kotlin 标准库依赖版本,消除 Duplicate class implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.22') implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.activity:activity:1.8.2' }