Default values in sub-project that can be overridden by parent project

Hi,

I would like to configure sub-project with default properties. These default values could then be overridden by the parent project. Ideally, I would like to use ConfigSlurper.
Given the following config object in the sub-project:

config.val1=default_val1
config.val2=default_val2

I will describe a few scenarios:

  1. if no config object is provided in the parent project, the subj-project would use the default vaues provided above;

  2. given the following config object in the parent project

    config.val1=custom_val1
    

    the subproject would use:

    config.val1=custom_val1
    config.val2=default_val2
    

Is there an elegant way to achieve this?

Ok, the answer is here.