Partilhar via


XamarinAndroid@1 - Xamarin.Android v1 task

Use this task to build an Android app with Xamarin.

Inputs

projectFile - Project
Input alias: project. string. Required. Default value: **/*.csproj.

Specifies the relative path from repo root of Xamarin.Android project(s) to build. Wildcards can be used. For more information, see the File matching patterns reference. For example, **/*.csproj for all csproj files in all subfolders. The project must have a PackageForAndroid target if Create App Package is selected.


target - Target
string.

Specifies which targets to build in this project. Use a semicolon to separate multiple targets.


outputDirectory - Output directory
Input alias: outputDir. string.

Optional. Provides the output directory for the build. Example: $(build.binariesDirectory)/bin/Release.


configuration - Configuration
string.

Specifies the configuration you want to build. For example, debug or release.

Tip

Declare a build variable such as BuildConfiguration on the variables tab (selecting Allow at Queue Time) and reference it here as $(BuildConfiguration). You can then modify the platform when you queue the build and enable building multiple configurations.


createAppPackage - Create app package
boolean. Default value: true.

Passes the target, (/t:PackageForAndroid), during the build to generate an APK.


clean - Clean
boolean. Default value: false.

Passes the clean target, (/t:clean), during the build.


msbuildLocationOption - MSBuild
Input alias: msbuildLocationMethod. string. Allowed values: version, location (Specify Location). Default value: version.

Specifies the path to MSBuild (on Windows) or xbuild (on macOS). The default behavior is to search for the latest version.


msbuildVersionOption - MSBuild version
Input alias: msbuildVersion. string. Optional. Use when msbuildLocationMethod = version. Allowed values: latest, 15.0 (MSBuild 15.0), 14.0 (MSBuild 14.0), 12.0 (MSBuild 12.0), 4.0 (MSBuild 4.0). Default value: 15.0.

Specifies the use of the latest version if the preferred version cannot be found. On macOS, xbuild (Mono) or MSBuild (Visual Studio for Mac) will be used.


msbuildFile - MSBuild location
Input alias: msbuildLocation. string. Required when msbuildLocationMethod = location.

Optional. Supplies the path to MSBuild (on Windows) or xbuild (on macOS).


msbuildArchitectureOption - MSBuild architecture
Input alias: msbuildArchitecture. string. Optional. Use when msbuildLocationMethod = version. Allowed values: x86 (MSBuild x86), x64 (MSBuild x64). Default value: x86.

Supplies the architecture (x86, x64) of the MSBuild you want to run.


msbuildArguments - Additional arguments
string.

Specifies additional arguments passed to MSBuild (on Windows) or xbuild (on macOS).


jdkOption - Select JDK to use for the build
Input alias: jdkSelection. string. Required. Allowed values: JDKVersion (JDK Version), Path. Default value: JDKVersion.

Specifies the JDK version that the task uses during the build process. The JDKVersion value specifies a JDK version that the task discovers during builds. The Path value specifies a file path for a JDK version.


jdkVersionOption - JDK version
Input alias: jdkVersion. string. Optional. Use when jdkSelection = JDKVersion. Allowed values: default, 1.9 (JDK 9), 1.8 (JDK 8), 1.7 (JDK 7), 1.6 (JDK 6). Default value: default.

Specifies the JDK version to use during the build.


jdkDirectory - JDK path
Input alias: jdkUserInputPath. string. Required when jdkSelection = Path.

Specifies the JDK version to use during the build at the jdkSelection path.


jdkArchitectureOption - JDK architecture
Input alias: jdkArchitecture. string. Optional. Use when jdkVersion != default. Allowed values: x86, x64. Default value: x64.

Supplies the architecture (x86, x64) of JDK.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to build an Android app with Xamarin.

Examples

Requirements

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: MSBuild, Xamarin.Android
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.83.0 or greater
Task category Build