generated from pancake-llc/package
-
Notifications
You must be signed in to change notification settings - Fork 16
build
yenmoc edited this page Feb 18, 2024
·
3 revisions
Android build pipeline setting. Now only support for Android platform
-
Environment
- Development : for builds during development or for testing
- Production : for builds will be publish to the Google Play Store
-
Compress Option
- LZ4 : Should be used for development because it builds faster than LHZHC due to less compression
- LZ4HC : (LZ4 high compression) Recommended for release builds as it compresses more than LZ4 resulting in a lighter build size than LZ4.
LZ4(HC) is "Chunk Based" Compression. It does not require the entire bundle to be decompressed before use like LZMA
-
Build Type
- APK
- AAB : App Bundle
-
Build System
- Gradle : Currently only using gradle, other build types are no longer used
-
Custom Main Gradle
- If this option is enabled then the
mainTemplate.gradle
file is generated in the Plugins folder . The library files will be added during the build process according to the specifications listed inmainTemplate.gradle
. You need toforce resolve
to automatically add installation specifiers for necessary libraries added tomainTemplate.gradle
. Theforce resolve
option is found through the External Dependency Manager menu
- If this option is enabled then the
- If this option is disabled, you need to generate additional libraries manually via force resolve. At this point, the libraries will be added to the project without having to wait until the build time. If you force resolve before building like that, we will need to turn off the Enable Resolution On Build option in EDM4U's settings.
-
Optimized Frame Facing
- According to unity document enable this option to allow Unity to evenly distribute frames for less variance in framerate, creating a smoother gameplay. But it also results in the FPS not being set up exactly as desired on the device and causing frame stuttering or crash. see here
-
Min API Target
- The lowest Android OS to be able to install this application. For now it will be set at API level 23 (Android 6) to use integrity protection of Google Play Console
-
Max API Target
- Highest Android OS to be able to install this application
-
Version Number
- Semantic Version :
<major>.<minor>.<patch>
ex : 1.0.1 - Major increases when the API breaks backward compatibility.
- Minor increases when the API adds new features without breaking backward compatibility.
- Patch increases when the API changes small things like fixing bugs or refactoring.
- Semantic Version :
-
Custom Keystore
- Use specific keystore instead of Debugging keystore
-
Verify Process
- Specify the necessary conditions that need to be verified before a build can be made.
- There are currently 4 added processes available. You can create additional processes by creating a class (it should be placed in the Editor because it is not needed when building) that inherits from
IVerifyBuildProcess
Here is an example of how to use IVerifyBuildProcess
using Pancake;
using Pancake.ExLibEditor;
using UnityEditor;
using UnityEngine;
namespace PancakeEditor
{
public class KeystoreVerify : IVerifyBuildProcess
{
public bool OnVerify()
{
var s = AndroidBuildPipelineSettings.Instance;
if (s.environment == AndroidBuildPipelineSettings.Environment.Development && s.customKeystore ||
s.environment == AndroidBuildPipelineSettings.Environment.Production)
{
if (string.IsNullOrEmpty(s.keystorePath) || string.IsNullOrEmpty(s.alias) || string.IsNullOrEmpty(s.password) || string.IsNullOrEmpty(s.aliasPassword))
{
EditorUtility.DisplayDialog("Keystore", "Keystore infomation can not be empty!\nPlease enter correct and try again!", "Ok");
return false;
}
}
return true;
}
public void OnComplete(bool status)
{
Debug.Log(status ? "[Keystore] Verify Success".TextColor(Uniform.Green) : "[Keystore] Verify Failure".TextColor(Uniform.Red));
}
}
}