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.yml
# 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

FieldDescriptionRequired
nameExtension nameYes
packagePackage name for the extensionYes
version_codeVersion code (integer) for the extensionYes
version_nameVersion name (string) for the extensionYes
min_sdkMinimum Android SDK version supportedYes
authorThe name of the extension authorYes
proguardEnable/disable ProGuard optimization (true/false)No
R8Enable/disable R8 shrinker (true/false)No
kotlinEnable/disable Kotlin support (true/false)No
kotlin_versionKotlin version to use when kotlin is enabledNo
iconPath to the extension icon (relative to project root)No
dependenciesList of dependencies (.jar or .aar files) needed by the extensionNo
compile_timeDependencies needed only at compile time (excluded from final AIX)No
repositoriesMaven repositories for resolving remote dependenciesNo
excludesDependencies to exclude from the final AIXNo

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.