Skip to content

Symbol File Upload

Symbol File Upload

Plugin Packaging Symbol Files

ft-plugin version 1.3.0 or higher is required to support the latest symbol file packaging rules, including productFlavor multi-version differentiated management. It is recommended to use generateSourceMapOnly = true to generate the symbol archive first, and then upload it via the public DataWay.

FTExt {
    // ...
    autoUploadMap = true
    autoUploadNativeDebugSymbol = true
    env = 'common'
    // nativeLibPath='/build/intermediates/merged_native_libs/release/out/lib'
    generateSourceMapOnly = true

    prodFlavors {
        prodTest {
            autoUploadMap = true
            autoUploadNativeDebugSymbol = true
            env = "gray"
            generateSourceMapOnly = true
        }
        prodPublish {
            autoUploadMap = true
            autoUploadNativeDebugSymbol = true
            env = "prod"
            generateSourceMapOnly = true
        }
    }
}

All symbol file related parameters are optional and can be enabled as needed. If the project contains multiple productFlavors, it is recommended to configure them separately within prodFlavors. Internal configurations will override outer parameters with the same name.

Parameter Name Type Default Value Description Use Cases
autoUploadMap Boolean false Whether to automatically package mapping.txt. Enable when R8 / Proguard obfuscation is enabled and Java / Kotlin stack trace restoration is needed.
autoUploadNativeDebugSymbol Boolean false Whether to automatically package Native symbol files. Enable when ft-native is integrated or C/C++ crash analysis is required.
env String Empty The environment to which the symbol files belong. Configure when distinguishing release environments like prod, gray, etc. is needed.
nativeLibPath String Auto-detected Native so file directory, should point to the parent path of each ABI directory. Configure when the default path detection fails or the so output directory is customized.
generateSourceMapOnly Boolean false Only generate the symbol archive, do not upload automatically. Example archive path: /app/build/tmp/ft{flavor}SourceMapMerge-release.zip. Supported in ft-plugin 1.3.4 and above. Recommended to enable, then upload via the public DataWay.
prodFlavors Closure Empty Configure upload parameters separately for different productFlavors. Use when multi-channel, multi-environment builds require uploading different symbol files.

nativeLibPath only needs to be specified up to the parent directory of the ABI directories, e.g., .../merged_native_libs/release/out/lib.

Manual or Script Upload

Use the plugin with generateSourceMapOnly = true enabled, execute the gradle task assembleRelease to generate, or manually package into a zip file, then upload the SourceMap via the public DataWay. It is recommended to use the zip command line for packaging to avoid including system hidden files in the zip archive.

For more details, please refer to:

For Unity Native Symbol files, please refer to the official documentation