Examples of GradleDependencyBuilder


Examples of org.jboss.forge.addon.gradle.projects.model.GradleDependencyBuilder

         for (InvocationWithMap mapInvocation : invocation.getInvocationsWithMap())
         {
            if (mapInvocation.getMethodName().equals(DIRECT_CONFIG))
            {
               Map<String, String> params = mapInvocation.getParameters();
               GradleDependencyBuilder dep = GradleDependencyBuilder.create()
                        .setGroup(params.get("group"))
                        .setName(params.get("name"))
                        .setConfiguration(GradleDependencyConfiguration.DIRECT);
               deps.add(dep);
            }
View Full Code Here

Examples of org.jboss.forge.addon.gradle.projects.model.GradleDependencyBuilder

   }

   public static String removeManagedDependency(String source, GradleDependency dep)
            throws UnremovableElementException
   {
      GradleDependencyBuilder builder = GradleDependencyBuilder.create(dep);
      builder.setConfigurationName(MANAGED_CONFIG);

      SimpleGroovyParser parser = SimpleGroovyParser.fromSource(source);
      for (InvocationWithClosure deps : allDependencyInvocations(parser))
      {
         // Search in map invocations
View Full Code Here

Examples of org.jboss.forge.addon.gradle.projects.model.GradleDependencyBuilder

      return gradleDep;
   }

   private static GradleDependency loadDependencyConfiguration(GradleDependency dep, InvocationWithClosure invocation)
   {
      GradleDependencyBuilder builder = GradleDependencyBuilder.create(dep);

      // Search for excludes
      List<GradleDependency> excludes = Lists.newArrayList();
      for (InvocationWithMap mapInvocation : invocation.getInvocationsWithMap())
      {
         if (mapInvocation.getMethodName().equals("exclude"))
         {
            String group = mapInvocation.getParameters().get("group");
            String module = mapInvocation.getParameters().get("module");

            // If group is not set then by default it uses dep group
            if (Strings.isNullOrEmpty(group))
            {
               group = dep.getGroup();
            }

            excludes.add(GradleDependencyBuilder.create().setGroup(group).setName(module));
         }
      }
      builder.setExcludedDependencies(excludes);

      return builder;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.