mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
fix #9
This commit is contained in:
@@ -4,6 +4,8 @@ plugins {
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
ext.abiCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86_64": 3]
|
||||
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
@@ -33,6 +35,15 @@ android {
|
||||
compileSdk flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
splits{
|
||||
abi {
|
||||
reset()
|
||||
include 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
||||
enable true
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
@@ -68,7 +79,25 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
|
||||
}
|
||||
signingConfig signingConfigs.release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
def abi = output.getFilter(com.android.build.OutputFile.ABI)
|
||||
if (abi != null) {
|
||||
outputFileName = "pixes-${variant.versionName}-${abi}.apk"
|
||||
def abiVersionCode = project.ext.abiCodes.get(abi)
|
||||
if (abiVersionCode != null) {
|
||||
versionCodeOverride = variant.versionCode * 10 + abiVersionCode
|
||||
}
|
||||
} else {
|
||||
outputFileName = "pixes-${variant.versionName}.apk"
|
||||
versionCodeOverride = variant.versionCode * 10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user