Skip to content

Commit

Permalink
v0.2.13+45 subcontract builder
Browse files Browse the repository at this point in the history
  • Loading branch information
cabbagelol committed Dec 26, 2024
1 parent ae66924 commit 1882458
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ android {
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {
abiFilters "arm64-v8a"
abiFilters 'armeabi', 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
}
manifestPlaceholders = [
JPUSH_PKGNAME: "com.cabbagelol.bfban",
JPUSH_APPKEY : "966c3770c8bb47ffcbaacff1", // NOTE: JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL: "developer-default", // 暂时填写默认值即可.
JPUSH_CHANNEL: "developer-default", // Default Value.
]
}

Expand Down Expand Up @@ -94,4 +90,16 @@ android {

flutter {
source '../..'
}

ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3]
import com.android.build.OutputFile

android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (abiVersionCode != null) {
output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode
}
}
}
2 changes: 1 addition & 1 deletion script/build-v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ echo "===================== start build ====================="
echo "正在构建$platform..."
case "$platform" in
1)
flutter build apk lib/main.prod.dart --release --build-name "$input_version_name" --build-number "$version"
flutter build apk lib/main.prod.dart --release --split-per-abi --build-name "$input_version_name" --build-number "$version"
;;
2)
flutter build appbundle lib/main.prod.dart --release --build-name "$input_version_name" --build-number "$version" --target-platform android-arm,android-arm64,android-x64
Expand Down

0 comments on commit 1882458

Please sign in to comment.