Skip to content
Merged
Changes from 1 commit
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
13 changes: 10 additions & 3 deletions sdk-platform-java/GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,21 @@ Showcase integration tests are run against a local server that implements the Sh
cd java-showcase
mvn verify -P enable-integration-tests
```

## 5. Dependency Management
## 5. Style Guide
Comment thread
blakeli0 marked this conversation as resolved.

1. Minimize scope; avoid `public` unless necessary.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think minimize scope wording might be a bit confusing/ unclear. Is this to minimize feature scope or scope visibility?

Also, maybe we can change this from avoid to prefer:
Prefer private or package-private scope for code implementation. or Expose interfaces and hide implementation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this to minimize feature scope or scope visibility?

Scope visibility. I actually asked gemini to come up with a precise sentence for itself, but it maybe too precise for human reading now. Let me update it.

maybe we can change this from avoid to prefer

In my experience, a stronger word usually have better success rate. It sometimes ignores commands if it is not strong and clear. Let's start with it and see how it goes? We can change it if we see that it is too constraining for gemini to do its job.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated, PTAL.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's start with it and see how it goes? We can change it if we see that it is too constraining for gemini to do its job.

Yep! Let's try it and see how it goes.

2. Use short names over fully qualified names.
3. Avoid `@ObsoleteApi` or `@Deprecated` methods unless necessary.
Comment thread
blakeli0 marked this conversation as resolved.
Outdated
4. Avoid unnecessary formatting changes to keep diffs clean.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does this line covering? Doesn't everything get run through the formatter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They do, but we don't always run format after every change. My gemini sometimes format unrelated changes and makes code review harder, this would avoid unrelated formatting while developing locally.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok! Let's try it and see if it helps!

5. Use `mvn` for everything other than the `test/integration` folder.
Comment on lines +135 to +141
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not something we need to do in this PR, but I wonder if we can move some of these sections to a root GEMINI.md file.

I think style guide and dependency management apply to all modules now that we have a monorepo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I don't think there is a root gemini.md yet. We can do it in a separate PR.


## 6. Dependency Management

- Try not to bump any external dependency version unless there is a known CVE (security or vulnerability issue) or a critical bug fix.
- Try to avoid introducing new external dependencies. If a new dependency is required, please state the reason.
- Prefer to use features from the Java standard library, then try to use features from any existing dependencies (preferably from Google managed dependencies).

## 6. Contribution Guidelines
## 7. Contribution Guidelines

- **Commits:** Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/)
specification. The format is `<type>: <description>`. The type should be one of the following: fix, feat,
Expand Down
Loading