FoundryProperties

(Mostly Gradle) properties for configuration of Foundry Gradle Plugin.

Order attempted as described by PropertyResolver.providerFor.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A comma-separated list of configurations to use in affected project detection.

Link copied to clipboard

Optional file location for an affected_projects.txt file that contains a list of projects affected in this build.

Link copied to clipboard
val allowWarnings: Provider<Boolean>

Opt out for -Werror.

Link copied to clipboard

Opt out for -Werror in tests.

Link copied to clipboard

Always enables resources in android unit tests. Only present for benchmarking purposes and should otherwise be off.

Link copied to clipboard

Anvil generator projects that should always be included when Anvil is enabled.

Link copied to clipboard

Defines the AnvilMode to use with this compilation. See the docs on that class for more details.

Link copied to clipboard

Anvil runtime projects that should always be included when Anvil is enabled.

Link copied to clipboard

Flag to enable use of the Anvil KSP fork. https://github.com/ZacSweers/anvil

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val bugsnagEnabled: Provider<Boolean>

Global toggle to enable bugsnag. Note this still respects variant filters.

Link copied to clipboard

Branch pattern for git branches Bugsnag should be enabled on.

Link copied to clipboard

Optional override for buildToolsVersion in Android projects. Sometimes temporarily necessary to pick up new fixes.

Flag to, when true, makes affectedProjectConfigurations build upon the defaults rather than replace them.

Link copied to clipboard

Flag to enable ciLint on a project. Default is true.

Link copied to clipboard

Comma-separated list of CI lint variants to run (Android only). Default when unspecified will lint all variants.

Link copied to clipboard

Flag to enable ciUnitTest on this project. Default is true.

Link copied to clipboard

If enabled, applies the kotlinx-kover plugin to projects using ciUnitTest.

Link copied to clipboard

CI unit test variant (Android only). Defaults to release.

Link copied to clipboard
Link copied to clipboard

Common compose compiler options.

Link copied to clipboard

Enables live literals. Note that they are disabled by default due to https://issuetracker.google.com/issues/274207650 and https://issuetracker.google.com/issues/274231394.

By default, Compose on android only enables source information in debug variants. This is a bit silly in large projects because we generally make all libraries single-variant as "release", and can result in libraries not having source information. Instead, we rely on R8 to strip out this information in release builds as needed.

Link copied to clipboard
val composeStabilityConfigurationPath: Provider<RegularFile>

Relative path to a Compose stability configuration file from the root project.

Link copied to clipboard

Use a workaround for compose-compiler's includeInformation option on android projects.

Link copied to clipboard

Enables verbose debug logging across the plugin.

Link copied to clipboard

User string used for debug APK outputs.

Link copied to clipboard

Version code used for debug APK outputs.

Link copied to clipboard

An alias name to a libs.versions.toml bundle for common Android Compose dependencies that should be added to android projects with compose enabled

Link copied to clipboard

Default namespace prefix for android projects if one isn't specified.

Link copied to clipboard

Default package prefix for JVM projects if one isn't specified.

Link copied to clipboard

Detekt baseline file, evaluated from project.layout.projectDirectory.file(...).

Link copied to clipboard

Detekt config files, evaluated from rootProject.file(...).

Link copied to clipboard

Force-disables Anvil regardless of FoundryExtension.dagger() settings, useful for K2 testing where Anvil is unsupported.

Link copied to clipboard

Variants that should be disabled in a given subproject.

Link copied to clipboard

Enables eager configuration of SgpArtifact publishing in subprojects. This is behind a flag as a failsafe while we try different approaches to allow lenient resolution.

Link copied to clipboard

Flag to enable the Gradle Dependency Analysis Plugin, which is disabled by default due to https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/204

Link copied to clipboard

Android cache fix plugin.

Link copied to clipboard

Opt-in for beta SGP features.

Link copied to clipboard

Enables full detekt mode (with type resolution). Off by default due to performance issues.

Link copied to clipboard

Flag to enable kapt in tests. By default these are disabled due to this undesirable (but surprisingly intented) behavior of running kapt + stub generation even if no processors are present.

Link copied to clipboard

Flag to enable/disable KSP.

Link copied to clipboard

At the time of writing, AGP does not support running lint on com.android.test projects. This is a flag to eventually support this in the future.

Link copied to clipboard

Opt-in flag to enable mavenLocal repos, used for local testing.

Link copied to clipboard

Flag to enable/disable Moshi-IR.

Link copied to clipboard

Opt-in flag to enable snapshots repos, used for the dependencies build shadow job.

Link copied to clipboard

Flag for Error-Prone auto-patching. Enable when running an auto-patch of EP, such as when it's being introduced to a new module or upgrading EP itself.

Link copied to clipboard

Error-Prone checks that should be considered errors.

Link copied to clipboard

Log Foundry extension configuration state verbosely.

Link copied to clipboard

Opt-in path for commit hooks in the consuming repo that should be automatically installed automatically. This is passed into org.gradle.api.Project.file from the root project.

Link copied to clipboard

Opt-in path for a pre-commit hook in the consuming repo that should be automatically installed automatically. This is passed into org.gradle.api.Project.file from the root project.

Link copied to clipboard

Flag to indicate whether this project is a test library (such as test utils, test fixtures, etc).

Link copied to clipboard

