truelicense:obfuscate-test-classes

Full name:

net.truelicense:truelicense-maven-plugin:3.2.0:obfuscate-test-classes

Description:

Transforms the byte code of the test class files in order to obfuscate all constant string values in scope.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: TrueLicense 2.4.
  • Binds by default to the lifecycle phase: process-test-classes.

Optional Parameters

Name Type Since Description
intern boolean TrueLicense 2.4 Whether or not a call to java.lang.String.intern() shall get added when computing the original constant string values again. Use this to preserve the identity relation of constant string values if required.
Default value is: true.
User property is: truelicense.obfuscate.intern.
maxBytes int TrueLicense 2.4 The maximum allowed size of a class file in bytes.
Default value is: 65536.
User property is: truelicense.obfuscate.maxBytes.
methodNameFormat String TrueLicense 2.4 The format for synthesized method names. This a format string for the class Formatter. It's first parameter is a string identifier for the obfuscation stage and its second parameter is an integer index for the synthesized method.
Default value is: _%s#%d.
User property is: truelicense.obfuscate.methodNameFormat.
scope Scope TrueLicense 2.4 The scope of constant string value obfuscation:
  • Use none to skip obfuscation.
  • Use annotated to obfuscate only constant string values of fields which have been annotated with @Obfuscate.
  • Use all to obfuscate all constant string values. This may result in quite some code size and runtime overhead, so you should not use this in general.

Default value is: annotated.
User property is: truelicense.obfuscate.scope.

Parameter Details

intern:

Whether or not a call to java.lang.String.intern() shall get added when computing the original constant string values again. Use this to preserve the identity relation of constant string values if required.
  • Type: boolean
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.obfuscate.intern
  • Default: true

maxBytes:

The maximum allowed size of a class file in bytes.
  • Type: int
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.obfuscate.maxBytes
  • Default: 65536

methodNameFormat:

The format for synthesized method names. This a format string for the class Formatter. It's first parameter is a string identifier for the obfuscation stage and its second parameter is an integer index for the synthesized method.
  • Type: java.lang.String
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.obfuscate.methodNameFormat
  • Default: _%s#%d

scope:

The scope of constant string value obfuscation:
  • Use none to skip obfuscation.
  • Use annotated to obfuscate only constant string values of fields which have been annotated with @Obfuscate.
  • Use all to obfuscate all constant string values. This may result in quite some code size and runtime overhead, so you should not use this in general.
  • Type: net.truelicense.maven.plugin.obfuscation.Scope
  • Since: TrueLicense 2.4
  • Required: No
  • User Property: truelicense.obfuscate.scope
  • Default: annotated