/** * Sets the "unless" condition to test on execution. This is the * name of a property to test for existence - if the property * is set, the task will not execute. The property goes * through property substitution once before testing, so if * property <code>foo</code> has value <code>bar</code>, setting * the "unless" condition to <code>${foo}_x</code> will mean that the * task will only execute if property <code>bar_x</code> isn't set. * * @param property The property condition to test on execution. * May be <code>null</code>, in which case * no "unless" test is performed. */ public void setUnless(String property) { unlessString = property == null ? "" : property; setUnless(() -> { PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject()); Object o = propertyHelper.parseProperties(unlessString); return !propertyHelper.testUnlessCondition(o); }); }
target.setUnless(unlessCond); target.setDescription(description); helperImpl.project.addTarget(name, target);
break; case "unless": target.setUnless(value); break; case "id":