Tabnine Logo
TreeStream.toParent
Code IndexAdd Tabnine to your IDE (free)

How to use
toParent
method
in
com.diffplug.common.tree.TreeStream

Best Java code snippets using com.diffplug.common.tree.TreeStream.toParent (Showing top 1 results out of 315)

origin: diffplug/goomph

/**
 * @param project    the project on which we'll call {@link Project#javaexec(Action)}.
 * @param input        the JavaExecable which we'll take as input and call run() on.
 * @param settings    any extra settings you'd like to set on the JavaExec (e.g. heap)
 * @return the JavaExecable after it has had run() called.
 */
public static <T extends JavaExecable> T exec(Project project, T input, Action<JavaExecSpec> settings) throws Throwable {
  // copy the classpath from the project's buildscript (and its parents)
  List<FileCollection> classpaths = TreeStream.toParent(ProjectPlugin.treeDef(), project)
      .map(p -> p.getBuildscript().getConfigurations().getByName(BUILDSCRIPT_CLASSPATH))
      .collect(Collectors.toList());
  // add the gradleApi, workaround from https://discuss.gradle.org/t/gradle-doesnt-add-the-same-dependencies-to-classpath-when-applying-plugins/9759/6?u=ned_twigg
  classpaths.add(project.getConfigurations().detachedConfiguration(project.getDependencies().gradleApi()));
  // add stuff from the local classloader too, to fix testkit's classpath
  classpaths.add(project.files(JavaExecableImp.fromLocalClassloader()));
  // run it
  return JavaExecableImp.execInternal(input, project.files(classpaths), settings, execSpec -> JavaExecWinFriendly.javaExec(project, execSpec));
}
com.diffplug.common.treeTreeStreamtoParent

Javadoc

Creates a Stream that starts at node and ends at its root parent.

Popular methods of TreeStream

  • depthFirst
    Creates a Stream that starts at node and iterates deeper into the tree in a depth-first order.
  • breadthFirst
    Creates a Stream that starts at node and iterates deeper into the tree in a bread-first order.

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now