Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/platforms/android/build-distribution/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Build Distribution
sidebar_title: Build Distribution
sidebar_order: 5250
description: Upload Android builds to Sentry for distribution to internal teams and beta testers.
---

<Include name="build-distribution/ea" />

[Build Distribution](/product/build-distribution) helps you securely distribute Android builds to your internal teams and beta testers.

## Getting Started

**Accepted Formats**: AAB (preferred) | APK

**Upload Mechanisms**: [Gradle](#uploading-with-gradle) | [Sentry CLI](#uploading-with-the-sentry-cli)

### Uploading With Gradle

<Include name="build-distribution/upload-gradle" />

### Uploading With the Sentry CLI

<Include name="size-analysis/upload-cli-android" />

## Upload Metadata

<Include name="size-analysis/upload-metadata" />

### Build Configuration

<Include name="size-analysis/upload-metadata" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Clean Up Android Build Configuration Duplication

The Build Configuration section duplicates the same size-analysis/upload-metadata include that appears in the Upload Metadata section above. Based on the iOS documentation structure and the existing Android size-analysis page, this should be size-analysis/build-configuration-android instead.

Fix in Cursor Fix in Web


<PageGrid />
40 changes: 40 additions & 0 deletions docs/platforms/apple/guides/ios/build-distribution/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Build Distribution
sidebar_order: 5250
description: Upload iOS builds to Sentry for distribution to internal teams and beta testers.
---

<Include name="build-distribution/ea" />

[Build Distribution](/product/build-distribution) helps you securely distribute iOS builds to your internal teams and beta testers.
Streamline your distribution workflow with automated uploads from CI.

## Getting Started

**Accepted Formats**: XCArchive (preferred) | IPA

**Upload Mechanisms**: [Fastlane Plugin](#uploading-with-fastlane) (version 1.35.0 or higher) _or_ [Sentry CLI](#uploading-with-the-sentry-cli)

### Uploading With Fastlane

<Include name="size-analysis/upload-fastlane" />

### Uploading with the Sentry CLI

<Include name="size-analysis/upload-cli-ios" />

## Upload Metadata

<Include name="size-analysis/upload-metadata" />

### Build Configuration

<Include name="size-analysis/build-configuration-ios" />

## Distribution Management
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is something missing here? It seems like there's no content for 'Distribution Management' under this header.


## What's Next?

We strongly recommend integrating Build Distribution into your CI pipeline for automated distribution workflows.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be misinterpreting, but is this recommending what we've already done on this page as the 'next step'? Is there a recommended next step that can link to another place in docs?


<PageGrid />
28 changes: 28 additions & 0 deletions docs/product/build-distribution/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Build Distribution
sidebar_order: 137
description: Distribute app builds to internal teams and beta testers.
---

<Include name="build-distribution/ea" />

Build Distribution enables you to securely distribute app builds to your internal teams and beta testers. Upload builds from CI to streamline your distribution workflow, manage access control, and track installation analytics.

### CI Integration

Integrate Build Distribution into your CI pipeline to automatically distribute builds to your teams.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to mention anything else?
There's no difference if a build is uploaded from a local build vs a CI build for the purposes of size analysis. There isn't any github integration either.


## Upload Guides

You can follow the platform guides to learn how to upload builds for distribution:

- [iOS](/platforms/apple/guides/ios/build-distribution/)
- [Android](/platforms/android/build-distribution/)

### Upload Metadata
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section is redundant since it also appears in the sections for each platform.


Below is the metadata included in your build, regardless of the platform.

<Include name="size-analysis/upload-metadata" />

<PageGrid />
1 change: 1 addition & 0 deletions includes/build-distribution/ea.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Include name="feature-available-for-user-group-early-adopter" />
1 change: 1 addition & 0 deletions includes/build-distribution/upload-gradle.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<GradleUploadInstructions feature="distribution" />
101 changes: 1 addition & 100 deletions includes/size-analysis/upload-gradle.mdx
Original file line number Diff line number Diff line change
@@ -1,100 +1 @@
The Gradle plugin automatically detects build metadata from your git repository. On GitHub Actions, all metadata is automatically detected. On other CI systems, you may need to manually set some values using the `vcsInfo` extension.

1. Configure the [Sentry Android Gradle plugin](/platforms/android/configuration/gradle/) with at least version `6.0.0-beta1`

2. Set the auth token as an environment variable to be used when running your release build.

<OrgAuthTokenNote />

```bash
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
```

3. Enable uploading for size analysis for CI builds.

```kotlin {filename:build.gradle.kts}
sentry {
sizeAnalysis {
enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent
}
}
```

```groovy {filename:build.gradle}
sentry {
sizeAnalysis {
enabled = providers.environmentVariable("GITHUB_ACTIONS").present
}
}
```

4. Invoke the following Gradle tasks to build your app and trigger the upload.

```aab {filename:aab}
./gradlew bundleRelease
```

```apk {filename:apk}
./gradlew assembleRelease
```

5. After an upload has successfully processed, confirm the metadata is correct in the Sentry UI

![Upload metadata =400x](./images/android-metadata.png)

### Overriding Metadata

The Gradle plugin automatically detects build metadata from your git repository. On GitHub Actions, all metadata is automatically detected. On other CI systems, you may need to manually set some values using the `vcsInfo` extension.

Configure overrides in your Gradle build configuration:

```kotlin {filename:build.gradle.kts}
sentry {
sizeAnalysis {
enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent
}

vcsInfo {
headSha.set("abc123")
baseSha.set("def456")
vcsProvider.set("github")
headRepoName.set("organization/repository")
baseRepoName.set("organization/repository")
headRef.set("feature-branch")
baseRef.set("main")
prNumber.set(42)
}
}
```

```groovy {filename:build.gradle}
sentry {
sizeAnalysis {
enabled = providers.environmentVariable("GITHUB_ACTIONS").present
}

vcsInfo {
headSha = 'abc123'
baseSha = 'def456'
vcsProvider = 'github'
headRepoName = 'organization/repository'
baseRepoName = 'organization/repository'
headRef = 'feature-branch'
baseRef = 'main'
prNumber = 42
}
}
```

Available `vcsInfo` properties:

| Property | Type | Description |
| -------------- | ------ | --------------------------------- |
| `headSha` | String | Current commit SHA |
| `baseSha` | String | Base commit SHA (for comparison) |
| `vcsProvider` | String | VCS provider (e.g., "github") |
| `headRepoName` | String | Repository name (org/repo format) |
| `baseRepoName` | String | Base repository name |
| `headRef` | String | Branch or tag name |
| `baseRef` | String | Base branch name |
| `prNumber` | Int | Pull request number |
<GradleUploadInstructions feature="sizeAnalysis" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions src/components/gradleFeatureConfig.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import {CodeBlock} from './codeBlock';
import {CodeTabs} from './codeTabs';
import {codeToJsx} from './highlightCode';

type Props = {
feature: string;
};

export function GradleFeatureConfig({feature}: Props) {
return (
<CodeTabs>
<CodeBlock language="kotlin" filename="build.gradle.kts">
<pre>
{codeToJsx(
`sentry {
${feature} {
enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent
}
}`,
'kotlin'
)}
</pre>
</CodeBlock>

<CodeBlock language="groovy" filename="build.gradle">
<pre>
{codeToJsx(
`sentry {
${feature} {
enabled = providers.environmentVariable("GITHUB_ACTIONS").present
}
}`,
'groovy'
)}
</pre>
</CodeBlock>
</CodeTabs>
);
}
Loading
Loading