Optional link to JDK configuration

Link copied to clipboard

Optional error message to show when the JDK configuration is invalid.

Link copied to clipboard
val jvmVendor: Provider<String>

Defines a required vendor for JDK toolchains.

Link copied to clipboard

Flag to disable JVM vendor setting locally.

Link copied to clipboard
val kaptLanguageVersion: Provider<KotlinVersion>

Overrides the kotlin language version if present.

Link copied to clipboard

The project-specific kotlin.daemon.jvmargs computed by bootstrap.

Link copied to clipboard
val kotlinFreeArgs: Provider<List<String>>

Free compiler arguments to pass to Kotlin's freeCompilerArgs property in all compilations. Should not include opt-in arguments or -progressive.

Link copied to clipboard
val kotlinJvmFreeArgs: Provider<List<String>>

Free compiler arguments to pass to Kotlin's freeCompilerArgs property in JVM compilations. Should not include opt-in arguments or -progressive.

Link copied to clipboard

Option to force a specific kotlin language version. By default defers to the KGP default the build is running with.

Link copied to clipboard
val kotlinOptIn: Provider<List<String>>

Opt-in annotations to pass to Kotlin's optIn property.

Link copied to clipboard
val kotlinProgressive: Provider<Boolean>

Default for Kotlin's progressive mode. Defaults to enabled.

Link copied to clipboard

Flag to connect SqlDelight sources to KSP.

Link copied to clipboard

Flag to connect ViewBinding sources to KSP.

Link copied to clipboard

Indicates that this android library project has variants. Flag-only, value is ignored.

Link copied to clipboard

File name to use for a project's lint baseline.

Link copied to clipboard

Flag to control whether or not lint checks test sources.

Link copied to clipboard

Flag to enable errors only in lint checks.

Link copied to clipboard

Flag to control whether or not lint checks ignores test sources.

Link copied to clipboard

Flag to control which agp version should be used for lint. Optional. Value should be a version key in libs.versions.toml,

Link copied to clipboard

Experimental flag to enable logging thermal throttling on macOS devices.

Link copied to clipboard

Global boolean that controls whether mod score is enabled on this project.

Link copied to clipboard

Per-project boolean that allows for excluding this project from mod score.

Link copied to clipboard

Flag to enable/disable moshi proguard rule gen.

Link copied to clipboard

Ndk version to use for android projects.

Link copied to clipboard

Flag to indicate this project should be exempted from platforms, usually platform projects themselves.

Link copied to clipboard

Flag for Nullaway baselining. When enabled along with errorProneAutoPatch, existing nullability issues will be baselined with a castToNonNull call to wrap it.

Link copied to clipboard

Gradle path to a platform project to be referenced by other projects.

Link copied to clipboard

Flag to indicate that this project should have no api dependencies, such as if it's solely an annotation processor.

Link copied to clipboard

Performance optimization to relocate the entire project build directory to a location outside the IDE's view. This prevents the IDE from tracking these files and improves IDE performance.

Link copied to clipboard

Location for robolectric-core to be referenced by app. Temporary till we have a better solution for "always add these" type of deps.

Link copied to clipboard

Property corresponding to the preinstrumented jars version (the -i2 suffix in jars).

Link copied to clipboard

Property corresponding to the SDK versions we test in Robolectric tests. Its value should be a comma-separated list of SDK ints to download.

Link copied to clipboard

Opt-out flag to skip the androidx dependency check. Should only be used for debugging.

Link copied to clipboard

Comma-separated set of projects to ignore in sorting dependencies.

Link copied to clipboard

Flag to enable strict JDK mode, forcing some things like JAVA_HOME.

Link copied to clipboard

Global control for enabling stricter validation of projects, such as ensuring Kotlin projects have at least one .kt source file.

Link copied to clipboard

Specific toggle for validating manifests in androidTest sources.

Link copied to clipboard

Property corresponding to the supported languages in GA builds

Link copied to clipboard

Property corresponding to the supported languages in Beta builds

Link copied to clipboard

Property corresponding to the supported languages in Internal builds

Link copied to clipboard
val testRetryMaxFailures: Provider<Int>
Link copied to clipboard
val testRetryMaxRetries: Provider<Int>
Link copied to clipboard

Flag to enable verbose logging in unit tests.

Link copied to clipboard

Controls how often to fork the JVM in unit tests. Default is 1000.

Link copied to clipboard

Parallelism multiplier to use for unit tests. This should be a float value that is multiplied by the number of cores. The value can be a fraction. Default is 0.5.

Link copied to clipboard

Flag for enabling test orchestrator.

Link copied to clipboard

When this property is present, the "internalRelease" build variant will have an application id of "com.Slack.prototype", instead of "com.Slack.internal".

Link copied to clipboard

Enables verbose logging in miscellaneous places of SGP. This is intended to be a less noisy alternative to running gradle with --info or --debug.

Link copied to clipboard

Property corresponding to the file path of a custom versions.json file for use with dependencies shadow jobs.

Link copied to clipboard

Indicates that the gradle versions plugin should allow unstable versions. By default, unstable versions are excluded due to the frequent androidx alpha/beta/rc cycle noise. Flag-only, value is ignored.

Functions

Link copied to clipboard
fun latestCompileSdkWithSources(defaultValue: Int): Int