Skip to content

Commit

Permalink
Keep building packages that are marked packable (dotnet#22616)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy authored Jun 8, 2020
1 parent 7079762 commit aeb28d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<!-- Analyzer package are needed in source build for WebSDK -->
<ExcludeFromSourceBuild
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsReferenceAssemblyProject)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>

<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
suppress all targets for TestProjects using ExcludeFromBuild. -->
<ExcludeFromBuild Condition="'$(SkipTestBuild)' == 'true' and
<ExcludeFromBuild Condition="'$(IsPackable)' != 'true' and
'$(SkipTestBuild)' == 'true' and
('$(IsTestProject)' == 'true' or
'$(IsUnitTestProject)' == 'true' or
'$(IsTestAssetProject)' == 'true' or
'$(IsBenchmarkProject)' == 'true' or
'$(IsBenchmarkProject)' == 'true' or
'$(IsSampleProject)' == 'true' or
'$(IsSpecificationTestProject)' == 'true')">true</ExcludeFromBuild>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

<!-- Define Target overrides after importing Directory.Build.targets so these don't get overridden -->
<Target Name="Pack" DependsOnTargets="$(PackDependsOn)" Condition="'$(IsPackable)' == 'true' and '$(SkipTestBuild)' != 'true'">
<Target Name="Pack" DependsOnTargets="$(PackDependsOn)" Condition="'$(IsPackable)' == 'true'">
<Telemetry EventName="NETCORE_ENGINEERING_TELEMETRY" EventData="Category=Pack" />
<Message Text="> gradlew $(GradleOptions) createPackage" Importance="high" />
<Exec Command="./gradlew $(GradleOptions) createPackage" />
<Message Importance="high" Text="java:signalr -> $(PackageOutputPath)%(JavaBuildFiles.Identity)" />
<Copy SourceFiles="build\libs\%(JavaBuildFiles.Identity)" DestinationFolder="$(PackageOutputPath)" />
</Target>

<Target Name="Build" Condition="'$(SkipTestBuild)' != 'true'">
<Target Name="Build">
<Telemetry EventName="NETCORE_ENGINEERING_TELEMETRY" EventData="Category=Build" />
<Exec Command="./gradlew $(GradleOptions) compileJava" />
</Target>
Expand Down

0 comments on commit aeb28d4

Please sign in to comment.