import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask plugins { id("root.publication") id("com.github.ben-manes.versions") version "0.52.0" //trick: for the same plugin versions in all sub-modules alias(libs.plugins.androidLibrary).apply(false) alias(libs.plugins.kotlinMultiplatform).apply(false) alias(libs.plugins.dokka) } allprojects { layout.buildDirectory = file("/home/ali0/Projekty/.cache/abuild/${rootProject.name}/${project.name}") } subprojects { apply(plugin = "org.jetbrains.dokka") } tasks.dokkaHtml { outputDirectory.set(buildDir.resolve("dokka")) } tasks.named("dependencyUpdates").configure { rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) } } fun isNonStable(version: String): Boolean { val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r)?$".toRegex() return !stableKeyword && !regex.matches(version) }