diff --git a/app/build.gradle b/app/build.gradle index 18bd8c0..14e9e13 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'com.android.application' android { compileSdk 33 buildToolsVersion '33.0.0' - defaultConfig { applicationId "com.rehome.sbcksyy" minSdkVersion 24 @@ -18,13 +17,26 @@ android { abiFilters 'armeabi-v7a','arm64-v8a' } } - buildFeatures { viewBinding = true + buildConfig = true + } + signingConfigs { + release { + keyAlias 'key0' + storeFile file('../key/keystore1') + storePassword 'abc123123' + keyPassword 'abc123123' + v1SigningEnabled true //是否开启V1签名 + v2SigningEnabled true //是否开启V2签名 + } } - /* keypassword:abc123123 alias key0*/ buildTypes { + debug { + minifyEnabled false + buildConfigField "boolean", "LOG_ERROR", "true" + } debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -39,7 +51,8 @@ android { zipAlignEnabled true // 对齐zip debuggable false // 是否debug proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - buildConfigField("boolean","LOG_ERROR","false") + buildConfigField "boolean", "LOG_ERROR", "false" + signingConfig signingConfigs.release // 打包签名信息 //修改生成的apk名字 android.applicationVariants.all { variant -> variant.outputs.all { @@ -56,8 +69,8 @@ android { } namespace 'com.rehome.sbcksyy' compileOptions { - targetCompatibility JavaVersion.VERSION_11 - sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaVersion.VERSION_17 } } diff --git a/build.gradle b/build.gradle index 1990bb8..e5cc5e8 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' + classpath 'com.android.tools.build:gradle:8.1.0' classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.1' // NOTE: Do not place your application dependencies here; they belong