SAP / commerce-gradle-plugin

Gradle plugins for the full development lifecycle of a SAP Commerce project
Apache License 2.0
33 stars 12 forks source link

Lazy Configuration with fallback for Ant Task #32

Closed aepfli closed 2 years ago

aepfli commented 2 years ago

Currently, the Ant Task is evaluated during the Configuration phase, and it is not possible to add a dynamic configuration. With this change the ant properties are lazily evaluated, which allows to eg use outcomes of other tasks. Additionally, we provide a fallback - if a property is not set. This allows to define placeholders within the project.properties and a fallback if needed. Useful when you want to add the jacoco agent from gradle to the standalone.javaoptions.

This is just a proposal, i am not sure if this is actually desirable for this project

cla-assistant[bot] commented 2 years ago

CLA assistant check
All committers have signed the CLA.

mpern commented 2 years ago

I like it!

would mind pushing another commit? (can also be empty)

I had to change the GH Actions config, it was still referencing the master branch instead of main and needs a new commit to trigger.

aepfli commented 2 years ago

sure, can i also get your attention for https://github.com/aepfli/lyberator and what is your take on that?

aepfli commented 2 years ago

Oh I will check the failures and will try to provide a fix

aepfli commented 2 years ago

i am sorry i am struggeling a little bit with my replacement machine and windows - so i am not that good with testing different approaches, or at least i need to figure that out properly upfront. I ran the tests locally with 3 gradle versions now, and i only have one failure - but i am not sure if that is related to this changes

seems like this is a windows path issue

local.extensions.path[0].'@dir' == '${HYBRIS_BIN_DIR}/../../cloud-extension-pack'
|     |          |   |   |      |
|     |          |   |   |      false
|     |          |   |   ${HYBRIS_BIN_DIR}/..\..\cloud-extension-pack
|     |          |   groovy.util.slurpersupport.NodeChild@4cfadf4c
|     |          groovy.util.slurpersupport.NodeChildren@1c4a7d7e
|     groovy.util.slurpersupport.NodeChildren@780af38e
groovy.util.slurpersupport.NodeChild@5529530a
aepfli commented 2 years ago

created #33 for the path issue on windows

aepfli commented 2 years ago

i will rebase this branch, based on the recent changes in CI, etc

aepfli commented 2 years ago

TODOs:

mpern commented 2 years ago

Hi! @aepfli!

How is your progress on the open TODOs? I would like to release a new version of the plugin with this change plus #38 in the next few days.

Let me know if you need any support or if I should take care of the documentation and tests.