private List<TestflightTeam> createDefaultPlusAdditionalTeams() {
   List<TestflightTeam> allTeams = new ArrayList<TestflightTeam>();
   // first team is default
   allTeams.add(new TestflightTeam(getTokenPairName(), getFilePath(), getDsymPath()));
   if (additionalTeams != null) {
     allTeams.addAll(Arrays.asList(additionalTeams));
   }
   return allTeams;
 }
Exemplo n.º 2
0
  public static final class DescriptorImpl extends AbstractProjectDescriptor {
    /** Globally-defined MAVEN_OPTS. */
    private String globalMavenOpts;

    public DescriptorImpl() {
      super();
      load();
    }

    public String getGlobalMavenOpts() {
      return globalMavenOpts;
    }

    public void setGlobalMavenOpts(String globalMavenOpts) {
      this.globalMavenOpts = globalMavenOpts;
      save();
    }

    public String getDisplayName() {
      return Messages.MavenModuleSet_DiplayName();
    }

    public MavenModuleSet newInstance(String name) {
      return new MavenModuleSet(name);
    }

    public Maven.DescriptorImpl getMavenDescriptor() {
      return Hudson.getInstance().getDescriptorByType(Maven.DescriptorImpl.class);
    }

    @Override
    public boolean configure(StaplerRequest req, JSONObject o) {
      globalMavenOpts = Util.fixEmptyAndTrim(o.getString("globalMavenOpts"));
      save();

      return true;
    }

    @Override
    public boolean isApplicable(Descriptor descriptor) {
      return !NOT_APPLICABLE_TYPES.contains(descriptor.clazz);
    }

    private static final Set<Class> NOT_APPLICABLE_TYPES =
        new HashSet<Class>(
            Arrays.asList(
                Fingerprinter.class, // this kicks in automatically
                JavadocArchiver.class, // this kicks in automatically
                Mailer.class, // for historical reasons, Maven uses MavenMailer
                JUnitResultArchiver.class // done by SurefireArchiver
                ));
  }