Skip to content

Commit d4aca50

Browse files
authored
Simplify rules
1 parent ae6bba5 commit d4aca50

1 file changed

Lines changed: 3 additions & 41 deletions

File tree

‎.cursor/rules/new_module.mdc‎

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ val SENTRY_FOO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.foo"
5252
The module's `build.gradle.kts` consumes it in both `buildConfig` and the jar manifest
5353
(`Sentry-SDK-Name` / `Sentry-SDK-Package-Name`) — see `sentry-kafka/build.gradle.kts`.
5454

55-
4. For an Android module, add the artifact id to `Config.BuildScript.androidLibs` in
56-
`buildSrc/src/main/java/Config.kt`. This makes the generated POM of any module that depends
57-
on it declare `<type>aar</type>`, which Gradle otherwise gets wrong
58-
([gradle#3170](https://github.com/gradle/gradle/issues/3170)).
55+
4. For an Android module, add the artifact id to `androidLibs` in `buildSrc/src/main/java/Config.kt`.
5956

6057
5. Add the instrumented library to `gradle/libs.versions.toml` and depend on it with
6158
`compileOnly(libs.<lib>)`, so the integration does not force the dependency on users.
@@ -79,11 +76,7 @@ addIntegrationToSdkVersion("{IntegrationName}");
7976

8077
### 2. Create Module Documentation
8178

82-
Create a `README.md` in the module directory: the module name as the heading, what it instruments,
83-
the entry points a host app touches, and a link to the module's page on docs.sentry.io. Take that
84-
link from the page itself rather than assembling it from the module name — a module does not always
85-
get its own page (`sentry-android-navigation3` is documented inside the existing Navigation page).
86-
`sentry-android-navigation3/README.md` is a good example.
79+
Create a `README.md` in the module directory: the module name as the heading, what it instruments, and a high level overview.
8780

8881
Steps 3 to 6 are required only when adding a module that isn't a sample.
8982

@@ -111,40 +104,9 @@ Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io):
111104
- For Android modules: Add to Android platform docs, usually in integrations section
112105
- Include installation instructions, configuration options, and usage examples
113106

114-
This has to be merged before step 6, which needs the live URL. The path is not derivable from the
115-
module name — integrations sit under `integrations/`, instrumentation under
116-
`tracing/instrumentation/`, and some modules are documented inside an existing page instead of
117-
getting their own. Note the URL the page actually resolves to, with no redirect.
118-
119107
### 6. Add the Module to `.craft.yml`
120108

121-
This is **not** a post-release task. It has to be merged before the release that first ships the
122-
module, otherwise that release publishes to Maven Central and then aborts on the `registry`
123-
target, leaving *every* `io.sentry` artifact stale in the release registry — not just the new one.
124-
125-
Add the module to the `registry` target in `.craft.yml`, carrying all four metadata fields. The
126-
simplest way is to copy the block of a neighbouring module and swap the name:
127-
128-
```yaml
129-
sdks:
130-
# ... existing modules ...
131-
maven:io.sentry:sentry-{module-name}:
132-
name: io.sentry:sentry-{module-name}
133-
packageUrl: https://central.sonatype.com/artifact/io.sentry/sentry-{module-name}
134-
mainDocsUrl: {the live docs.sentry.io URL from step 5}
135-
apiDocsUrl: https://javadoc.io/doc/io.sentry
136-
```
137-
138-
Craft reads these fields only for a package it has not published before — for anything already in
139-
the registry it carries the existing manifest forward. A missing `name` therefore fails the whole
140-
registry target rather than just that entry, and only on the release that first ships the module.
141-
That is why a bare `maven:io.sentry:sentry-{module-name}:` key appears to work and then does not.
142-
143-
No hand-editing of [sentry-release-registry](https://github.com/getsentry/sentry-release-registry)
144-
is needed: with these fields present, craft creates the registry entry by itself.
145-
146-
The fields are authoritative — craft writes them over the registry manifest on every release, so
147-
do not change an existing entry's values unless the change is intended to be published.
109+
Add the module to the `registry` target in `.craft.yml`, including all metadata fields.
148110

149111
## Module Naming Conventions
150112

0 commit comments

Comments
 (0)