stevesaliman / gradle-properties-plugin

Gradle plugin to simplify loading project properties from external environment specific files
Apache License 2.0
192 stars 28 forks source link

Plugin doesn't use specified path as the source of environment specific files in multi modules gradle project #43

Open tyz51 opened 1 year ago

tyz51 commented 1 year ago

I have pretty classic multi modules gradle project:

── api_test │ ... │ └── build.gradle ── ui_test │ ... │ └── build.gradle └── settings.gradle

In ui_test module in build.gradle file I specified the "special" path to the properties folder. Prop files in this folder, for sure, in gradle-{env}.properties format. Code I have in the build.gradle file.

environmentFileDir='./src/gen/recources/dowloaded_properties'
apply plugin: 'net.sailman.properties'.    //ver.1.5.2

Then I get the error below: _Environment directory './src/gen/recources/dowloadedproperties' does not exists, or is not a readable directory

Have to say plugin with the same config and usual project works. Any ideas how to fix that? Thanks!

UPD. Might it be related to blocking files if the project multi modules?

stevesaliman commented 1 year ago

Sorry for the late, late reply.

A couple of questions tome to mind. Is the plugin applied only to the ui_test project? And what would happen if you changed the environmentFileDir to just src/gen/resources/downloaded_properties to make it relative to the project directory instead of the current directory?