jfrog / artifactory-gradle-plugin

JFrog Gradle plugin for Build Info extraction and Artifactory publishing.
Apache License 2.0
20 stars 15 forks source link

Sub-project can't specify individual properties #115

Open enaess opened 1 month ago

enaess commented 1 month ago

How can we help?

This question was asked previously on stackoverflow.com: https://stackoverflow.com/questions/48007689/artifactory-gradle-and-properties-mutation-by-artifactorypublish-task-dsl

And a GIST: was put out on GitHub here: https://github.com/lavcraft/gradle-artifactory-build-info-extractor-problems/tree/master

Essentially, i have the root project per documentation configuring access to artifactory:

artifactory {
  contextUrl = project.findProperty('artifactory_contextUrl')
  publish {
      repository {
        repoKey = 'libs-snapshot-local'
        username = project.findProperty('artifactory_user')
        password = project.findProperty('artifactory_password')
      }

      defaults {
        publications('nebula')
        publishConfigs('archives')
        publishIvy = false
        properties {
          nebula '*:*:*:*@*', 'want_to_add':'but not' // add only to *.pom artifacts. Why?
          mavenJava commonProperties, '*:*:*:*@*'
        }
      }
    }
 }

A sub-project adds a configuration and then tries to configure the properties closure:

artifactoryPublish {
  properties = ['aa':'aaa']
  properties {
    nebula '*:*:*:*@*', 'not_added_prop':'sub0'
  }
}

I can't seem to use the

artifactoryPublish { 
    properties {
        all '*:*:*:*@*', prop1: "value1"
    }
} 

Would someone please have a look to see if I completely miss-understood how this would work here?

enaess commented 1 month ago

@yahavi You have any insights here?