Build script QoL update

- make.dart: Added an alias "apk" for "android"
- Prevent reading commit message s.t. commit counting will not malfunction on Windows
- build.gradle: Check key.properties and storeFile prior to building
- build.gradle: Do not specify abiFilters when --split-per-abi is specified via CLI
This commit is contained in:
PaperCube
2024-02-22 12:31:23 +00:00
parent 2993e1236a
commit 37dc1056c9
3 changed files with 15 additions and 6 deletions

View File

@@ -16,6 +16,12 @@ def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
System.err.printf(" [!] key.properties not found in %s (%s). Build will fail. \n", rootProject, rootProject.file('.'))
}
if (keystoreProperties['storeFile'] == null || !file(keystoreProperties['storeFile']).exists()) {
System.err.printf(" [!] storeFile defined in key.properties does not exist in %s. Build will fail. \n", file('.'))
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
@@ -57,7 +63,9 @@ android {
versionName flutterVersionName
ndk {
abiFilters 'arm64-v8a'
if(!splits.abi.enable) { // abiFilters cannot be present when splits abi filters are set
abiFilters 'arm64-v8a', 'armeabi-v7a'
}
}
}

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 771;
static const String engine = "3.19.0";
static const String buildAt = "2024-02-20 16:12:21";
static const int build = 773;
static const String engine = "3.19.1";
static const String buildAt = "2024-02-22 11:55:07";
static const int modifications = 8;
static const int script = 38;
}

View File

@@ -21,6 +21,7 @@ var regAppleMarketVer = RegExp(r'MARKETING_VERSION = .+');
const buildFuncs = {
'ios': flutterBuildIOS,
'android': flutterBuildAndroid,
'apk': flutterBuildAndroid,
'mac': flutterBuildMacOS,
'linux': flutterBuildLinux,
'win': flutterBuildWin,
@@ -29,7 +30,7 @@ const buildFuncs = {
int? build;
Future<void> getGitCommitCount() async {
final result = await Process.run('git', ['log', '--oneline']);
final result = await Process.run('git', ['log', '--format=format:%h']);
build = (result.stdout as String)
.split('\n')
.where((line) => line.isNotEmpty)
@@ -42,7 +43,7 @@ Future<int> getScriptCommitCount() async {
exit(1);
}
final result =
await Process.run('git', ['log', '--oneline', shellScriptPath]);
await Process.run('git', ['log', '--format=format:%h', shellScriptPath]);
return (result.stdout as String)
.split('\n')
.where((line) => line.isNotEmpty)