类 ObfArtifact
- 所有已实现的接口:
org.gradle.api.artifacts.PublishArtifact,org.gradle.api.Buildable,org.gradle.api.internal.artifacts.PublishArtifactInternal
-
构造器概要
构造器构造器说明ObfArtifact(groovy.lang.Closure<Object> toObf, ArtifactSpec outputSpec, ReobfTask task) Creates an obfuscated artifact for the file returned by thetoObfclosure.ObfArtifact(File toObf, ArtifactSpec artifactSpec, ReobfTask task) Creates an obfuscated artifact for the given file.ObfArtifact(org.gradle.api.artifacts.PublishArtifact toObf, ArtifactSpec artifactSpec, ReobfTask task) Creates an obfuscated artifact for the given public artifact.ObfArtifact(org.gradle.api.tasks.bundling.AbstractArchiveTask toObf, ArtifactSpec artifactSpec, ReobfTask task) Creates an obfuscated artifact for the given public artifact. -
方法概要
修饰符和类型方法说明The classifier of the obfuscated artifact.org.gradle.api.file.FileCollectionThe name of the obfuscated artifact.getDate()The date of the obfuscated artifact.The extension of the obfuscated artifact.getFile()The file for the obfuscated artifact, which may not yet exist.getName()The name of the obfuscated artifact.getToObf()The file that is to be obfuscated.getType()voidsetClassifier(String classifier) voidsetClasspath(org.gradle.api.file.FileCollection classpath) voidvoidsetExtension(String extension) voidvoidvoidboolean从类继承的方法 org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact
builtBy, getBuildDependencies, toString
-
构造器详细资料
-
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 obfuscatedartifactSpec- The specification of how the obfuscated artifact is to be namedtask- 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 obfuscatedartifactSpec- The specification of how the obfuscated artifact is to be namedtask- The task(s) that will reobfuscate this jar.
-
ObfArtifact
Creates an obfuscated artifact for the given file.- 参数:
toObf- The file that is to be obfuscatedartifactSpec- The specification of how the obfuscated artifact is to be namedtask- The task(s) that will reobfuscate this jar.
-
ObfArtifact
Creates an obfuscated artifact for the file returned by thetoObfclosure.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 outputtedtask- The task(s) that will reobfuscate this jar.
-
-
方法详细资料
-
getToObf
The file that is to be obfuscated.- 返回:
- The file. May be
nullif unknown at this time.
-
getName
The name of the obfuscated artifact.Defaults to the name of the obfuscated artifact
file.- 返回:
- The name. May be
nullif 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
nullif unknown at this time.
-
getExtension
The extension of the obfuscated artifact.Defaults to '.jar'.
- 返回:
- The extension. May be
nullif unknown at this time.
-
getType
-
setType
-
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
nullif unknown at this time.
-
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
nullif unknown at this time.
-
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
nullif unknown at this time.
-
setName
-
setExtension
-
setClassifier
-
setDate
-
setFile
-
setClasspath
public void setClasspath(org.gradle.api.file.FileCollection classpath) -
shouldBePublished
public boolean shouldBePublished()
-