Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] PackageReference and AndroidUseLatestPlatformSdk do not work together #873

Merged
merged 1 commit into from
Sep 24, 2017
Merged
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
15 changes: 14 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-->

<PropertyGroup>
<ResolveNuGetPackageAssetsDependsOn>
_SetLatestTargetFrameworkVersion;
$(ResolveNuGetPackageAssetsDependsOn)
</ResolveNuGetPackageAssetsDependsOn>
<GetReferenceAssemblyPathsDependsOn>
_SetLatestTargetFrameworkVersion;
$(GetReferenceAssemblyPathsDependsOn)
Expand Down Expand Up @@ -171,6 +175,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<_XASupportsFastDev Condition=" Exists ('$(MSBuildThisFileDirectory)Xamarin.Android.Common.Debugging.targets') ">True</_XASupportsFastDev>
<_XASupportsFastDev Condition=" '$(_XASupportsFastDev)' == '' ">False</_XASupportsFastDev>
<AndroidApplication Condition="'$(AndroidApplication)' == ''">false</AndroidApplication>
<AndroidUseSharedRuntime Condition=" '$(AndroidUseSharedRuntime)' == '' Or '$(_XASupportsFastDev)' == 'False' ">False</AndroidUseSharedRuntime>
<AndroidNeedsInternetPermission Condition="'$(AndroidNeedsInternetPermission)' == '' And '$(AndroidEmbedProfilers)' == ''">False</AndroidNeedsInternetPermission>
<AndroidNeedsInternetPermission Condition="'$(AndroidNeedsInternetPermission)' == '' And '$(AndroidEmbedProfilers)' != ''">True</AndroidNeedsInternetPermission>
<AndroidUseLatestPlatformSdk Condition="'$(AndroidUseLatestPlatformSdk)' == ''">False</AndroidUseLatestPlatformSdk>
Expand All @@ -190,7 +195,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<AndroidAotMode Condition=" '$(AndroidAotMode)' == '' And '$(AotAssemblies)' == 'True' ">Normal</AndroidAotMode>
<AotAssemblies Condition=" '$(AndroidAotMode)' != '' ">True</AotAssemblies>
<AotAssemblies Condition=" '$(AotAssemblies)' == '' ">False</AotAssemblies>
<AndroidUseSharedRuntime Condition=" '$(AndroidUseSharedRuntime)' == '' Or '$(_XASupportsFastDev)' == 'False' ">False</AndroidUseSharedRuntime>

<AndroidExplicitCrunch Condition=" '$(AndroidExplicitCrunch)' == '' ">False</AndroidExplicitCrunch>
<AndroidUseDebugRuntime
Expand Down Expand Up @@ -604,6 +608,9 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
</GetReferenceAssemblyPaths>
</Target>

<Target Name="_SetLatestTargetFrameworkVersionForPackageReference" BeforeTargets="_GetRestoreTargetFrameworksOutput" DependsOnTargets="_SetLatestTargetFrameworkVersion">
</Target>

<Target Name="_SetLatestTargetFrameworkVersion" DependsOnTargets="_GetReferenceAssemblyPaths">
<ResolveSdks
AndroidApiLevel="$(AndroidApiLevel)"
Expand Down Expand Up @@ -644,11 +651,17 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<Output TaskParameter="Value" PropertyName="TargetFrameworkMoniker"
Condition="'$(TargetFrameworkProfile)' != ''"
/>
<Output TaskParameter="Value" PropertyName="NuGetTargetMoniker"
Condition="'$(TargetFrameworkProfile)' != ''"
/>
</CreateProperty>
<CreateProperty Value="$(TargetFrameworkIdentifier),Version=$(_TargetFrameworkVersion)">
<Output TaskParameter="Value" PropertyName="TargetFrameworkMoniker"
Condition="'$(TargetFrameworkProfile)' == ''"
/>
<Output TaskParameter="Value" PropertyName="NuGetTargetMoniker"
Condition="'$(TargetFrameworkProfile)' == ''"
/>
</CreateProperty>
<CreateItem Include="$(_JavaInteropReferences)">
<Output TaskParameter="Include" ItemName="Reference" />
Expand Down