I'm using gradle credentials plugin to pass user and password database to liquibase plugin. Also, I'm using spring data repositories and hibernate for data layer and i want to pass it the same configuration of liquibase plugin. There is a way to pass the credentials through gradle (I don't want to create application.properties file because the credentials are already stored on the credentials plugin)?
I'm using the following code to pass credentials to liquibase:
def changelog = "$projectDir/src/main/resources/db_version/changelog-master.xml"
def urlDatabase = ...
def schema = ...
liquibase {
activities{
main {
changeLogFile changelog
url urlDatabase
username credentials.devUsr
password credentials.devPass
defaultSchemaName schema
}
}
}
and i want to do something like:
datasource{
username credentials.devUsr
password credentials.devPass
}
or maybe writing the properies:
spring.datasource.username credentials.devUsr
spring.datasource.password credentials.devPass