Helper extension to package your artifacts for delivery.
Usage:
packager {
app {
...
}
lib {
...
}
javadoc {
...
}
stepCounter {
...
}
}
| Modifiers | Name | Description |
|---|---|---|
protected ApplicationPackage[] |
appPackages |
|
protected static String |
extensionName |
|
protected JavaDocSettings[] |
javaDocSettings |
|
protected LibraryPackage[] |
libPackages |
|
protected static Project |
project |
|
protected StepCounterSettings[] |
stepCounterSettings |
| Type | Name and description |
|---|---|
boolean |
debugIf set to true, debug messages will be printed. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
app(Closure<ApplicationPackage> appClosure)Configures an Android application artifact to be packaged. |
|
void |
javadoc(Closure<JavaDocSettings> javadocClosure)Configures Javadoc artifact to be packaged. |
|
void |
lib(Closure<LibraryPackage> libClosure)Configures an Android library artifact to be packaged. |
|
void |
stepCounter(Closure<StepCounterSettings> stepCounterClosure)Configures an Amateras StepCounter artifact to be packaged. |
If set to true, debug messages will be printed. This is false by default.
Configures an Android application artifact to be packaged.
Usage:
packager {
app {
variant = <com.android.build.gradle.api.ApplicationVariant>
apkFile = <File>
unsignedApkFile = <File>
proguardMapDir = <File>
}
}
variant - The build variant of the application to be packaged. This property
is mandatory.
apkFile - The file to where the APK will be exported. Note that this may be
a signed or unsigned APK depending on the signing configuration. If this points
to an existing file, that file will be overwritten. This property is optional
if unsignedApkFile is already defined; that is, at least one of them
must be present. If this is not specified, then only unsignedApkFile will be
exported.
unsignedApkFile - The file to where the unsigned APK will be exported. If
this points to an existing file, that file will be overwritten. This property is
optional if apkFile is already defined; that is, at least one of them
must be present. If this is not specified, then only apkFile will be
exported.
proguardMapDir - The directory where the Proguard map files will be exported.
This property is optional. If this is not specified, then the Proguard map
files will not be exported.
appClosure - ApplicationPackage closure for setting up the build configuration.Configures Javadoc artifact to be packaged.
Note that this uses SyntaxHighlighter to beautify code snippets in your Javadoc.
Usage:
packager {
javadoc {
variant = <com.android.build.gradle.api.BaseVariant>
outputZipFile = <File>
javadocTitle = <String>
windowTitle = <String>
failOnError = <boolean>
javadocMemberLevel = <JavadocMemberLevel>
additionalSourceFiles = <ConfigurableFileCollection>
additionalClasspathFiles = <ConfigurableFileCollection>
excludes = <List<String>>
optionsFile = <String>
}
}
variant - The build variant of the module for which Javadoc will be
configured. This property is mandatory.
outputZipFile - The zip file to where the Javadoc will be stored. If this
points to an existing file, that file will be overwritten. This property is
mandatory.
javadocTitle - The title of the Javadoc to be generated. This property is
optional.
windowTitle - The title to be displayed on the browser window. This property
is optional.
failOnError - If set to true, aborts the Javadoc generation if there
are errors in the Javadoc comments. Otherwise, attempt to continue. This property
is optional and is false by default.
javadocMemberLevel - Specifies which members are included in the Javadoc
based on their visibility level. This value maps to the -public,
-protected, -package and -private options of the
javadoc executable. This property is optional and defaults to
JavadocMemberLevel.PROTECTED.
additionalSourceFiles - List of additional source files to be included in the
Javadoc. This property is optional. The variant's source files are already
included, so there's no need to add them in this property.
additionalClasspathFiles - List of additional class paths used to resolve
type references in the source codes. This property is optional. The
variant's classpath as well as the Android library are already included, so there's
no need to add them in this property.
excludes - Set of patterns for files to be excluded from Javadoc. This
property is optional.
excludes - Set of patterns for files to be excluded from Javadoc. This
property is optional.
optionsFile - File containing a list of additional Javadoc tool
options. This property is optional.
javadocClosure - JavaDocSettings closure for setting up Javadoc.Configures an Android library artifact to be packaged.
Usage:
packager {
lib {
variant = <com.android.build.gradle.api.LibraryVariant>
aarFile = <File>
jarFile = <File>
proguardMapDir = <File>
}
}
variant - The build variant of the library to be packaged. This property is
mandatory.
aarFile - The file to where the AAR will be exported. If this points to
an existing file, that file will be overwritten. This property is optional
if jarFile is already defined; that is, at least one of them must be
present. If this is not specified, then only the JAR file will be exported.
jarFile - The file to where the JAR will be exported. If this points to
an existing file, that file will be overwritten. This property is optional
if aarFile is already defined; that is, at least one of them must be
present. If this is not specified, then only the AAR file will be exported.
proguardMapDir - The directory where the Proguard map files will be exported.
This property is optional. If this is not specified, then the Proguard map
files will not be exported.
appClosure - LibraryPackage closure for setting up the build configuration.Configures an Amateras StepCounter artifact to be packaged.
Usage:
packager {
stepCounter {
variant = <com.android.build.gradle.api.BaseVariant>
outputCsvFile = <File>
additionalSourceFiles = <ConfigurableFileCollection>
includes = <List<String>>
excludes = <List<String>>
}
}
variant - The build variant of the module to be processed. This property is
mandatory.
outputCsvFile - The CSV report file to be generated. If this points to an
existing file, that file will be overwritten. This property is mandatory.
additionalSourceFiles - List of additional source files to be included in the
report. This property is optional. The variant's source files
(variant.javaCompile.source) are already included, so there's no need to add them in
this property.
includes - Set of patterns for files to be included in the report. This
property is optional.
excludes - Set of patterns for files to be excluded in the report. This
property is optional.
stepCounterClosure - StepCounterSettings closure for setting up StepCounter.