Compare commits
4
Commits
7ab13dd4de
..
1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07447a2ffe | ||
|
|
6627ab46e8 | ||
|
|
79d9da8285 | ||
|
|
03f9e2fa56 |
No files matched your search
@@ -15,6 +15,8 @@ android {
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
@@ -40,10 +42,30 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
getByName("release") {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
|
||||
/// 20260928 - Without minifying.
|
||||
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (17.2MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (19.8MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (21.2MB)
|
||||
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
|
||||
/// 20260928 - With minifying, helped some, but also used
|
||||
/// in combination with `--obfuscate --split-debug-info=./debug-info/`
|
||||
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (16.1MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (18.8MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (20.3MB)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
Whitespace-only changes.
@@ -1,5 +1,5 @@
|
||||
AuthorName: 'Chad Michael "Hyperling" Greenwood'
|
||||
AuthorEmail: 'me@hyperling.com'
|
||||
AuthorEmail: 'me+sunset@hyperling.com'
|
||||
AuthorWebSite: 'https://hyperling.com/about/'
|
||||
Donate: 'https://hyperling.com/donate/'
|
||||
Liberapay: 'HyperVegan'
|
||||
|
||||
+49
-11
@@ -15,6 +15,7 @@ function log {
|
||||
function clean_flutter {
|
||||
log "Cleaning..."
|
||||
flutter clean
|
||||
echo "Done!"
|
||||
}
|
||||
|
||||
## Variables ##
|
||||
@@ -41,12 +42,23 @@ fi
|
||||
RELEASE="release/$name-$version"
|
||||
echo "Running for '$RELEASE'."
|
||||
|
||||
BUILD_OPTIONS=(
|
||||
--release
|
||||
--obfuscate
|
||||
--split-debug-info=./debug-info/
|
||||
--extra-gen-snapshot-options="--strip"
|
||||
)
|
||||
|
||||
## Main ##
|
||||
|
||||
clean_flutter
|
||||
|
||||
# Linux
|
||||
|
||||
log "Building Linux Bundle..."
|
||||
flutter build linux
|
||||
set -x
|
||||
flutter build linux ${BUILD_OPTIONS[@]}
|
||||
set +x
|
||||
|
||||
log "Saving Linux Bundle..."
|
||||
filename=$RELEASE.linux-bundle.zip
|
||||
@@ -56,15 +68,41 @@ fi
|
||||
zip -r $filename build/linux/x64/release/bundle/*
|
||||
ls -sh $filename
|
||||
|
||||
clean_flutter
|
||||
# Android
|
||||
|
||||
log "Building APK..."
|
||||
flutter build apk
|
||||
log "Building Universal APK..."
|
||||
# Creates a generic (and large) app-release.apk
|
||||
set -x
|
||||
flutter build apk ${BUILD_OPTIONS[@]}
|
||||
set +x
|
||||
|
||||
log "Saving APK..."
|
||||
filename=$RELEASE.apk
|
||||
if [[ -e $filename ]]; then
|
||||
rm -v $filename
|
||||
fi
|
||||
cp -v build/app/outputs/flutter-apk/app-release.apk $filename
|
||||
ls -sh $filename
|
||||
#log "Saving Universal APK..."
|
||||
#apk="build/app/outputs/flutter-apk/app-release.apk"
|
||||
#filename=`basename $apk`
|
||||
#filename=${filename//app/${RELEASE}}
|
||||
#if [[ -e $filename ]]; then
|
||||
# rm -v $filename
|
||||
#fi
|
||||
#cp -v "$apk" "$filename"
|
||||
#ls -sh "$filename"
|
||||
|
||||
log "Building Individual APKs..."
|
||||
# Creates files such as build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
|
||||
set -x
|
||||
flutter build apk ${BUILD_OPTIONS[@]} --split-per-abi
|
||||
set +x
|
||||
|
||||
log "Saving APKs..."
|
||||
for apk in `ls build/app/outputs/flutter-apk/app*release.apk`; do
|
||||
#if [[ "$apk" == *"x86"* ]]; then echo "Skipping $apk" continue; fi
|
||||
#log "APK: $apk"
|
||||
filename=`basename $apk`
|
||||
filename=${filename//app/${RELEASE}}
|
||||
cp -v "$apk" "$filename"
|
||||
ls -sh "$filename"
|
||||
echo " "
|
||||
done
|
||||
|
||||
# Finish
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user