Skip to content

Commit

Permalink
Start organizing docs better for new foundry structure (#1035)
Browse files Browse the repository at this point in the history
Still just a first pass but a start!

Fixes
[this](https://github.com/slackhq/foundry/actions/runs/11350595674/job/31569522435)
along the way

<!--
  ⬆ 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 15, 2024
1 parent 1045041 commit f709582
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 26 deletions.
5 changes: 2 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This includes a whole host of things!
- Platforms and BOM dependencies (see "Platform plugins" section below).
- Common lint checks (both on Android and plain JVM projects).

Full docs can be found in the [architecture](architecture) docs.
Full docs can be found in the [architecture](platforms/gradle/architecture.md) docs.

### Feature DSL

Expand Down Expand Up @@ -71,8 +71,7 @@ of our friends at Square).

Gradle's built-in property support is limited and has surprising behavior, so we have our own
system on top of it that has consistent precedence, `local.properties` support, project-local
`gradle.properties`, and configuration caching support. Check out `safeProperty()` in
`PropertyUtil.kt`.
`gradle.properties`, and configuration caching support. Check out `PropertyResolver`.

### Dependency Rake

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Its responsibilities include:
- Configuring unit tests via `UnitTests`. This also includes configuring the Gradle test retry plugin, if enabled.
- Configuring NullAway, if enabled.
- Configuring [Skippy](/tools/skippy).
- Configuring [Mod Score](/mod-score) tasks.
- Configuring [Mod Score](../mod-score) tasks.

### `StandardProjectConfigurations`

This class warrants special mention as it is responsible for the bulk of the configuration applied to projects SGP manages.

- Creates and exposes the [`foundry` extension DSL](/dsl).
- Creates and exposes the [`foundry` extension DSL](../dsl).
- Applies common configurations.
- This largely just sets up the dependency sorter plugin.
- Applies common JVM configurations.
Expand All @@ -59,7 +59,7 @@ All JVM projects (Android, Java, Kotlin) receive some common configuration for t

- Applies the repo's platform project, if any.
- Applies any BOM dependencies to platform-configurable configurations.
- Configures the dependency analysis gradle plugin and [`DependencyRake`](/dependency-rake).
- Configures the dependency analysis gradle plugin and [`DependencyRake`](../dependency-rake).
- Applies common annotations and common test bundles from version catalogs.
- Fails on non-androidx support library dependencies.
- Configure common annotations processors.
Expand Down Expand Up @@ -96,7 +96,7 @@ Java projects are fairly simple. Note that these are applied on all projects tha
- Application projects...
- have their packaging config set up with some convenience common exclusions and handling common `jniLibs` handling.
- have v3 and v4 signing enabled by default.
- are configured with [`PermissionChecks`](/utilities/#permissionchecks).
- are configured with [`PermissionChecks`](../utilities/#permissionchecks).
- are configured with the Bugsnag gradle plugin, if enabled.
- Library projects...
- are configured with an automatic `android.namespace`, if none is manually specified in the buildscript. The namespace is inferred from the project's Gradle path.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/dsl.md → docs/platforms/gradle/dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ behavior.

By default, SGP disables androidTests in projects. These can be enabled via the `androidTest()` feature, which will enable the relevant controls in the Android plugin. This can also accept specified variants to enable/disable.

This is important for opting in tests to [AndroidTest APK Aggregation](/utilities/#androidtest-apk-aggregation).
This is important for opting in tests to [AndroidTest APK Aggregation](../utilities/#androidtest-apk-aggregation).

### Resources

Expand All @@ -85,5 +85,5 @@ This can be enabled via the `resources()` feature, which will enable the relevan

### Permission AllowList

This enables checking of a permission allowlist. See [`PermissionChecks`](/utilities/#permissionchecks) for more
This enables checking of a permission allowlist. See [`PermissionChecks`](../utilities/#permissionchecks) for more
details.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/utilities.md → docs/platforms/gradle/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tasks
```

This task is automatically added to whenever a subproject uses
the `androidTest()` [DSL feature](/dsl/#android-test).
the `androidTest()` [DSL feature](../dsl/#android-test).

## `PermissionChecks`

Expand All @@ -51,7 +51,7 @@ The workflow we use at Slack is like this:

- We check in a `permissionsAllowlist.txt` file in the Slack android repo.
- This file is owned in GitHub by a specific codeowner rule that adds a permission reviewers group.
- This file is passed into the `allowListFile` [DSL feature](/dsl/#permission-allowlist) in the application
- This file is passed into the `allowListFile` [DSL feature](../dsl/#permission-allowlist) in the application
project.
- On each build, SGP automatically checks that the permissions present in the release APK manifest match the ones
defined in the allowlist.
Expand Down
File renamed without changes.
File renamed without changes.
34 changes: 19 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# mkdocs serve
# mkdocs gh-deploy

site_name: foundry
site_name: Foundry
repo_name: foundry
repo_url: https://github.com/slackhq/foundry
site_description: "Gradle and IntelliJ build tooling used in Slack's Android projects"
Expand Down Expand Up @@ -58,20 +58,24 @@ markdown_extensions:

nav:
- 'Overview': index.md
- 'Architecture': architecture.md
- 'Dependency Rake': dependency-rake.md
- 'Bootstrap': bootstrap.md
- 'DSL': dsl.md
- 'Utilities': utilities.md
# TODO
# - 'Configuration': configuration.md
# - 'Lint': lint.md
# - 'Testing': testing.md
# - 'Skippy': skippy.md
# - 'Properties': properties.md
# - 'Mod Score': mod-score.md
# - 'Formatters & Analysis': formatters-and-analysis.md
# - 'Thermals Logging': thermals-logging.md
- 'Platforms':
- 'Gradle':
- 'Architecture': platforms/gradle/architecture.md
- 'Dependency Rake': platforms/gradle/dependency-rake.md
- 'Bootstrap': platforms/gradle/bootstrap.md
- 'DSL': platforms/gradle/dsl.md
- 'Utilities': platforms/gradle/utilities.md
# TODO
# - 'Configuration': platforms/gradle/configuration.md
# - 'Lint': platforms/gradle/lint.md
# - 'Testing': platforms/gradle/testing.md
# - 'Skippy': platforms/gradle/skippy.md
# - 'Properties': platforms/gradle/properties.md
# - 'Mod Score': platforms/gradle/mod-score.md
# - 'Formatters & Analysis': platforms/gradle/formatters-and-analysis.md
# - 'Thermals Logging': platforms/gradle/thermals-logging.md
- 'Tools':
- 'CLI': tools/cli.md
- 'Discussions ⏏': https://github.com/slackhq/foundry/discussions
- 'Change Log': changelog.md
- 'API': api/0.x/
Expand Down

0 comments on commit f709582

Please sign in to comment.