You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.7 KiB
Groovy

2 years ago
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.rehome.destop"
minSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2 years ago
resValue "string", "authorities", "com.rehome.destop"
}
buildFeatures {
buildConfig = true
2 years ago
}
signingConfigs {
debug {
storeFile file("/Users/admin/sign/platform.keystore")
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
2 years ago
release {
keyAlias 'androiddebugkey'
storeFile file('../key/platform.keystore')
storePassword 'android'
keyPassword 'android'
v1SigningEnabled true //是否开启V1签名
v2SigningEnabled true //是否开启V2签名
}
2 years ago
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2 years ago
shrinkResources false //是否清理无用资源,依赖于minifyEnabled
zipAlignEnabled false //是否启用zipAlign压缩
signingConfig signingConfigs.release // 打包签名信息
//修改生成的apk名字
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "destop.apk"
}
};
2 years ago
}
debug {
debuggable true
minifyEnabled false //不启用Proguard
shrinkResources false //是否清理无用资源,依赖于minifyEnabled
zipAlignEnabled false //是否启用zipAlign压缩
signingConfig signingConfigs.debug
2 years ago
//修改生成的apk名字
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "destop.apk"
}
};
2 years ago
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.zhy:autolayout:1.4.5'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}