Skip to content

Commit 2aa2356

Browse files
committed
Merge branch 'main' into dev/grendel/blobs-in-lib
* main: [Xamarin.Android.Build.Tasks] Add @(AndroidPackagingOptionsInclude) (#8459) [ci] Do not try to modify classic VSIX install (#8518) [build] Stop producing Xamarin.Android.Cecil.dll (#8489)
2 parents 52e324f + 81001af commit 2aa2356

34 files changed

+140
-512
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:dev/grendel/blobs-in-lib@204e5bbcaa2dcb69ccdc49216a76cdfff3de5e55
1+
xamarin/monodroid:dev/grendel/blobs-in-lib@f963325691128b3024d9398b88022d549e5e5c37
22
mono/mono:2020-02@6dd9def57ce969ca04a0ecd9ef72c0a8f069112d

Configuration.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@
190190
<AndroidSupportedTargetAotAbisForConditionalChecks Condition=" !$(AndroidSupportedTargetAotAbisForConditionalChecks.StartsWith (':')) " >:$(AndroidSupportedTargetAotAbisForConditionalChecks)</AndroidSupportedTargetAotAbisForConditionalChecks>
191191
<AndroidSupportedTargetAotAbisSplit>$(AndroidSupportedTargetAotAbis.Split(':'))</AndroidSupportedTargetAotAbisSplit>
192192
</PropertyGroup>
193-
<PropertyGroup>
194-
<RemapAssemblyRefToolExecutable>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\remap-assembly-ref\remap-assembly-ref.dll</RemapAssemblyRefToolExecutable>
195-
<RemapAssemblyRefTool>$(ManagedRuntime) $(ManagedRuntimeArgs) &quot;$(RemapAssemblyRefToolExecutable)&quot;</RemapAssemblyRefTool>
196-
</PropertyGroup>
197193

198194
<!-- Unit Test Properties -->
199195
<PropertyGroup>

Documentation/guides/building-apps/build-items.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,62 @@ excluded from the final package. The default values are as follows
233233
<AndroidPackagingOptionsExclude Include="$([MSBuild]::Escape('*.kotlin_*')" />
234234
</ItemGroup>
235235
```
236+
236237
Items can use file blob characters for wildcards such as `*` and `?`.
237238
However these Items MUST use URL encoding or '$([MSBuild]::Escape(''))'.
238239
This is so MSBuild does not try to interpret them as actual file wildcards.
239240

241+
For example
242+
243+
```
244+
<ItemGroup>
245+
<AndroidPackagingOptionsExclude Include="%2A.foo_%2A" />
246+
<AndroidPackagingOptionsExclude Include="$([MSBuild]::Escape('*.foo')" />
247+
</ItemGroup>
248+
```
249+
240250
NOTE: `*`, `?` and `.` will be replaced in the `BuildApk` task with the
241-
appropriate RegEx expressions.
251+
appropriate file globs.
252+
253+
If the default file glob is too restrictive you can remove it by adding the
254+
following to your csproj
255+
256+
```
257+
<ItemGroup>
258+
<AndroidPackagingOptionsExclude Remove="$([MSBuild]::Escape('*.kotlin_*')" />
259+
</ItemGroup>
260+
```
242261

243262
Added in Xamarin.Android 13.1 and .NET 7.
244263

264+
## AndroidPackagingOptionsInclude
265+
266+
A set of file glob compatible items which will allow for items to be
267+
included from the final package. The default values are as follows
268+
269+
```
270+
<ItemGroup>
271+
<AndroidPackagingOptionsInclude Include="$([MSBuild]::Escape('*.kotlin_builtins')" />
272+
</ItemGroup>
273+
```
274+
275+
Items can use file blob characters for wildcards such as `*` and `?`.
276+
However these Items MUST use URL encoding or '$([MSBuild]::Escape(''))'.
277+
This is so MSBuild does not try to interpret them as actual file wildcards.
278+
For example
279+
280+
```
281+
<ItemGroup>
282+
<AndroidPackagingOptionsInclude Include="%2A.foo_%2A" />
283+
<AndroidPackagingOptionsInclude Include="$([MSBuild]::Escape('*.foo')" />
284+
</ItemGroup>
285+
```
286+
287+
NOTE: `*`, `?` and `.` will be replaced in the `BuildApk` task with the
288+
appropriate file globs.
289+
290+
Added in .NET 9.
291+
245292
## AndroidResource
246293

247294
All files with an *AndroidResource* build action are compiled into

Xamarin.Android.sln

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "jnienv-gen", "build-tools\j
1111
EndProject
1212
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "api-merge", "build-tools\api-merge\api-merge.csproj", "{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "remap-assembly-ref", "build-tools\remap-assembly-ref\remap-assembly-ref.csproj", "{C876DA71-8573-4CEF-9149-716D72455ED4}"
15-
EndProject
1614
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{04E3E11E-B47D-4599-8AFC-50515A95E715}"
1715
EndProject
1816
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop", "external\Java.Interop\src\Java.Interop\Java.Interop.csproj", "{94BD81F7-B06F-4295-9636-F8A3B6BDC762}"
@@ -145,10 +143,6 @@ Global
145143
{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}.Debug|AnyCPU.Build.0 = Debug|Any CPU
146144
{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}.Release|AnyCPU.ActiveCfg = Release|Any CPU
147145
{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}.Release|AnyCPU.Build.0 = Release|Any CPU
148-
{C876DA71-8573-4CEF-9149-716D72455ED4}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
149-
{C876DA71-8573-4CEF-9149-716D72455ED4}.Debug|AnyCPU.Build.0 = Debug|Any CPU
150-
{C876DA71-8573-4CEF-9149-716D72455ED4}.Release|AnyCPU.ActiveCfg = Release|Any CPU
151-
{C876DA71-8573-4CEF-9149-716D72455ED4}.Release|AnyCPU.Build.0 = Release|Any CPU
152146
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
153147
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|AnyCPU.Build.0 = Debug|Any CPU
154148
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.ActiveCfg = Release|Any CPU
@@ -361,7 +355,6 @@ Global
361355
{1D4FC8F1-0DA4-4F38-BE68-11AEBA9A0EA4} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
362356
{AFB8F6D1-6EA9-42C3-950B-98F34C669AD2} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
363357
{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
364-
{C876DA71-8573-4CEF-9149-716D72455ED4} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
365358
{94BD81F7-B06F-4295-9636-F8A3B6BDC762} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
366359
{B501D075-6183-4E1D-92C9-F7B5002475B1} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
367360
{D14A1B5C-2060-4930-92BE-F7190256C735} = {04E3E11E-B47D-4599-8AFC-50515A95E715}

build-tools/automation/yaml-templates/build-windows.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,6 @@ stages:
4545
parameters:
4646
remove_dotnet: true
4747

48-
# Downgrade the XA .vsix installed into the instance of VS that we are building with so that we don't restore/build against a test version.
49-
# The VS installer will attempt to resume any failed or partial installation before trying to downgrade Xamarin.Android.
50-
# VSIXInstaller.exe will exit non-zero when the downgrade attempt is a no-op, so we will allow this step to fail silently.
51-
- powershell: |
52-
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
53-
& "$vsWhere" -all -prerelease -latest | Out-Default
54-
$isLatestVSLaunchable = & "$vsWhere" -all -prerelease -latest -property isLaunchable
55-
if ($isLatestVSLaunchable -eq 0) {
56-
$vsPath = & "$vsWhere" -all -prerelease -latest -property installationPath
57-
Write-Host "Attempting to repair VS instance:" $vsPath
58-
$vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
59-
& "$vsInstaller" resume --installPath $vsPath --quiet --norestart | Out-Default
60-
Write-Host "vs_installer.exe resume attempt complete"
61-
}
62-
$vsixInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe"
63-
$ts = Get-Date -Format FileDateTimeUniversal
64-
$log = "xavsixdowngrade-$ts.log"
65-
$process = Start-Process -NoNewWindow -FilePath $vsixInstaller -ArgumentList "/downgrade:Xamarin.Android.Sdk /admin /quiet /logFile:$log" -Wait -PassThru -RedirectStandardError "err.txt"
66-
Get-Content "err.txt" | Write-Host
67-
Get-Content "${env:TEMP}\$log" | Write-Host
68-
Write-Host "VSInstaller.exe exited with code:" $process.ExitCode
69-
Remove-Item "${env:TEMP}\$log"
70-
displayName: downgrade XA to stable
71-
ignoreLASTEXITCODE: true
72-
7348
- task: DotNetCoreCLI@2
7449
displayName: Prepare Solution
7550
inputs:

build-tools/conjure-xamarin-android-cecil/conjure-xamarin-android-cecil.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.

build-tools/conjure-xamarin-android-cecil/conjure-xamarin-android-cecil.csproj

Lines changed: 0 additions & 19 deletions
This file was deleted.

build-tools/installers/create-installers.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@
145145
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MicrosoftAndroidSdkOutDir)%(Identity)\Xamarin.Android.Build.Tasks.resources.dll')" />
146146
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MicrosoftAndroidSdkOutDir)%(Identity)\Xamarin.Android.Tools.AndroidSdk.resources.dll')" />
147147
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.BuildInfo.txt" />
148-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Cecil.dll" />
149-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Cecil.pdb" />
150-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Cecil.Mdb.dll" />
151-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Cecil.Mdb.pdb" />
148+
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Cecil.dll" />
149+
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Cecil.pdb" />
150+
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Cecil.Mdb.dll" />
151+
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Cecil.Mdb.pdb" />
152152
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Common.props" />
153153
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Common.targets" />
154154
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.D8.targets" />

build-tools/remap-assembly-ref/remap-assembly-ref.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

build-tools/remap-assembly-ref/remap-assembly-ref.csproj

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)