Skip to content

Commit c32509e

Browse files
adinauerclaude
andcommitted
fix(timber): Keep lazy logs constructor internal
Hide the lazy evaluator constructor from the supported Kotlin API while retaining Java access for Android integration wiring. Use a lambda instead of a method reference for compatibility with older Android Gradle plugins. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8a9b284 commit c32509e

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ static void installDefaultIntegrations(
479479
}
480480

481481
if (isTimberAvailable) {
482-
options.addIntegration(new SentryTimberIntegration(options::isEnableTimberLogs));
482+
options.addIntegration(new SentryTimberIntegration(() -> options.isEnableTimberLogs()));
483483
}
484484
options.addIntegration(new AppComponentsBreadcrumbsIntegration(context));
485485
options.addIntegration(new SystemEventsBreadcrumbsIntegration(context));

‎sentry-android-timber/api/sentry-android-timber.api‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public final class io/sentry/android/timber/SentryTimberIntegration : io/sentry/
1212
public fun <init> (Lio/sentry/SentryLevel;Lio/sentry/SentryLevel;Lio/sentry/SentryLogLevel;)V
1313
public synthetic fun <init> (Lio/sentry/SentryLevel;Lio/sentry/SentryLevel;Lio/sentry/SentryLogLevel;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1414
public fun <init> (Lio/sentry/SentryLevel;Lio/sentry/SentryLevel;Lio/sentry/SentryLogLevel;Z)V
15-
public fun <init> (Lio/sentry/util/LazyEvaluator$Evaluator;)V
1615
public fun <init> (Z)V
1716
public fun close ()V
1817
public final fun getEnableLogs ()Z

‎sentry-android-timber/src/main/java/io/sentry/android/timber/SentryTimberIntegration.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class SentryTimberIntegration(
3737
enableLogsProvider = Evaluator { enableLogs }
3838
}
3939

40-
public constructor(enableLogsProvider: Evaluator<Boolean>) : this() {
40+
internal constructor(enableLogsProvider: Evaluator<Boolean>) : this() {
4141
this.enableLogsProvider = enableLogsProvider
4242
}
4343

0 commit comments

Comments
 (0)