类 ObfArtifact

java.lang.Object
org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact
net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact
所有已实现的接口:
org.gradle.api.artifacts.PublishArtifact, org.gradle.api.Buildable, org.gradle.api.internal.artifacts.PublishArtifactInternal

public class ObfArtifact extends org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact
  • 构造器详细资料

    • ObfArtifact

      public ObfArtifact(org.gradle.api.tasks.bundling.AbstractArchiveTask toObf, ArtifactSpec artifactSpec, ReobfTask task)
      Creates an obfuscated artifact for the given public artifact.

      The file to obfuscate will be the file of the given artifact and the name of this obfuscated artifact will default to the name of the given artifact to obfuscate.

      The artifact to obfuscate may change after being used as the source.

      参数:
      toObf - The artifact that is to be obfuscated
      artifactSpec - The specification of how the obfuscated artifact is to be named
      task - The task(s) that will reobfuscate this jar.
    • ObfArtifact

      public ObfArtifact(org.gradle.api.artifacts.PublishArtifact toObf, ArtifactSpec artifactSpec, ReobfTask task)
      Creates an obfuscated artifact for the given public artifact.

      The file to obfuscate will be the file of the given artifact and the name of this obfuscated artifact will default to the name of the given artifact to obfuscate.

      The artifact to obfuscate may change after being used as the source.

      参数:
      toObf - The artifact that is to be obfuscated
      artifactSpec - The specification of how the obfuscated artifact is to be named
      task - The task(s) that will reobfuscate this jar.
    • ObfArtifact

      public ObfArtifact(File toObf, ArtifactSpec artifactSpec, ReobfTask task)
      Creates an obfuscated artifact for the given file.
      参数:
      toObf - The file that is to be obfuscated
      artifactSpec - The specification of how the obfuscated artifact is to be named
      task - The task(s) that will reobfuscate this jar.
    • ObfArtifact

      public ObfArtifact(groovy.lang.Closure<Object> toObf, ArtifactSpec outputSpec, ReobfTask task)
      Creates an obfuscated artifact for the file returned by the toObf closure.

      The closures will be evaluated on demand whenever the value is needed (e.g. at generation time)

      参数:
      toObf - A closure that produces a File for the object to obfuscate (non File return values will be used as the path to the file)
      outputSpec - The specification of artifact to outputted
      task - The task(s) that will reobfuscate this jar.
  • 方法详细资料

    • getToObf

      public File getToObf()
      The file that is to be obfuscated.
      返回:
      The file. May be null if unknown at this time.
    • getName

      public String getName()
      The name of the obfuscated artifact.

      Defaults to the name of the obfuscated artifact file.

      返回:
      The name. May be null if unknown at this time.
    • getClasspath

      public org.gradle.api.file.FileCollection getClasspath()
      The name of the obfuscated artifact.

      Defaults to the name of the obfuscated artifact file.

      返回:
      The name. May be null if unknown at this time.
    • getExtension

      public String getExtension()
      The extension of the obfuscated artifact.

      Defaults to '.jar'.

      返回:
      The extension. May be null if unknown at this time.
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getClassifier

      public String getClassifier()
      The classifier of the obfuscated artifact.

      Defaults to the classifier of the source artifact (if obfuscating an artifact) or the given classifier at construction (if given).

      返回:
      The classifier. May be null if unknown at this time.
    • getDate

      public Date getDate()
      The date of the obfuscated artifact.

      Defaults to the last modified time of the obfuscated file (if exists)

      返回:
      The date of the obfuscation. May be null if unknown at this time.
    • getFile

      public File getFile()
      The file for the obfuscated artifact, which may not yet exist.

      Defaults to a the getToObf() () file to obfuscate}

      返回:
      The obfuscated file. May be null if unknown at this time.
    • setName

      public void setName(String name)
    • setExtension

      public void setExtension(String extension)
    • setClassifier

      public void setClassifier(String classifier)
    • setDate

      public void setDate(Date date)
    • setFile

      public void setFile(File file)
    • setClasspath

      public void setClasspath(org.gradle.api.file.FileCollection classpath)
    • shouldBePublished

      public boolean shouldBePublished()