Method apply
has a Cognitive Complexity of 86 (exceeds 20 allowed). Consider refactoring.
override fun apply(target: Project) {
if (!target.isRootProject) {
return
}
Method setupPublicationPom
has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
val useDokka = USE_DOKKA && !config.isSnapshot
try {
check(useDokka) { "Dokka disabled" }
Method apply
has 66 lines of code (exceeds 25 allowed). Consider refactoring.
override fun apply(target: Project) {
if (!target.isRootProject) {
return
}
Method setupPublicationMultiplatform
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring.
private fun Project.setupPublicationMultiplatform(config: PublicationConfig) {
applyMavenPublishPlugin()
group = config.group
version = config.version
Method setupPublicationPom
has 50 lines of code (exceeds 25 allowed). Consider refactoring.
internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
val useDokka = USE_DOKKA && !config.isSnapshot
try {
check(useDokka) { "Dokka disabled" }
Method scmTag
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring.
@Incubating
@Suppress("ComplexCondition", "MagicNumber")
fun Project.scmTag(allowBranch: Boolean = true): Provider<String?> {
val envOrProp = envOrProp("SCM_TAG")
return provider {
Method setupPublicationAndroidLibrary
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
private fun Project.setupPublicationAndroidLibrary(config: PublicationConfig) {
if (!isGenericCompilationEnabled) {
return
}
Method setupPublicationRepository
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
internal fun Project.setupPublicationRepository(config: PublicationConfig) {
val notify = signingKeyNotificationLogged.compareAndSet(false, true)
if (config.isSigningEnabled) {
if (notify) logger.lifecycle("> Conf SIGNING_KEY SET, applying signing configuration")
plugins.apply("signing")