build method
Implementation
@override
Future build(String root) async {
// final keyPropertyFile = File(join(root, 'android', 'key.properties'));
// if (await keyPropertyFile.exists()) {
// await keyPropertyFile.delete(recursive: true);
// }
// final keyPropertyContent = '''
// storePassword=winer2023
// keyPassword=winer2023
// keyAlias=upload
// storeFile=/Users/king/android_keys/winner-metaapp-keystore.jks
// ''';
// await keyPropertyFile.create();
// await keyPropertyFile.writeAsString(keyPropertyContent);
// final localPropertyFile = File(join(root, 'android', 'local.properties'));
// if (await localPropertyFile.exists()) {
// await localPropertyFile.delete(recursive: true);
// }
// final localPropertyContent = '''
// sdk.dir=/Users/king/Library/Android/sdk
// flutter.sdk=/Users/king/fvm/versions/3.13.2
// ndk.dir=/Users/king/Documents/2021.3.16f1c1/PlaybackEngines/AndroidPlayer/NDK
// flutter.buildMode=debug
// flutter.versionName=1.0.0
// flutter.versionCode=1701424978
// flutter.compileSdkVersion=32
// flutter.minSdkVersion=20
// ''';
// await localPropertyFile.create();
// await localPropertyFile.writeAsString(localPropertyContent);
await AddUmengPushConfig(
root: root,
umengAppKey: environment.umengPushEnvironment.umengAppKey,
umengMessageSecret: environment.umengPushEnvironment.umengMessageSecret,
umengChannel: environment.umengPushEnvironment.umengChannel,
).add();
await SetVersionBuildNumber(environment: environment).runInAndroid();
/**
* WROKSPACE=$PWD
cd $WROKSPACE/metaapp_flutter
fvm flutter clean
fvm flutter pub get
cd $WROKSPACE/android
./gradlew clean
./gradlew assembleRelease
*/
await Shell(workingDirectory: '${environment.workspace}/metaapp_flutter')
.run('''
fvm flutter clean
fvm flutter pub get
''');
await Shell(workingDirectory: '${environment.workspace}/android').run('''
./gradlew clean
./gradlew assembleRelease
''');
// await BuildApp(
// platform: BuildPlatform.android,
// root: root,
// buildName: environment.buildName,
// buildNumber: environment.buildNumber,
// ).build();
}