tasks.withType(KotlinCompile) {
kotlinOptions {
jvmTarget = "1.8"
- freeCompilerArgs += '-Xjvm-default=enable'
+ freeCompilerArgs += '-Xjvm-default=all'
}
}
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) }
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) }