liquibase / liquibase-gradle-plugin

A Gradle plugin for Liquibase
Other
197 stars 57 forks source link

Fix call to set jvmArgs correctly. #114

Closed dthompson-galileo closed 1 year ago

dthompson-galileo commented 1 year ago

Add documentation on how to fix liquibase problem when plugin is used in subproject.

From the documentation of gradle 5.6.3 -> 7.6, the groovy DSL has never supported a setJvmArgs method. Maybe this was done in Kotlin at one time? But this corrects the issue when actually trying to set a JVM arg and getting method not found.

When building with a subproject, liquibase always tries to locate the changelog file in the root dir due to the fact that it's looking in USER_DIR. By being able to override the user.dir, you can set it to a projectDir and get liquibase to now locate the changelog file.

dthompson-galileo commented 1 year ago

I couldn't see a way to write a unit test for this. Sorry.