Skip to content
Merged
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
71 changes: 6 additions & 65 deletions firebase-perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,79 +82,20 @@ firebase-android-sdk$ ./gradlew :firebase-perf:deviceCheck

## Integrate SDK with 3P App

### Creating a Release Candidate

Change the version field in `gradle.properties` to reflect the RC status:

```properties
version=20.4.1-SNAPSHOT
```

And then generate the library with required libraries:

```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" firebasePublish
```

This will generate various files in the root build directory that align with
the release candidates.

Alternatively, you can just build the repository in isolation:
```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" buildMavenZip
```

### Publish project locally

You can publish the project directly to your [local maven](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:maven_local)
You can publish the SDK directly to your [local maven](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:maven_local)
repository like so:

```bash
# firebase-perf requires firebase-sessions
./gradlew -PprojectsToPublish="firebase-perf,firebase-sessions" \
publishReleasingLibrariesToMavenLocal
./gradlew :firebase-perf:publishToMavenLocal
```

### Read SDK from mavenLocal()

Add **mavenLocal()** to your project-level `build.gradle` file

```
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}

dependencies {
. . .

# Adds several features that are specific to building Android apps
classpath 'com.android.tools.build:gradle:<agp-version>'

# Required for loading the 'google-services.json' file
classpath 'com.google.gms:google-services:<google-services-plugin-version>'

# Specify the version of 'perf-plugin'
classpath 'com.google.firebase:perf-plugin:<perf-plugin-version>'
}
}

allprojects {
repositories {
mavenLocal()
google()
jcenter()
}
}
```
Add **mavenLocal()** to your project-level `build.gradle` file or `settings.gradle` file based on your app's set up.

### Set Snapshot SDK version
### Set Local SDK version

Add **implementation** dependency to your module-level `build.gradle` file
Add **implementation** dependency to your module-level `build.gradle` file, with the version as defined in `firebase-perf/gradle.properties`.

```
apply plugin: 'com.android.application'
Expand All @@ -165,7 +106,7 @@ apply plugin: 'com.google.firebase.firebase-perf'
. . .

dependencies {
implementation 'com.google.firebase:firebase-perf:x.y.z-SNAPSHOT'
implementation 'com.google.firebase:firebase-perf:x.y.z'
}
```

Expand Down
Loading