File tree Expand file tree Collapse file tree
plugin-build/src/main/kotlin/io/sentry/android/gradle Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ class SentrySettingsPlugin : Plugin<Settings> {
1010 override fun apply (settings : Settings ) {
1111 val extension = settings.extensions.create(" sentry" , SentrySettingsExtension ::class .java)
1212
13+ // Stash the extension in Gradle's ExtraPropertiesExtension so the project-level
14+ // plugin can read it — settings and project scopes are otherwise isolated.
1315 settings.gradle.extensions
1416 .getByType(ExtraPropertiesExtension ::class .java)
1517 .set(SENTRY_SETTINGS_EXTENSION_KEY , extension)
Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ import org.gradle.api.Action
66import org.gradle.api.model.ObjectFactory
77import org.gradle.api.provider.Property
88
9+ /* *
10+ * Settings-level extension for shared Sentry configuration across all modules.
11+ *
12+ * Properties here are intentionally duplicated from [SentryPluginExtension] because Gradle
13+ * settings extensions and project extensions live in different scopes — a project extension
14+ * cannot inherit from or reference a settings extension type at configuration time. The
15+ * project-level plugin bridges the two via [SentryPluginExtension.applySettingsDefaults],
16+ * which wires these values as conventions (overridable defaults) on each module's extension.
17+ */
918abstract class SentrySettingsExtension @Inject constructor(objects : ObjectFactory ) {
1019
1120 /* * The slug of the Sentry organization. Applied as the default for all modules. */
You can’t perform that action at this time.
0 commit comments