Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .config/tsaoptions-v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"instanceUrl": "https://devdiv.visualstudio.com/",
"projectName": "DevDiv",
"areaPath": "DevDiv\\.NET MAUI\\Android",
"iterationPath": "DevDiv",
"allTools": true
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ TestResult-*.xml
**/TestResults/*.trx
.vs/
*.nupkg

# Build logs
*.binlog
16 changes: 8 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Note: MUST be imported *after* $(Configuration) is set! -->

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<!-- Disables the transitive restore of packages like Microsoft.AspNetCore.App.Ref, Microsoft.WindowsDesktop.App.Ref -->
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
<DotNetTargetFrameworkVersion>10.0</DotNetTargetFrameworkVersion>
<DotNetTargetFramework>net$(DotNetTargetFrameworkVersion)</DotNetTargetFramework>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>latest</LangVersion>
<!-- Disable Arcade XLF generation — localization is managed via satellite .resx files directly.
Prevents MSB3577 collision between Resources.cs.resx (Czech) and generated XLF resources. -->
<UsingToolXliff>false</UsingToolXliff>
</PropertyGroup>
<Import
Project="$(MSBuildThisFileDirectory)Configuration.Override.props"
Expand All @@ -16,11 +23,4 @@
Project="$([System.IO.Path]::GetDirectoryName($(MSBuildThisFileDirectory))).override.props"
Condition=" Exists('$([System.IO.Path]::GetDirectoryName($(MSBuildThisFileDirectory))).override.props') "
/>
<PropertyGroup>
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)</IntermediateOutputPath>
<BuildToolOutputFullPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\</BuildToolOutputFullPath>
<ToolOutputFullPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</ToolOutputFullPath>
<TestOutputFullPath>$(MSBuildThisFileDirectory)bin\Test$(Configuration)\</TestOutputFullPath>
</PropertyGroup>
</Project>
15 changes: 1 addition & 14 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<GitThisAssembly>false</GitThisAssembly>
<GitDefaultBranch>main</GitDefaultBranch>
</PropertyGroup>

<Target Name="SetVersion" BeforeTargets="GetAssemblyVersion;GetPackageVersion;GenerateNuspec" DependsOnTargets="GitVersion">
<PropertyGroup>
<Version>$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)</Version>
<PackageVersion>$(Version)$(PackageVersionSuffix)</PackageVersion>
<InformationalVersion>$(Version); git-rev-head:$(GitCommit); git-branch:$(GitBranch)</InformationalVersion>
</PropertyGroup>
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<Import
Project="$([System.IO.Path]::GetDirectoryName($(MSBuildThisFileDirectory))).override.targets"
Expand Down
1 change: 0 additions & 1 deletion GitInfo.txt

This file was deleted.

1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<!-- ensure only the sources defined below are used -->
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
118 changes: 118 additions & 0 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# .NET Android Tools — Official Build Pipeline
# Runs on dnceng internal for official builds, signing, and NuGet publishing.

parameters:
- name: publishToNuGet
displayName: Publish NuGet packages to nuget.org
type: boolean
default: false

variables:
- template: /eng/common-variables.yml@self
- template: /eng/common/templates-official/variables/pool-providers.yml@self
- name: Codeql.Language
value: csharp

trigger:
batch: true
branches:
include:
- main
- release/*
- feature/*

pr: none

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
sdl:
tsa:
enabled: false
policheck:
enabled: true
binskim:
enabled: true
codeql:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}:
enabledOnNonDefaultBranches: true
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
stages:
- stage: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
enableTelemetry: true
enablePublishBuildArtifacts: true
enableMicrobuild: false
enablePublishUsingPipelines: true
enablePublishBuildAssets: true
helixRepo: dotnet/android-tools
jobs:
- job: Windows
displayName: Build, Test & Pack (Windows)
timeoutInMinutes: 60
steps:
- script: eng\common\CIBuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs)
name: Build
displayName: Build & Test

- task: DotNetCoreCLI@2
displayName: Pack NuGet
inputs:
command: custom
projects: src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj
custom: pack
arguments: -c $(_BuildConfig) --no-build -o $(Build.ArtifactStagingDirectory)/packages
condition: succeeded()

templateContext:
outputs:
- output: pipelineArtifact
artifact: BuildArtifacts
path: $(Build.ArtifactStagingDirectory)
displayName: Publish Build Artifacts
condition: succeeded()

- ${{ if parameters.publishToNuGet }}:
- stage: Publish
displayName: Publish to NuGet.org
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: PublishNuGet
displayName: Push NuGet packages
environment: nuget-org
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: BuildArtifacts

- task: NuGetCommand@2
displayName: Push to NuGet.org
inputs:
command: push
packagesToPush: $(Pipeline.Workspace)/BuildArtifacts/packages/*.nupkg
nuGetFeedType: external
publishFeedCredentials: dotnet-android-tools-nuget-org

- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
enableSymbolValidation: true
enableSourceLinkValidation: true
File renamed without changes.
11 changes: 11 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25578.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>846929727a388f2b1fd3ccf21f67694f44b91b4d</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
6 changes: 6 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel>
</PropertyGroup>
</Project>
20 changes: 20 additions & 0 deletions eng/common-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
variables:
- name: _TeamName
value: DotNetCore
- name: _InternalBuildArgs
value: ''
- name: _BuildConfig
value: Debug

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
value: test
- name: _BuildConfig
value: Release
- group: Publish-Build-Assets
- group: SDL_Settings
- name: _InternalBuildArgs
value: /p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=true
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
4 changes: 4 additions & 0 deletions eng/common/BuildConfiguration/build-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RetryCountLimit": 1,
"RetryByAnyError": false
}
2 changes: 2 additions & 0 deletions eng/common/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
11 changes: 11 additions & 0 deletions eng/common/PSScriptAnalyzerSettings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@{
IncludeRules=@('PSAvoidUsingCmdletAliases',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingPositionalParameters',
'PSAvoidUsingInvokeExpression',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUseCmdletCorrectly',
'PSStandardDSCFunctionsInResource',
'PSUseIdenticalMandatoryParametersForDSC',
'PSUseIdenticalParametersForDSC')
}
28 changes: 28 additions & 0 deletions eng/common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Don't touch this folder

uuuuuuuuuuuuuuuuuuuu
u" uuuuuuuuuuuuuuuuuu "u
u" u$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
$ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
$ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
$ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$" u"
"u """""""""""""""""" u"
""""""""""""""""""""

!!! Changes made in this directory are subject to being overwritten by automation !!!

The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.
Loading