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

Compilation failure with gradle 7.0+ #30

Open
chirag-ji opened this issue May 29, 2021 · 3 comments
Open

Compilation failure with gradle 7.0+ #30

chirag-ji opened this issue May 29, 2021 · 3 comments

Comments

@chirag-ji
Copy link

While upgraded to gradle 7.0.2 version. I am experiencing a problem that applying id "de.fuerstenau.buildconfig" version "1.1.8" throwing below gradle exception

Caused by: org.gradle.api.GradleException: Configuration not found

Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'compile' not found.
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.createNotFoundException(DefaultConfigurationContainer.java:165)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:333)
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:155)
at org.gradle.api.internal.artifacts.configurations.ConfigurationContainerInternal$getByName.call(Unknown Source)
at de.fuerstenau.gradle.buildconfig.BuildConfigPlugin.getCompileConfiguration(BuildConfigPlugin.groovy:73)

build.gradle

plugins {
id 'org.springframework.boot'
id 'java'
id 'war'
id "de.fuerstenau.buildconfig" version "1.1.8"
}

Please take a look

@heyalistair
Copy link

Also getting this error at 1.1.8 for gradle 7!

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':my-project'.
> Configuration <compile> not found.

@oizo
Copy link

oizo commented Sep 1, 2021

I've found a workaround, that seems to be working. I've just created an empty compile configuration.

configurations {
    create("compile")
}

But then I get a new issues which is:

Execution failed for task ':jar'.
> Entry com/fiftytwo/vim/BuildConfig.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Which is then solved by adding a DuplicatesStrategy to my jar task.

tasks {
    withType<Jar> {
        duplicatesStrategy = DuplicatesStrategy.INCLUDE
    }
}

I hope this will float the boat until a fix is out.

@NightXlt
Copy link

may be you could try a compatible 7.3.2 version made by myself: #31

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

4 participants