liquibase / liquibase-gradle-plugin

A Gradle plugin for Liquibase
Other
198 stars 59 forks source link

Not supported by gradle version 8.* #150

Open janko-sokolovic opened 1 month ago

janko-sokolovic commented 1 month ago

After upgrading gradle wrapper to use 8.5 version, it is not allowing to use custom configuration in dependencies.

Is there a workaround?

Error: > Adding a Configuration as a dependency is no longer allowed as of Gradle 8.0.

For:

dependencies {
    liquibaseRuntime "org.liquibase:liquibase-core:4.3.2"
    liquibaseRuntime "org.liquibase.ext:liquibase-hibernate5:4.3.2"
    liquibaseRuntime sourceSets.main.compileClasspath
    liquibaseRuntime "org.postgresql:postgresql"

}
stevesaliman commented 1 month ago

I have a Gradle 8.6 project that works fine. There is a small difference in the way I added sourceSets.main.compileClasspath though. In my project I have

 configurations {
    liquibaseRuntime.extendsFrom sourceSets.main.compileClasspath
}

That way I don't need to add it explicitly to the liquibaseRuntime configuration, because it will already include it. I only need to add the other dependencies. Does this help in your situation?