mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
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:
@@ -16,6 +16,12 @@ def keystoreProperties = new Properties()
|
|||||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
if (keystorePropertiesFile.exists()) {
|
if (keystorePropertiesFile.exists()) {
|
||||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
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')
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
@@ -57,7 +63,9 @@ android {
|
|||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'arm64-v8a'
|
if(!splits.abi.enable) { // abiFilters cannot be present when splits abi filters are set
|
||||||
|
abiFilters 'arm64-v8a', 'armeabi-v7a'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 771;
|
static const int build = 773;
|
||||||
static const String engine = "3.19.0";
|
static const String engine = "3.19.1";
|
||||||
static const String buildAt = "2024-02-20 16:12:21";
|
static const String buildAt = "2024-02-22 11:55:07";
|
||||||
static const int modifications = 8;
|
static const int modifications = 8;
|
||||||
static const int script = 38;
|
static const int script = 38;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ var regAppleMarketVer = RegExp(r'MARKETING_VERSION = .+');
|
|||||||
const buildFuncs = {
|
const buildFuncs = {
|
||||||
'ios': flutterBuildIOS,
|
'ios': flutterBuildIOS,
|
||||||
'android': flutterBuildAndroid,
|
'android': flutterBuildAndroid,
|
||||||
|
'apk': flutterBuildAndroid,
|
||||||
'mac': flutterBuildMacOS,
|
'mac': flutterBuildMacOS,
|
||||||
'linux': flutterBuildLinux,
|
'linux': flutterBuildLinux,
|
||||||
'win': flutterBuildWin,
|
'win': flutterBuildWin,
|
||||||
@@ -29,7 +30,7 @@ const buildFuncs = {
|
|||||||
int? build;
|
int? build;
|
||||||
|
|
||||||
Future<void> getGitCommitCount() async {
|
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)
|
build = (result.stdout as String)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.where((line) => line.isNotEmpty)
|
.where((line) => line.isNotEmpty)
|
||||||
@@ -42,7 +43,7 @@ Future<int> getScriptCommitCount() async {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
final result =
|
final result =
|
||||||
await Process.run('git', ['log', '--oneline', shellScriptPath]);
|
await Process.run('git', ['log', '--format=format:%h', shellScriptPath]);
|
||||||
return (result.stdout as String)
|
return (result.stdout as String)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.where((line) => line.isNotEmpty)
|
.where((line) => line.isNotEmpty)
|
||||||
|
|||||||
Reference in New Issue
Block a user