title | description | ms.date | monikerRange |
---|---|---|---|
XamarinAndroid@1 - Xamarin.Android v1 task |
Build an Android app with Xamarin. |
08/19/2024 |
<=azure-pipelines |
:::moniker range="=azure-pipelines"
XamarinAndroid@1 is deprecated. Originally, this task was used to build an Android app with Xamarin.
Note
This task is deprecated and was retired May 1, 2024.
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2022.2"
XamarinAndroid@1 is deprecated. Originally, this task was used to build an Android app with Xamarin.
Note
This task is deprecated and was retired May 1, 2024.
:::moniker-end
:::moniker range="=azure-pipelines-2018"
XamarinAndroid@1 is deprecated. Originally, this task was used to build an Android app with Xamarin.
Note
This task is deprecated and was retired May 1, 2024.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
# Xamarin.Android v1
# Build an Android app with Xamarin.
- task: XamarinAndroid@1
inputs:
projectFile: '**/*.csproj' # string. Alias: project. Required. Project. Default: **/*.csproj.
#target: # string. Target.
#outputDirectory: # string. Alias: outputDir. Output directory.
#configuration: # string. Configuration.
#createAppPackage: true # boolean. Create app package. Default: true.
#clean: false # boolean. Clean. Default: false.
# MSBuild Options
#msbuildLocationOption: 'version' # 'version' | 'location'. Alias: msbuildLocationMethod. MSBuild. Default: version.
#msbuildVersionOption: '15.0' # 'latest' | '17.0' | '16.0' | '15.0' | '14.0' | '12.0' | '4.0'. Alias: msbuildVersion. Optional. Use when msbuildLocationMethod = version. MSBuild version. Default: 15.0.
#msbuildFile: # string. Alias: msbuildLocation. Required when msbuildLocationMethod = location. MSBuild location.
#msbuildArchitectureOption: 'x86' # 'x86' | 'x64'. Alias: msbuildArchitecture. Optional. Use when msbuildLocationMethod = version. MSBuild architecture. Default: x86.
#msbuildArguments: # string. Additional arguments.
# JDK Options
jdkOption: 'JDKVersion' # 'JDKVersion' | 'Path'. Alias: jdkSelection. Required. Select JDK to use for the build. Default: JDKVersion.
#jdkVersionOption: 'default' # 'default' | '1.11' | '1.10' | '1.9' | '1.8' | '1.7' | '1.6'. Alias: jdkVersion. Optional. Use when jdkSelection = JDKVersion. JDK version. Default: default.
#jdkDirectory: # string. Alias: jdkUserInputPath. Required when jdkSelection = Path. JDK path.
#jdkArchitectureOption: 'x64' # 'x86' | 'x64'. Alias: jdkArchitecture. Optional. Use when jdkVersion != default. JDK architecture. Default: x64.
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2020.1"
# Xamarin.Android v1
# Build an Android app with Xamarin.
- task: XamarinAndroid@1
inputs:
projectFile: '**/*.csproj' # string. Alias: project. Required. Project. Default: **/*.csproj.
#target: # string. Target.
#outputDirectory: # string. Alias: outputDir. Output directory.
#configuration: # string. Configuration.
#createAppPackage: true # boolean. Create app package. Default: true.
#clean: false # boolean. Clean. Default: false.
# MSBuild Options
#msbuildLocationOption: 'version' # 'version' | 'location'. Alias: msbuildLocationMethod. MSBuild. Default: version.
#msbuildVersionOption: '15.0' # 'latest' | '15.0' | '14.0' | '12.0' | '4.0'. Alias: msbuildVersion. Optional. Use when msbuildLocationMethod = version. MSBuild version. Default: 15.0.
#msbuildFile: # string. Alias: msbuildLocation. Required when msbuildLocationMethod = location. MSBuild location.
#msbuildArchitectureOption: 'x86' # 'x86' | 'x64'. Alias: msbuildArchitecture. Optional. Use when msbuildLocationMethod = version. MSBuild architecture. Default: x86.
#msbuildArguments: # string. Additional arguments.
# JDK Options
jdkOption: 'JDKVersion' # 'JDKVersion' | 'Path'. Alias: jdkSelection. Required. Select JDK to use for the build. Default: JDKVersion.
#jdkVersionOption: 'default' # 'default' | '1.11' | '1.10' | '1.9' | '1.8' | '1.7' | '1.6'. Alias: jdkVersion. Optional. Use when jdkSelection = JDKVersion. JDK version. Default: default.
#jdkDirectory: # string. Alias: jdkUserInputPath. Required when jdkSelection = Path. JDK path.
#jdkArchitectureOption: 'x64' # 'x86' | 'x64'. Alias: jdkArchitecture. Optional. Use when jdkVersion != default. JDK architecture. Default: x64.
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
:::moniker range="<=azure-pipelines"
target
- Target
string
.
Specifies which targets to build in this project. Use a semicolon to separate multiple targets.
:::moniker-end
:::moniker range="<=azure-pipelines"
outputDirectory
- Output directory
Input alias: outputDir
. string
.
Optional. Provides the output directory for the build. Example: $(build.binariesDirectory)/bin/Release.
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
:::moniker range="<=azure-pipelines"
createAppPackage
- Create app package
boolean
. Default value: true
.
Passes the target, (/t:PackageForAndroid)
, during the build to generate an APK.
:::moniker-end
:::moniker range="<=azure-pipelines"
clean
- Clean
boolean
. Default value: false
.
Passes the clean target, (/t:clean)
, during the build.
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
msbuildVersionOption
- MSBuild version
Input alias: msbuildVersion
. string
. Optional. Use when msbuildLocationMethod = version
. Allowed values: latest
, 17.0
(MSBuild 17.0), 16.0
(MSBuild 16.0), 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.
:::moniker-end
:::moniker range="<=azure-pipelines-2020.1"
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.
:::moniker-end
:::moniker range="<=azure-pipelines"
msbuildFile
- MSBuild location
Input alias: msbuildLocation
. string
. Required when msbuildLocationMethod = location
.
Optional. Supplies the path to MSBuild (on Windows) or xbuild (on macOS).
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
:::moniker range="<=azure-pipelines"
msbuildArguments
- Additional arguments
string
.
Specifies additional arguments passed to MSBuild (on Windows) or xbuild (on macOS).
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
jdkVersionOption
- JDK version
Input alias: jdkVersion
. string
. Optional. Use when jdkSelection = JDKVersion
. Allowed values: default
, 1.11
(JDK 11), 1.10
(JDK 10 (out of support)), 1.9
(JDK 9 (out of support)), 1.8
(JDK 8), 1.7
(JDK 7), 1.6
(JDK 6 (out of support)). Default value: default
.
Specifies the JDK version to use during the build.
:::moniker-end
:::moniker range="<=azure-pipelines"
jdkDirectory
- JDK path
Input alias: jdkUserInputPath
. string
. Required when jdkSelection = Path
.
Specifies the JDK version to use during the build at the jdkSelection
path.
:::moniker-end
:::moniker range="<=azure-pipelines"
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.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range="<=azure-pipelines"
None.
:::moniker-end
Use this task to build an Android app with Xamarin.
:::moniker range="<=azure-pipelines"
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 |
:::moniker-end