-
-
Notifications
You must be signed in to change notification settings - Fork 465
Add rules to add and release new modules #4658
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
185f52b
Add more AI rules
adinauer e4f0b8d
Apply suggestions from code review
adinauer dba4b32
Apply suggestions from code review
adinauer 5595b1d
Add Cursor rules to add and release new modules
lcian 3037fde
improve
lcian f6f2348
improve
lcian 71c1ca1
Merge branch 'main' into lcian/ai/new-module-rules
lcian 84dca2e
address comments
lcian c9de3a7
Merge branch 'main' into lcian/ai/new-module-rules
lcian 9ba25e2
Merge branch 'main' into lcian/ai/new-module-rules
lcian 486f8e9
Merge branch 'main' into lcian/ai/new-module-rules
lcian 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,88 @@ | ||
| --- | ||
| description: Module Addition Rules for sentry-java | ||
| alwaysApply: false | ||
| --- | ||
| # Module Addition Rules for sentry-java | ||
|
|
||
| ## Overview | ||
|
|
||
| This document outlines the complete process for adding a new module to the sentry-java repository. Follow these steps in order to ensure proper integration and release management. | ||
|
|
||
| ## Step-by-Step Process | ||
|
|
||
| ### 1. Create the Module Structure | ||
|
|
||
| 1. Create the new module, conforming to the existing naming conventions and build scripts | ||
|
|
||
| 2. Add the module to the include list in `settings.gradle.kts` | ||
|
|
||
| If adding a `sentry-samples` module, also add it to the `ignoredProjects` list in the root `build.gradle.kts`: | ||
|
|
||
| ```kotlin | ||
| ignoredProjects.addAll( | ||
| listOf( | ||
| // ... existing projects ... | ||
| "sentry-samples-{module-name}" | ||
| ) | ||
| ) | ||
| ``` | ||
|
|
||
| 3. If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples. | ||
| The test should then be added to `test/system-test-runner.py` and `.github/workflows/system-tests-backend.yml`. | ||
|
|
||
| ### 2. Create Module Documentation | ||
|
|
||
| Create a `README.md` in the module directory with the following structure: | ||
|
|
||
| ```markdown | ||
| # sentry-{module-name} | ||
|
|
||
| This module provides an integration for [Technology/Framework Name]. | ||
|
|
||
| Please consult the documentation on how to install and use this integration in the Sentry Docs for [Android](https://docs.sentry.io/platforms/android/integrations/{module-name}/) or [Java](https://docs.sentry.io/platforms/java/tracing/instrumentation/{module-name}/). | ||
| ``` | ||
|
|
||
| The following tasks are required only when adding a module that isn't a sample. | ||
|
|
||
| ### 3. Update Main README.md | ||
|
|
||
| Add the new module to the packages table in the main `README.md` with a placeholder link to the badge: | ||
|
|
||
| ```markdown | ||
| | sentry-{module-name} | [](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-{module-name}) | | | ||
| ``` | ||
|
|
||
| Note that the badge will only work after the module is released to Maven Central. | ||
|
|
||
| ### 4. Add Documentation to docs.sentry.io | ||
|
|
||
| Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io): | ||
| - For Java modules: Add to Java platform docs, usually in integrations section | ||
| - For Android modules: Add to Android platform docs, usually in integrations section | ||
| - Include installation instructions, configuration options, and usage examples | ||
|
|
||
| ### 5. Post release tasks | ||
|
|
||
| Remind the user to perform the following tasks after the module is merged and released: | ||
|
|
||
| 1. Add the SDK to the Sentry release registry, following the instructions in the [sentry-release-registry README](https://github.com/getsentry/sentry-release-registry#adding-new-sdks) | ||
|
|
||
| 2. Add the module to `.craft.yml` in the `sdks` section: | ||
| ```yaml | ||
| sdks: | ||
| # ... existing modules ... | ||
| maven:io.sentry:sentry-{module-name}: | ||
| ``` | ||
|
|
||
| ## Module Naming Conventions | ||
|
|
||
| - Use kebab-case for module names: `sentry-{module-name}` | ||
| - Follow existing patterns: `sentry-okhttp`, `sentry-apollo-4`, `sentry-spring-boot` | ||
| - For version-specific modules, include the version: `sentry-apollo-3`, `sentry-apollo-4` | ||
|
|
||
| ## Important Notes | ||
|
|
||
| 1. **API Files**: Do not modify `.api` files manually. Run `./gradlew apiDump` to regenerate them | ||
| 2. **Backwards Compatibility**: Ensure new features are opt-in by default | ||
| 3. **Testing**: Write comprehensive tests for all new functionality | ||
| 4. **Documentation**: Always include proper documentation and examples | ||
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
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.