Skip to content

Commit

Permalink
Rename more properties (#1014)
Browse files Browse the repository at this point in the history
<!--
  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/foundry/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
  • Loading branch information
ZacSweers authored Oct 8, 2024
1 parent a0f7c37 commit 97e77a9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ We've restructured this project! Since its early days as a simple Gradle convent
#### Migration Guide

- Any **gradle properties** prefixed with `slack.` or `sgp.` have now moved to `foundry.`. `slack.gradle.` prefix have also removed the `gradle.` (i.e. `slack.gradle.foo` would now be `foundry.foo`).
- Some properties have been further refined to be more specific. Please look at `FoundryProperties` to see the full list.
- Package names have all aligned to `foundry.*`. In most cases it should be simple enough to replace `import com.slack.*` with `import foundry.*`.
- Gradle coordinates group have moved to the `com.slack.foundry` group name.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ internal constructor(

/** Indicates that this android library project has variants. Flag-only, value is ignored. */
public val libraryWithVariants: Boolean
get() = booleanProperty("foundry.gradle.config.libraryWithVariants")
get() = booleanProperty("foundry.android.libraryWithVariants")

/** Default namespace prefix for android proejcts if one isn't specified. */
public val defaultNamespacePrefix: String
Expand All @@ -82,48 +82,48 @@ internal constructor(
* is ignored.
*/
public val versionsPluginAllowUnstable: Boolean
get() = booleanProperty("foundry.gradle.config.versionsPluginAllowUnstable")
get() = booleanProperty("foundry.versionsPlugin.allowUnstable")

/** Opt-out flag to skip the androidx dependency check. Should only be used for debugging. */
public val skipAndroidxCheck: Boolean
get() = booleanProperty("foundry.gradle.skipAndroidXCheck")
get() = booleanProperty("foundry.skipAndroidXCheck")

/** Version code used for debug APK outputs. */
public val debugVersionCode: Int
get() = intProperty("foundry.gradle.debugVersionCode", 90009999)
get() = intProperty("foundry.android.debugVersionCode", 90009999)

/** User string used for debug APK outputs. */
public val debugUserString: String
get() = stringProperty("foundry.gradle.debugUserString", "debug")
get() = stringProperty("foundry.android.debugUserString", "debug")

/** Opt-in flag to enable snapshots repos, used for the dependencies build shadow job. */
public val enableSnapshots: Boolean
get() = booleanProperty("foundry.gradle.config.enableSnapshots")
get() = booleanProperty("foundry.gradle.enableSnapshots")

/** Opt-in flag to enable mavenLocal repos, used for local testing. */
public val enableMavenLocal: Boolean
get() = booleanProperty("foundry.gradle.config.enableMavenLocal")
get() = booleanProperty("foundry.gradle.enableMavenLocal")

/**
* Flag to indicate that this project should have no api dependencies, such as if it's solely an
* annotation processor.
*/
public val rakeNoApi: Boolean
get() = booleanProperty("foundry.gradle.config.rake.noapi")
get() = booleanProperty("foundry.rake.noapi")

/**
* 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
*/
public val enableAnalysisPlugin: Boolean
get() = booleanProperty("foundry.gradle.config.enableAnalysisPlugin")
get() = booleanProperty("foundry.enableAnalysisPlugin")

/**
* Flag to indicate this project should be exempted from platforms, usually platform projects
* themselves.
*/
public val noPlatform: Boolean
get() = booleanProperty("foundry.gradle.config.noPlatform")
get() = booleanProperty("foundry.config.noPlatform")

/** Property corresponding to the supported languages in GA builds */
public val supportedLanguages: String
Expand Down Expand Up @@ -183,7 +183,8 @@ internal constructor(
* Use a workaround for compose-compiler's `includeInformation` option on android projects.
*
* On android projects, the compose compiler gradle plugin annoyingly no-ops
* https://issuetracker.google.com/issues/362780328#comment4
*
* @see <a href="https://issuetracker.google.com/issues/362780328#comment4">Upstream issue</a>
*/
public val composeUseIncludeInformationWorkaround: Boolean
get() =
Expand Down Expand Up @@ -608,28 +609,27 @@ internal constructor(
* should otherwise be off.
*/
public val alwaysEnableResourcesInTests: Boolean
get() =
booleanProperty("foundry.gradle.config.test.alwaysEnableResources", defaultValue = false)
get() = booleanProperty("foundry.android.test.alwaysEnableResources", defaultValue = false)

/** Global toggle to enable bugsnag. Note this still respects variant filters. */
public val bugsnagEnabled: Provider<Boolean>
get() = resolver.booleanProvider("foundry.gradle.config.bugsnag.enabled")
get() = resolver.booleanProvider("foundry.android.bugsnag.enabled")

/** Branch pattern for git branches Bugsnag should be enabled on. */
public val bugsnagEnabledBranchPattern: Provider<String>
get() = resolver.optionalStringProvider("foundry.gradle.config.bugsnag.enabledBranchPattern")
get() = resolver.optionalStringProvider("foundry.android.bugsnag.enabledBranchPattern")

/** Global boolean that controls whether mod score is enabled on this project. */
public val modScoreGlobalEnabled: Boolean
get() = resolver.booleanValue("foundry.gradle.config.modscore.enabled")
get() = resolver.booleanValue("foundry.modscore.enabled")

/**
* Per-project boolean that allows for excluding this project from mod score.
*
* Note this should only be applied to projects that cannot be depended on.
*/
public val modScoreIgnore: Boolean
get() = resolver.booleanValue("foundry.gradle.config.modscore.ignore")
get() = resolver.booleanValue("foundry.modscore.ignore")

/** Experimental flag to enable logging thermal throttling on macOS devices. */
public val logThermals: Boolean
Expand Down Expand Up @@ -671,7 +671,7 @@ internal constructor(
/** Defines a required vendor for JDK toolchains. */
public val jvmVendor: Provider<String>
get() =
resolver.optionalStringProvider("foundry.config.jvmVendor").map {
resolver.optionalStringProvider("foundry.jvm.vendor").map {
if (jvmVendorOptOut) {
sneakyNull()
} else {
Expand All @@ -681,7 +681,7 @@ internal constructor(

/** Flag to disable JVM vendor setting locally. */
public val jvmVendorOptOut: Boolean
get() = booleanProperty("foundry.config.jvmVendor.optOut", defaultValue = false)
get() = booleanProperty("foundry.jvm.vendor.optOut", defaultValue = false)

/**
* Option to force a specific kotlin language version. By default defers to the KGP default the
Expand Down

0 comments on commit 97e77a9

Please sign in to comment.