Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-192

embedded gradle shrinkwrap-resolver - propagate project properties via API

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      I'd like to propagate project properties to embedded gradle build.

      I tried following:

       ShrinkWrap.create(EmbeddedGradleImporter.class)
              .forThisProjectDirectory().forTasks("build").withArguments("-x", "test", "-Psomepropname=somepropvalue")
              .importBuildOutput().as(WebArchive.class)
      

      but the somepropname is not set in embedded build.

      Using the gradle.properties is not an option for me, as somepropname value changes from build to build.

      Workaround was to write temp properties file and read it in embedded build with silent failure (as suggested here: http://issues.gradle.org/browse/GRADLE-1419?focusedCommentId=16245&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16245) but that sounds too much work to do for such a simple task.

              mmatloka Michal Matloka (Inactive)
              typek_pb Peter Butkovic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: