fluxo-kt/fluxo-mvi

View on GitHub
gradle/plugins/setup/src/main/kotlin/SetupPublication.kt

Summary

Maintainability
D
2 days
Test Coverage

Showing 8 of 8 total issues

Method setupPublicationPom has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
// Publish docs with each artifact.
val useDokka = USE_DOKKA && !config.isSnapshot
try {
check(useDokka) { "Dokka disabled" }
Severity: Minor
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

Method setupPublicationMultiplatform has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring.
Open

private fun Project.setupPublicationMultiplatform(config: PublicationConfig) {
applyMavenPublishPlugin()
 
group = config.group
version = config.version
Severity: Minor
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

Method setupPublicationPom has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

internal fun MavenPublication.setupPublicationPom(project: Project, config: PublicationConfig) {
// Publish docs with each artifact.
val useDokka = USE_DOKKA && !config.isSnapshot
try {
check(useDokka) { "Dokka disabled" }
Severity: Minor
Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 2 hrs to fix

    Method setupPublicationAndroidLibrary has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    private fun Project.setupPublicationAndroidLibrary(config: PublicationConfig) {
    if (!isGenericCompilationEnabled) {
    return
    }
     
     
    Severity: Minor
    Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 1 hr to fix

      Method setupPublicationRepository has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      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")
      Severity: Minor
      Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt - About 1 hr to fix

        TODO found
        Open

        // TODO: Set RC/alpha/beta releases status to Ivy's: milestone/integration when it will be possible

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        private fun Project.setupPublicationKotlinJvm(config: PublicationConfig) {
        if (!isGenericCompilationEnabled) {
        return
        }
         
         
        Severity: Major
        Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt and 1 other location - About 3 hrs to fix
        gradle/plugins/setup/src/main/kotlin/SetupPublication.kt on lines 182..201

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        private fun Project.setupPublicationJava(config: PublicationConfig) {
        if (!isGenericCompilationEnabled) {
        return
        }
         
         
        Severity: Major
        Found in gradle/plugins/setup/src/main/kotlin/SetupPublication.kt and 1 other location - About 3 hrs to fix
        gradle/plugins/setup/src/main/kotlin/SetupPublication.kt on lines 161..180
        Category
        Status