All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.csabasulyok.gradlelatex.CleanLatexAuxTask.groovy Maven / Gradle / Ivy

Go to download

This Gradle plugin allows automation of compiling PDFs using LaTeX and BiBTeX.

The newest version!
package com.github.csabasulyok.gradlelatex

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction

/**
 * Task to empty auxiliary folder used in LaTeX compilation.
 * 
 * @author csabasulyok
 */
class CleanLatexAuxTask extends DefaultTask {
  
  //===============================
  // Task description (Gradle API)
  //===============================
  
  String getGroup() {
    LatexPlugin.TASK_GROUP
  }
  String getDescription() {
    "Cleans all TeX auxiliary files (out, bbl, log, etc.) from ${project.latex.auxDir}"
  }

  
  //=============
  // Task action
  //=============
  
  /**
   * Main task action.
   * Empties auxiliary directory.
   */
  @TaskAction
  void clean() {
    project.latex.utils.emptyContent(project.latex.auxDir)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy