Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subproject-only variables and extensions #19

Closed
uzzu opened this issue Nov 8, 2021 · 5 comments
Closed

Support subproject-only variables and extensions #19

uzzu opened this issue Nov 8, 2021 · 5 comments
Assignees
Milestone

Comments

@uzzu
Copy link
Owner

uzzu commented Nov 8, 2021

The plugin refers only to .env file in root project directory, and could not create environement variable extension which only to use in subproject.
So organization of environment variable names makes complicated for a bit. (e.g. Appends prefix to name.)

This feature reduces complexity of environment variable names.

(Root).
├── .env                 # Adds extension to all subprojects.
├── .env.template        # Adds extension to all subprojects.
├── build.gradle.kts
├── settings.gradle.kts
├── foo
│   ├── .env             # Adds extension only to subproject ':foo'.
│   ├── .env.template    # Adds extension only to subproject ':foo'.
│   ├── build.gradle.kts
│   └── src
└── bar
    ├── .env             # Adds extension only to subproject ':bar'.
    ├── .env.template    # Adds extension only to subproject ':bar'.
    ├── build.gradle.kts
    └── src
@uzzu uzzu self-assigned this Nov 8, 2021
@uzzu
Copy link
Owner Author

uzzu commented Nov 8, 2021

Supporting entire directory hierarchy is out of scope for this issue, as shown below.

(Root).
├── .env                 # Adds extension to all subprojects.
├── .env.template        # Adds extension to all subprojects.
├── build.gradle.kts
├── settings.gradle.kts
└── subprojects
    ├── .env             # [!] Does not refer.
    ├── .env.template    # [!] Does not refer.
    ├── foo
    │   ├── .env             # Adds extension only to subproject ':subprojects:foo'.
    │   ├── .env.template    # Adds extension only to subproject ':subprojects:foo'.
    │   ├── build.gradle.kts
    │   └── src
    └── bar
        ├── .env             # Adds extension only to subproject ':subprojects:bar'.
        ├── .env.template    # Adds extension only to subproject ':subprojects:bar'.
        ├── build.gradle.kts
        └── src

Because in Gradle, the directory hierarchy only means default name of subproject. (so it can be changed)

@uzzu uzzu added this to the 2.x milestone Nov 12, 2021
@abcfy2
Copy link

abcfy2 commented Feb 7, 2022

How is this issue going now? I need this feature. Thanks.

I want to put .env file into subproject directory. But it's not working in current version 1.2.0.

@uzzu
Copy link
Owner Author

uzzu commented Feb 19, 2022

@abcfy2

Thanks for the comments.
Sorry but I had to suspended development.

If you put the .env file in the root project directory, it will be added dotenv variables in the subproject extension. It's currently workaround. But you mean you want to put only into subproject directory, right?

@abcfy2
Copy link

abcfy2 commented Feb 19, 2022

Yes. If .env is in subproject root directory, it should be an subproject only variable.

This was referenced Feb 28, 2022
@uzzu
Copy link
Owner Author

uzzu commented Mar 2, 2022

@abcfy2

Released in 2.0.0. 🎉
If you have any problems using it, please create an issue and give us feedback.

@uzzu uzzu closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants