Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
99 changes: 99 additions & 0 deletions .github/workflows/create-releases-buildtools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Create release (build tools)

on:
workflow_dispatch:
inputs:
product:
description: Which product to make a release of ?
required: true
type: choice
options:
- app-distribution
- crashlytics
- performance

permissions:
contents: read

env:
ARTIFACTS: ${{ github.workspace }}/build/artifacts

jobs:
make-app-distribution-release:
runs-on: ubuntu-latest
if: inputs.product == 'app-distribution'
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Make release for Firebase App Distribution
run: |
./gradlew \
-Dorg.gradle.project.buildDir=${ARTIFACTS} \
-Dmaven.repo.local=${ARTIFACTS} \
:firebase-appdistribution-gradle:publishToMavenLocal
cd ${ARTIFACTS}
zip -r m2repository.zip com
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: artifacts
path: ${{ env.ARTIFACTS }}

make-crashlytics-release:
Comment thread Fixed
runs-on: ubuntu-latest
if: inputs.product == 'crashlytics'
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Make release for Firebase Crashlytics
run: |
./gradlew \
-Dorg.gradle.project.buildDir=${ARTIFACTS} \
-Dmaven.repo.local=${ARTIFACTS} \
:firebase-crashlytics-buildtools:publishToMavenLocal
./gradlew \
-Dorg.gradle.project.buildDir=${ARTIFACTS} \
-Dmaven.repo.local=${ARTIFACTS} \
:firebase-crashlytics-gradle:publishToMavenLocal
cd ${ARTIFACTS}
zip -r m2repository.zip com
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: artifacts
path: ${{ env.ARTIFACTS }}

make-performance-release:
Comment thread Fixed
runs-on: ubuntu-latest
if: inputs.product == 'performance'
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Make release for Firebase Performance
run: |
./gradlew \
-Dorg.gradle.project.buildDir=${ARTIFACTS} \
-Dmaven.repo.local=${ARTIFACTS} \
:firebase-perf-gradle:publishToMavenLocal
cd ${ARTIFACTS}
zip -r m2repository.zip com
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: artifacts
path: ${{ env.ARTIFACTS }}
Comment thread Fixed
28 changes: 28 additions & 0 deletions .github/workflows/perf-gradle-compatibility-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Perf Gradle Compatibility Tests

on:
schedule:
- cron: '0 6 * * *' # Run daily at 6 AM
workflow_dispatch: # Allow manual triggering

permissions:
contents: read

jobs:
performance-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Run tests
id: tests
run: |
./gradlew \
:firebase-perf-gradle:test --tests \
"com.google.firebase.perf.plugin.transform.InstrumentationApiCompatTest.gradleBuildRunsInstrumentationForAllVariants_latestGradleAndAgp"
Comment thread Fixed
4 changes: 4 additions & 0 deletions firebase-appdistribution-gradle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### App Distribution Gradle plugin version 5.2.1

* {{fixed}} Declare dependency on GoogleServices plugin

83 changes: 83 additions & 0 deletions firebase-appdistribution-gradle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# App Distribution Gradle Plugin

This directory contains the source code for the
[Firebase App Distribution Gradle Plugin](https://firebase.google.com/docs/app-distribution/android/distribute-gradle),
which allows uploading distributions, enabling access for testers, and adding release notes.

---

## appdistribution-gradle

This subproject produces a Gradle Plugin which faciliates the use cases of
appdistribution-buildtools for Android apps built with Gradle.

#### Build / Install

`./gradlew :firebase-appdistribution-gradle:publishToMavenLocal`

The produced local Maven artifact is "com.google.firebase:firebase-appdistribution-gradle".

#### Test

To run unit tests, run:

`./gradlew :firebase-appdistribution-gradle:test`

To run integration tests, run:

`./gradlew :firebase-appdistribution-gradle:integrationTest`

To test manually, add the plugin to your Android project

`apply plugin: 'com.google.firebase.appdistribution'`

## Release Process

1. Create a PR with the changes, and request a review to submit it to `main`. Add the changes in the
`CHANGELOG.md`.
2. Once the changes have been submitted to `main` they will be released along with the next Android
SDK release.

### Building the Maven artifact

Make sure to bump the [version of the plugin](gradle.properties#L3).

Use the
["Make Releases" GitHub Actions workflow](https://github.com/firebase/firebase-android-buildtools/actions/workflows/make-releases.yml)
([source](../.github/workflows/make-releases.yml)) to produce maven artifacts. Please refer to the
[GitHub Actions documentation](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow)
on how to trigger the workflow manually. The `m2repository.zip` can be downloaded from the
"Artifacts" section on the workflow execution page.

### Testing the artifact (optional)

Download the `m2repository.zip` artifact from GCS. Extract the contents of the zip file to a local
directory. In the project-level Gradle file of a test app add the path to the local maven
repository to the `repositories` block and
`classpath 'com.google.firebase:firebase-appdistribution-gradle:x.y.z'`
to the dependencies block.

```
repositories {
// ...

// Add path to gradle plugin local maven repository
maven {
url 'file://<path_to_gradle_plugin_maven_repo>'
}
}
dependencies {
// ...

// Add the pre version of the Gradle plugin
classpath 'com.google.firebase:firebase-appdistribution-gradle:x.y.z'
}
```

Sync your project and validate by running an app distribution gradle
command such as:

```
./gradlew assembleDebug appDistributionUploadDebug
```

Loading
Loading