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

Add a lazy way to set publishing maven repository directory #25850

Closed
liutikas opened this issue Jul 20, 2023 · 2 comments
Closed

Add a lazy way to set publishing maven repository directory #25850

liutikas opened this issue Jul 20, 2023 · 2 comments
Labels
closed:duplicate Duplicated or superseeded by another issue

Comments

@liutikas
Copy link
Contributor

Expected Behavior

publishing {
    repositories {
        maven {
          someNewApi.set(layout.buildDirectory.dir("repos/releases"))
          ...

A way to set maven publishing directory in a lazy way so that this directory is not resolved at until the task to publish is run or input checked.

Current Behavior (optional)

Gradle publishing docs suggest to use:

publishing {
    repositories {
        maven {
            // change to point to your repo, e.g. http://my.org/repo
            url = uri(layout.buildDirectory.dir("repo"))
        }
    }
}

However, Project.uri causes the type to be resolved right away, thus if the buildDirectory value is changed after this code is executed, the value set is obsolete.

Context

Attempting to write publishing code for our libraries that is not sensitive to when the buildDirectory is changed.

@liutikas liutikas added a:feature A new functionality to-triage labels Jul 20, 2023
@hfhbd
Copy link
Contributor

hfhbd commented Jul 21, 2023

Maybe duplicate of #22779?

@ov7a
Copy link
Member

ov7a commented Jul 24, 2023

Thank you for your interest in Gradle!

This issue will be closed as a duplicate of

Please add your use case and 👍 to that issue.

@hfhbd thanks for the hint!

@ov7a ov7a closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2023
@ov7a ov7a added closed:duplicate Duplicated or superseeded by another issue and removed a:feature A new functionality to-triage labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:duplicate Duplicated or superseeded by another issue
Projects
None yet
Development

No branches or pull requests

3 participants