-
Notifications
You must be signed in to change notification settings - Fork 640
docs: Add Jules.md for AI agent #7303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+129
−0
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
510dd82
docs: Revise Jules.md for AI agent and add SDK setup
google-labs-jules[bot] 30ba97d
Apply suggestions from code review
rlazo b60734a
Merge branch 'main' into update-jules-md
rlazo 9f597a5
[Infra] Enable simple formatter for md (#7308)
rlazo 780f349
Fix formatting
rlazo 8b85bb8
Merge branch 'main' into update-jules-md
rlazo f31faa9
Address review comments
rlazo 5ea084a
Add iteration loop section
rlazo ab91be3
more more
rlazo 49d70e1
Fix changes from testing commit
rlazo db575e7
Merge branch 'main' into update-jules-md
rlazo d0d22a4
Merge branch 'main' into update-jules-md
rlazo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Jules Onboarding Guide for `firebase-android-sdk` | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
This guide provides essential information for working within the `firebase-android-sdk` repository. | ||
|
||
## Table of Contents | ||
- [Environment Setup](#environment-setup) | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- [Testing](#testing) | ||
- [API Surface](#api-surface) | ||
- [Best Practices](#best-practices) | ||
- [Common Patterns](#common-patterns) | ||
- [External Dependencies](#external-dependencies) | ||
- [Updating this Guide](#updating-this-guide) | ||
|
||
--- | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Environment Setup | ||
|
||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
To work with this repository, the Android SDK must be installed. Use the `sdkmanager` command-line tool for this purpose. | ||
|
||
1. **Install Android SDK Command-Line Tools**: | ||
- If not already installed, download the command-line tools from the [Android Studio page](https://developer.android.com/studio#command-line-tools-only). | ||
- Create a directory for the Android SDK, e.g., `android_sdk`. | ||
- Unzip the downloaded package and move the `cmdline-tools` directory into the `android_sdk` directory. | ||
- The final structure should be `android_sdk/cmdline-tools/`. | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. **Install required SDK packages**: | ||
- Use `sdkmanager` to install the necessary platforms, build tools, and other packages. For example: | ||
```bash | ||
# List all available packages | ||
sdkmanager --list | ||
|
||
# Install platform tools and the SDK for API level 33 | ||
sdkmanager "platform-tools" "platforms;android-33" | ||
|
||
# Accept all licenses | ||
sdkmanager --licenses | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
- Refer to the specific requirements of the project to determine which packages to install. | ||
|
||
3. **Configure for integration tests**: | ||
- To run integration tests, a `google-services.json` file is required. | ||
- Place this file in the root of the repository. | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
--- | ||
|
||
## Testing | ||
|
||
This repository uses two main types of tests: | ||
|
||
1. **Unit Tests**: | ||
- These tests run on the local JVM. | ||
- To execute unit tests for a specific project, run: | ||
```bash | ||
./gradlew :<firebase-project>:check | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
2. **Integration Tests**: | ||
- These tests run on a hardware device or emulator. | ||
- Ensure a `google-services.json` file is present in the repository root. | ||
- To execute integration tests for a specific project, run: | ||
```bash | ||
./gradlew :<firebase-project>:connectedCheck | ||
``` | ||
|
||
--- | ||
|
||
## API Surface | ||
|
||
The public API of the Firebase SDKs is managed using a set of annotations: | ||
|
||
- `@PublicApi`: Marks APIs that are intended for public consumption by developers. | ||
- `@KeepForSdk`: Marks APIs that are intended for use by other Firebase SDKs. These APIs will trigger a linter error if used by developers outside of a Firebase package. | ||
- `@Keep`: Marks APIs that need to be preserved at runtime, usually due to reflection. This annotation should be used sparingly as it prevents the code from being proguarded. | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
--- | ||
|
||
## Best Practices | ||
|
||
- **Code Formatting**: The repository uses `spotless` for code formatting. To format the code in a specific project, run: | ||
```bash | ||
./gradlew :<firebase-project>:spotlessApply | ||
``` | ||
- **Dependency Management**: Dependencies are managed using Gradle. Be mindful of the impact of new dependencies on the size of the SDKs. | ||
|
||
--- | ||
rlazo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Common Patterns | ||
|
||
This repository uses a combination of dependency injection frameworks: | ||
|
||
- **`firebase-components`**: This is a custom dependency injection framework used for discovery and dependency injection between different Firebase SDKs. It allows SDKs to register their components and declare dependencies on other components. The initialization is managed by `FirebaseApp`. | ||
|
||
- **Dagger**: Dagger is used for internal dependency injection within individual SDKs. This helps to create more testable and maintainable code. Dagger components are typically instantiated within the `ComponentRegistrar` of an SDK, which allows for the injection of dependencies from `firebase-components` into the Dagger graph. | ||
|
||
--- | ||
|
||
## External Dependencies | ||
|
||
Do not add new external dependencies to the project unless explicitly asked to do so. The Firebase SDKs are designed to be lightweight, and adding new dependencies can increase the size of the final artifacts. | ||
|
||
--- | ||
|
||
## Updating this Guide | ||
|
||
If new patterns or conventions are discovered, update this guide to ensure it remains a useful resource. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.