From: David ‘Bombe’ Roden Date: Sat, 28 Sep 2024 19:38:37 +0000 (+0200) Subject: 👽️ Use non-deprecated variant of @JvmDefault X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4d6646e442b3422d346e7329a46b1e972b9f7d88;p=Sone.git 👽️ Use non-deprecated variant of @JvmDefault --- diff --git a/build.gradle b/build.gradle index 17a35df..064b94f 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ tasks.withType(JavaCompile) { tasks.withType(KotlinCompile) { kotlinOptions { jvmTarget = "1.8" - freeCompilerArgs += '-Xjvm-default=enable' + freeCompilerArgs += '-Xjvm-default=all' } } diff --git a/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt b/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt index 36b6f89..1d5d4f9 100644 --- a/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt @@ -5,11 +5,11 @@ import net.pterodactylus.sone.data.Post import net.pterodactylus.sone.data.Sone @ImplementedBy(DefaultPostVisibilityFilter::class) +@JvmDefaultWithoutCompatibility interface PostVisibilityFilter { fun isPostVisible(sone: Sone?, post: Post): Boolean - @JvmDefault fun isVisible(currentSone: Sone?) = { p: Post? -> p != null && isPostVisible(currentSone, p) } diff --git a/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt b/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt index e8a48cb..5b1f122 100644 --- a/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt @@ -5,11 +5,11 @@ import net.pterodactylus.sone.data.PostReply import net.pterodactylus.sone.data.Sone @ImplementedBy(DefaultReplyVisibilityFilter::class) +@JvmDefaultWithoutCompatibility interface ReplyVisibilityFilter { fun isReplyVisible(sone: Sone?, reply: PostReply): Boolean - @JvmDefault fun isVisible(currentSone: Sone?) = { reply: PostReply -> isReplyVisible(currentSone, reply) }