plugins { id 'com.android.application' } def build = rootProject.ext.build def sign = rootProject.ext.sign android { signingConfigs { release { storeFile file(sign.storeFile) keyAlias sign.keyAlias keyPassword sign.keyPassword storePassword sign.storePassword } } compileSdkVersion build.compileSdkVersion defaultConfig { applicationId build.applicationId minSdkVersion build.minSdkVersion targetSdkVersion build.targetSdkVersion versionCode build.versionCode versionName build.versionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' // 条码二维码 implementation project(path: ':zxingscanview') testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' }