[Android] remove android specific target (#5442)

* [Android] get rid of specific android targets

* change to AndroidApplication

* remove before/after targets

* MonoAndroid
This commit is contained in:
Shane Neuville 2019-03-04 16:43:22 -07:00 коммит произвёл Samantha Houts
Родитель f1660e85f5
Коммит 21c7567e02
4 изменённых файлов: 32 добавлений и 15 удалений

Просмотреть файл

@ -1,13 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProguardConfiguration Include="$(MSBuildThisFileDirectory)proguard.cfg" />
</ItemGroup>
<Target Name="ValidateTargetFrameworkVersionForForms" BeforeTargets="CoreCompile" Condition="'$(XFDisableTargetFrameworkValidation)' != 'True'">
<PropertyGroup>
<MinTargetFrameworkVersionForForms>8.1</MinTargetFrameworkVersionForForms>
<TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersionWithoutV>
</PropertyGroup>
<Error Code="XF005" Condition="$(TargetFrameworkVersionWithoutV) &lt; $(MinTargetFrameworkVersionForForms)"
Text="The %24(TargetFrameworkVersion) for $(ProjectName) ($(TargetFrameworkVersion)) is less than the minimum required %24(TargetFrameworkVersion) for Xamarin.Forms ($(MinTargetFrameworkVersionForForms)). You need to increase the %24(TargetFrameworkVersion) for $(ProjectName)." />
</Target>
</Project>

Просмотреть файл

@ -154,7 +154,6 @@
<file src="..\Xamarin.Forms.Xaml.Design\bin\$Configuration$\Xamarin.Forms.Xaml.Design.dll" target="lib\tizen40\Design" />
<!--Android 10-->
<file src="Xamarin.Forms.Android.targets" target="build\MonoAndroid10\Xamarin.Forms.targets" />
<file src="proguard.cfg" target="build\MonoAndroid10\proguard.cfg" />
<!--Android 81-->

Просмотреть файл

@ -143,4 +143,36 @@
<Compile Include="@(_CSSOutputs)" />
</ItemGroup>
</Target>
<!--
Platform Specific Targets.
We can't use a framework specific targets file because it breaks shared projects i.e. /build/MonoAndroid10/Xamarin.Forms.targets
-->
<!-- MonoAndroid targets. -->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'">
<CoreCompileDependsOn>
IncludeProguardForAndroid;
$(CoreCompileDependsOn);
</CoreCompileDependsOn>
<PrepareForBuildDependsOn>
ValidateTargetFrameworkVersionForForms;
$(PrepareForBuildDependsOn);
</PrepareForBuildDependsOn>
</PropertyGroup>
<Target Name="IncludeProguardForAndroid">
<ItemGroup>
<ProguardConfiguration Include="$(MSBuildThisFileDirectory)MonoAndroid10\proguard.cfg" />
</ItemGroup>
</Target>
<Target Name="ValidateTargetFrameworkVersionForForms" Condition="'$(XFDisableTargetFrameworkValidation)' != 'True'">
<PropertyGroup>
<MinTargetFrameworkVersionForForms>8.1</MinTargetFrameworkVersionForForms>
<TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersionWithoutV>
</PropertyGroup>
<Error Code="XF005" Condition="$(TargetFrameworkVersionWithoutV) &lt; $(MinTargetFrameworkVersionForForms)"
Text="The %24(TargetFrameworkVersion) for $(ProjectName) ($(TargetFrameworkVersion)) is less than the minimum required %24(TargetFrameworkVersion) for Xamarin.Forms ($(MinTargetFrameworkVersionForForms)). You need to increase the %24(TargetFrameworkVersion) for $(ProjectName)." />
</Target>
</Project>

Просмотреть файл

@ -26,7 +26,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuspec", ".nuspec", "{7E12C50D-A570-4DF1-94E1-8599843FA87C}"
ProjectSection(SolutionItems) = preProject
.nuspec\proguard.cfg = .nuspec\proguard.cfg
.nuspec\Xamarin.Forms.Android.targets = .nuspec\Xamarin.Forms.Android.targets
.nuspec\Xamarin.Forms.AppLinks.nuspec = .nuspec\Xamarin.Forms.AppLinks.nuspec
.nuspec\Xamarin.Forms.Debug.targets = .nuspec\Xamarin.Forms.Debug.targets
.nuspec\Xamarin.Forms.DefaultItems.props = .nuspec\Xamarin.Forms.DefaultItems.props