Skip to content

Commit

Permalink
First Pass at using Resource Designer assembly [WIP]
Browse files Browse the repository at this point in the history
Context dotnet#6310

Ignore Java.Interop-Tests IntermediateDir

Try StrongNaming. Based on code in https://github.com/brutaldev/StrongNameSigner/blob/master/src/Brutal.Dev.StrongNameSigner/SigningHelper.cs

Use ICSharpCode.Decompiler to read Resource Designer Assembly

Fix breakage

Fix error with Aapt2 R.txt

Use latest Xamarin.Forms for dotnet tests

Disable StrongNaming for now

Removed unused code and logging

Remove StrongNaming support

Revert "Remove StrongNaming support"

This reverts commit 7f90638f1788adfa37c4ec4ab3fed9fc48569cb5.

Use a cstom snk for the designer strong name

Update apkdesc

Change to Microsoft.Android.Resource.Designer

new test

Move CryptoConvert to src-ThirdParty

Add StrongNameSigner code and TPN

Fix missing file

Fix another build error

Fix a test

Update and Fix the UnitTest

update docs

Switch to _Microsoft.Android.Resource.Designer.dll

update apkdesc

update apkdesc
  • Loading branch information
dellis1972 committed Nov 8, 2022
1 parent a6fc4cd commit df45418
Show file tree
Hide file tree
Showing 70 changed files with 2,614 additions and 301 deletions.
26 changes: 26 additions & 0 deletions Documentation/guides/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,32 @@ To suppress the default AOT profiles, set the property to `false`.

Added in Xamarin.Android 10.1.

## AndroidUseDesignerAssembly

A bool property which controls if the build system will generate an
`_Microsoft.Android.Resource.Designer.dll` as apposed to a `Resource.Designer.cs` file. The benefits of this are smaller applications and
faster startup time.

The default value is `true`.

This setting is not backward compatible with Classic Xamarin.Android.
So as a Nuget Author it is recommended that you ship three versions of
the assembly if you want to maintain backward compatibility.
One for MonoAndroid one for net6.0-android and
one for net8.0-android. You can do this by using [Xamarin.Legacy.Sdk](https://www.nuget.org/packages/Xamarin.Legacy.Sdk).

```
<TargetFrameworks>monoandroid90;net6.0-android;net8.0-android</TargetFrameworks>
```

Alternatively turn this setting off until such time as both Classic and
net7.0-android have been deprecated.

.NET Projects which choose to turn this setting off will not be able to
consume references which do use it.

Added in .NET 8. Unsupported in Classic Xamarin.Android.

## AndroidUseInterpreter

A boolean property that causes the `.apk` to contain the mono
Expand Down
1 change: 1 addition & 0 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.CSharp.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.D8.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Designer.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Resource.Designer.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.DesignTime.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.EmbeddedResource.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.FSharp.targets" ExcludeFromAndroidNETSdk="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;

namespace Xamarin.Android.Prepare
{
[TPN]
class StrongNameSigner_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/brutaldev/StrongNameSigner/");

public override string LicenseFile => string.Empty;
public override string Name => "brutaldev/StrongNameSigner";
public override Uri SourceUrl => url;
public override string LicenseText => @"
Copyright (c) Werner van Deventer (werner@brutaldev.com). All rights reserved.
Licensed under the Apache License, Version 2.0 (the 'License'); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions
and limitations under the License.
";

public override bool Include (bool includeExternalDeps, bool includeBuildDeps) => includeExternalDeps;
}
}
Loading

0 comments on commit df45418

Please sign in to comment.