Configuration
Instead of traditional build configurations and minimum Android SDK requirements, FAST uses a config file called fast.yml
. This file manages everything, including external libraries and assets required by your extension.
# FAST configuration file # Component information name: MyExtension package: com.example.myextension version_code: 1 version_name: 1.0 min_sdk: 19 author: Your Name # Build options proguard: true R8: false kotlin: false kotlin_version: 1.8.0 # Files icon: icon.png # Dependencies dependencies: - guava-31.1-android.jar - design-support-28.0.0.aar # Compile-time dependencies (will be excluded from the final AIX) compile_time: - org.jetbrains.kotlin:kotlin-stdlib:1.8.0 # Repositories for remote dependencies repositories: - https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven # Excluded dependencies excludes: - javax.annotation:javax.annotation-api
Supported Fields
Field | Description | Required |
---|---|---|
name | Extension name | Yes |
package | Package name for the extension | Yes |
version_code | Version code (integer) for the extension | Yes |
version_name | Version name (string) for the extension | Yes |
min_sdk | Minimum Android SDK version supported | Yes |
author | The name of the extension author | Yes |
proguard | Enable/disable ProGuard optimization (true/false) | No |
R8 | Enable/disable R8 shrinker (true/false) | No |
kotlin | Enable/disable Kotlin support (true/false) | No |
kotlin_version | Kotlin version to use when kotlin is enabled | No |
icon | Path to the extension icon (relative to project root) | No |
dependencies | List of dependencies (.jar or .aar files) needed by the extension | No |
compile_time | Dependencies needed only at compile time (excluded from final AIX) | No |
repositories | Maven repositories for resolving remote dependencies | No |
excludes | Dependencies to exclude from the final AIX | No |
Note
Dependencies and assets specified in fast.yml must be placed in the deps
and assets
directories, respectively.
Dependencies Management
Local dependencies are JAR or AAR files that are stored in your project's deps
directory. To use them, simply list them in the dependencies
section of your fast.yml
file:
dependencies: - guava-31.1-android.jar - design-support-28.0.0.aar
Make sure the files listed here are actually present in your deps
directory.
Excluding Dependencies
Sometimes you may want to exclude certain dependencies from your extension to reduce its size. You can do this by listing them in the excludes
section:
excludes: - javax.annotation:javax.annotation-api
Kotlin Support
FAST supports Kotlin for extension development. To enable it, set kotlin: true
in your fast.yml
file:
kotlin: true kotlin_version: 1.8.0
When enabling Kotlin, you should also specify the Kotlin version to use. After changing the Kotlin settings, run fast sync
to update your project.
ProGuard and R8 Optimization
FAST provides built-in support for code optimization and obfuscation using either ProGuard or R8 shrinker. You can enable them in your fast.yml
file:
# For ProGuard proguard: true R8: false # Or for R8 shrinker proguard: false R8: true
You can also customize the optimization settings by modifying the ProGuard rules file (proguard-rules.pro)
located in your project's src
directory.