Tabnine Logo
Exec.doFirst
Code IndexAdd Tabnine to your IDE (free)

How to use
doFirst
method
in
org.gradle.api.tasks.Exec

Best Java code snippets using org.gradle.api.tasks.Exec.doFirst (Showing top 4 results out of 315)

origin: gradle.plugin.org.shipkit/shipkit

  public void execute(final Exec t) {
    t.setDescription("Overwrites local git 'user.email' with a generic email. Intended for CI.");
    t.doFirst(new Action<Task>() {
      public void execute(Task task) {
        //using doFirst() so that we request and validate presence of env var only during execution time
        //TODO consider adding 'lazyExec' task or method that automatically uses do first
        t.commandLine("git", "config", "--local", "user.email", conf.getGit().getEmail());
      }
    });
  }
});
origin: gradle.plugin.org.shipkit/shipkit

/**
 * Creates exec task with preconfigured defaults
 */
public static Exec execTask(Project project, String name, Action<Exec> configure) {
  final Exec exec = project.getTasks().create(name, Exec.class);
  exec.doFirst(new Action<Task>() {
    public void execute(Task task) {
      LOG.lifecycle("  Running:\n    {}", join(exec.getCommandLine(), " "));
    }
  });
  return configure(configure, exec);
}
origin: gradle.plugin.org.shipkit/shipkit

  public void execute(final Exec t) {
    t.setDescription("Overwrites local git 'user.name' with a generic name. Intended for CI.");
    //TODO replace all doFirst in this class with LazyConfiguration
    t.doFirst(new Action<Task>() {
      public void execute(Task task) {
        //using doFirst() so that we request and validate presence of env var only during execution time
        t.commandLine("git", "config", "--local", "user.name", conf.getGit().getUser());
      }
    });
  }
});
origin: dsyer/spring-boot-thin-launcher

exec.doFirst(new Action<Task>() {
  @SuppressWarnings("unchecked")
  @Override
org.gradle.api.tasksExecdoFirst

Popular methods of Exec

  • dependsOn
  • commandLine
  • exec
  • setDescription
  • setCommandLine
  • setGroup
  • workingDir
  • configure
  • doLast
  • execute
  • getCommandLine
  • getInputs
  • getCommandLine,
  • getInputs,
  • getOutputs,
  • mustRunAfter,
  • setIgnoreExitValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • String (java.lang)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
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