Groovy Documentation

com.github.abrarsyed.gmcp.tasks.obfuscate
[Groovy] Class ObfArtifact

java.lang.Object
  org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact
      com.github.abrarsyed.gmcp.tasks.obfuscate.ObfArtifact

class ObfArtifact
extends AbstractPublishArtifact

Property Summary
java.lang.String classifier

java.util.Date date

java.lang.String extension

java.io.File file

java.lang.String name

ArtifactSpec outputSpec

java.io.File srg

PublishArtifact toObfArtifact

java.lang.String type

 
Constructor Summary
ObfArtifact(PublishArtifact toObf, ArtifactSpec artifactSpec, ReobfTask task)

Creates an obfuscated artifact for the given public artifact.

ObfArtifact(java.io.File toObf, ArtifactSpec artifactSpec, ReobfTask task)

Creates an obfuscated artifact for the given file.

ObfArtifact(groovy.lang.Closure toObf, ArtifactSpec outputSpec, ReobfTask task)

Creates an obfuscated artifact for the file returned by the toObf closure.

 
Method Summary
void generate()

Obfuscates the file

java.lang.String getClassifier()

The classifier of the obfuscated artifact.

java.util.Date getDate()

The date of the obfuscated artifact.

java.lang.String getExtension()

The extension of the obfuscated artifact.

java.io.File getFile()

The file for the obfuscated artifact, which may not yet exist.

java.lang.String getName()

The name of the obfuscated artifact.

java.io.File getToObf()

The file that is to be obfuscated.

java.lang.String getType()

 

Property Detail

classifier

java.lang.String classifier


date

java.util.Date date


extension

java.lang.String extension


file

java.io.File file


name

java.lang.String name


outputSpec

final ArtifactSpec outputSpec


srg

java.io.File srg


toObfArtifact

final PublishArtifact toObfArtifact


type

java.lang.String type


 
Constructor Detail

ObfArtifact

ObfArtifact(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.

Parameters:
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 invoke generate() on this jar (optional)


ObfArtifact

ObfArtifact(java.io.File toObf, ArtifactSpec artifactSpec, ReobfTask task)
Creates an obfuscated artifact for the given file.
Parameters:
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 invoke generate() on this jar (optional)


ObfArtifact

ObfArtifact(groovy.lang.Closure 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)

Parameters:
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 invoke generate() on this jar (optional)


 
Method Detail

generate

void generate()
Obfuscates the file
throws:
org.gradle.api.InvalidUserDataException if the there is insufficient information available to generate the signature.


getClassifier

java.lang.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).

Returns:
The classifier. May be null if unknown at this time.


getDate

java.util.Date getDate()
The date of the obfuscated artifact.

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

Returns:
The date of the obfuscation. May be null if unknown at this time.


getExtension

java.lang.String getExtension()
The extension of the obfuscated artifact.

Defaults to '.jar'.

Returns:
The extension. May be null if unknown at this time.


getFile

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

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

Returns:
The obfuscated file. May be null if unknown at this time.


getName

java.lang.String getName()
The name of the obfuscated artifact.

Defaults to the name of the obfuscated artifact file.

Returns:
The name. May be null if unknown at this time.


getToObf

java.io.File getToObf()
The file that is to be obfuscated.
Returns:
The file. May be null if unknown at this time.


getType

java.lang.String getType()


 

Groovy Documentation