Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinity loop on cyclic dependency #194

Open
ueokande opened this issue Jun 18, 2021 · 1 comment
Open

Infinity loop on cyclic dependency #194

ueokande opened this issue Jun 18, 2021 · 1 comment

Comments

@ueokande
Copy link

The plugin met infinity loop, and gradle crashed on downloadLicense task when the sub-projects has a cyclic dependency:

$ ./gradlew downloadLicense
> Task :downloadLicenses FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloadLicenses'.
> java.lang.StackOverflowError (no error message)

There are minimal configurations to reproduce the issue:

// build.gradle.kts
plugins {
    id("org.jetbrains.kotlin.jvm") version "1.5.10"
    id("com.github.hierynomus.license") version "0.16.1"
}

subprojects {
    apply(plugin = "kotlin")
}

allprojects {
    repositories {
        mavenCentral()
    }

    apply(plugin = "com.github.hierynomus.license")
    downloadLicenses {
        dependencyConfiguration = "runtimeClasspath"
    }
}

project(":sub-a") {
    dependencies {
        implementation(project(":sub-b"))
    }
}

project(":sub-b") {
    dependencies {
        implementation(project(":sub-a"))
    }
}
// settings.gradle.kts
include(":sub-a")
include(":sub-b")
@fab-10
Copy link
Contributor

fab-10 commented Nov 16, 2021

Could you check if this PR #203 helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants