šŸ‘½ļø Use non-deprecated variant of @JvmDefault
authorDavid ā€˜Bombeā€™ Roden <bombe@pterodactylus.net>
Sat, 28 Sep 2024 19:38:37 +0000 (21:38 +0200)
committerDavid ā€˜Bombeā€™ Roden <bombe@pterodactylus.net>
Sat, 28 Sep 2024 20:52:58 +0000 (22:52 +0200)
build.gradle
src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt
src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt

index 17a35df..064b94f 100644 (file)
@@ -27,7 +27,7 @@ tasks.withType(JavaCompile) {
 tasks.withType(KotlinCompile) {
     kotlinOptions {
         jvmTarget = "1.8"
-        freeCompilerArgs += '-Xjvm-default=enable'
+        freeCompilerArgs += '-Xjvm-default=all'
     }
 }
 
index 36b6f89..1d5d4f9 100644 (file)
@@ -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) }
 
index e8a48cb..5b1f122 100644 (file)
@@ -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) }