Skip to content

Commit

Permalink
Move msbuild tasks into src folder and delete dead code (#45722)
Browse files Browse the repository at this point in the history
* Move tools-local\tasks to src\tasks

* Delete dead task code

* nit installer.tasks.csproj changes

* Remove mobile.tasks intermediate folder
  • Loading branch information
ViktorHofer authored Dec 8, 2020
1 parent 814efd9 commit e35526f
Show file tree
Hide file tree
Showing 71 changed files with 59 additions and 824 deletions.
2 changes: 1 addition & 1 deletion eng/Configurations.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'tasks'))</RepoTasksDir>
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/mono/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@

<!-- Paths for Mobile App Projects -->
<PropertyGroup>
<AppleAppBuilderProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'mobile.tasks', 'AppleAppBuilder'))</AppleAppBuilderProjDirectory>
<AppleAppBuilderProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'AppleAppBuilder'))</AppleAppBuilderProjDirectory>
<AppleTestRunnerProjDirectory>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'Common', tests, 'AppleTestRunner'))</AppleTestRunnerProjDirectory>
<AndroidAppBuilderProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'mobile.tasks', 'AndroidAppBuilder'))</AndroidAppBuilderProjDirectory>
<AndroidAppBuilderProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'AndroidAppBuilder'))</AndroidAppBuilderProjDirectory>
<AndroidTestRunnerProjDirectory>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'Common', tests, 'AndroidTestRunner'))</AndroidTestRunnerProjDirectory>
<MonoAOTCompilerProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'mobile.tasks', 'AotCompilerTask'))</MonoAOTCompilerProjDirectory>
<MonoAOTCompilerProjDirectory>$([MSBuild]::NormalizeDirectory('$(RepoTasksDir)', 'AotCompilerTask'))</MonoAOTCompilerProjDirectory>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
<ProjectReference Include="$(RepoToolsLocalDir)tasks\mobile.tasks\AndroidAppBuilder\AndroidAppBuilder.csproj" />
<ProjectReference Include="$(RepoTasksDir)AndroidAppBuilder\AndroidAppBuilder.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
<ProjectReference Include="$(RepoToolsLocalDir)tasks\mobile.tasks\AppleAppBuilder\AppleAppBuilder.csproj" />
<ProjectReference Include="$(RepoTasksDir)AppleAppBuilder\AppleAppBuilder.csproj" />
</ItemGroup>

<ItemGroup>
<_iOSSampleFiles Include="$(ArtifactsDir)bin\AppleAppBuilder\$(Configuration)\$(NetCoreAppToolCurrent)\AppleAppBuilder.dll" />
<_iOSSampleFiles Include="$(RepoToolsLocalDir)tasks\mobile.tasks\AppleAppBuilder\Templates\runtime.m" />
<_iOSSampleFiles Include="$(RepoToolsLocalDir)tasks\mobile.tasks\AppleAppBuilder\Templates\runtime.h" />
<_iOSSampleFiles Include="$(RepoTasksDir)AppleAppBuilder\Templates\runtime.m" />
<_iOSSampleFiles Include="$(RepoTasksDir)AppleAppBuilder\Templates\runtime.h" />

<PackageFile Include="@(_iOSSampleFiles)" TargetPath="tools\$(NetCoreAppToolCurrent)\" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
<ProjectReference Include="$(RepoToolsLocalDir)tasks\mobile.tasks\WasmAppBuilder\WasmAppBuilder.csproj" />
<ProjectReference Include="$(RepoTasksDir)WasmAppBuilder\WasmAppBuilder.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/mono/netcore/sample/iOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USE_LLVM=True

all: runtimepack run

TOOLS_DIR=../../../../../tools-local/tasks/mobile.tasks
TOOLS_DIR=../../../../tasks
appbuilder:
$(DOTNET) build -c Release $(TOOLS_DIR)/AotCompilerTask/MonoAOTCompiler.csproj
$(DOTNET) build -c Release $(TOOLS_DIR)/AppleAppBuilder/AppleAppBuilder.csproj
Expand Down
2 changes: 1 addition & 1 deletion src/mono/netcore/sample/iOS/Program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<Message Text="Packaged ID: %(RuntimePack.PackageDirectory)" Importance="high" />
</Target>

<Import Project="$(RepoTasksDir)mobile.tasks\AotCompilerTask\MonoAOTCompiler.props" />
<Import Project="$(RepoTasksDir)AotCompilerTask\MonoAOTCompiler.props" />
<UsingTask TaskName="AppleAppBuilderTask"
AssemblyFile="$(ArtifactsBinDir)AppleAppBuilder\$(Configuration)\$(NetCoreAppToolCurrent)\AppleAppBuilder.dll" />

Expand Down
2 changes: 1 addition & 1 deletion src/mono/netcore/sample/wasm/browser/WasmSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<Target Name="RebuildWasmAppBuilder">
<ItemGroup>
<WasmAppBuildProject Include="$(RepoTasksDir)mobile.tasks\WasmAppBuilder\WasmAppBuilder.csproj" />
<WasmAppBuildProject Include="$(RepoTasksDir)WasmAppBuilder\WasmAppBuilder.csproj" />
</ItemGroup>

<MSBuild Projects="@(WasmAppBuildProject)"
Expand Down
4 changes: 2 additions & 2 deletions src/mono/netcore/sample/wasm/console/WasmSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<Target Name="RebuildWasmAppBuilder">
<ItemGroup>
<WasmAppBuildProject Include="$(RepoTasksDir)mobile.tasks\WasmAppBuilder\WasmAppBuilder.csproj" />
<WasmAppBuildProject Include="$(RepoTasksDir)WasmAppBuilder\WasmAppBuilder.csproj" />
</ItemGroup>

<MSBuild Projects="@(WasmAppBuildProject)"
Expand All @@ -51,7 +51,7 @@
Targets="Build;Publish"/>
</Target>

<Import Project="$(RepoTasksDir)mobile.tasks\AotCompilerTask\MonoAOTCompiler.props" />
<Import Project="$(RepoTasksDir)AotCompilerTask\MonoAOTCompiler.props" />
<UsingTask TaskName="WasmAppBuilder"
AssemblyFile="$(ArtifactsBinDir)WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\WasmAppBuilder.dll"/>

Expand Down
4 changes: 2 additions & 2 deletions src/mono/wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ test-runner:
$(DOTNET) build $(TOP)/src/libraries/Common/tests/WasmTestRunner /p:Configuration=$(CONFIG)

app-builder:
$(DOTNET) build $(TOP)/tools-local/tasks/mobile.tasks/WasmAppBuilder
$(DOTNET) build $(TOP)/src/tasks/WasmAppBuilder

build-tasks:
$(DOTNET) build $(TOP)/tools-local/tasks/mobile.tasks/WasmBuildTasks
$(DOTNET) build $(TOP)/src/tasks/WasmBuildTasks

run-tests-v8-%:
PATH="$(JSVU):$(PATH)" $(DOTNET) build $(TOP)/src/libraries/$*/tests/ /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=$(CONFIG) /p:JSEngine=V8 $(MSBUILD_ARGS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<Target Name="RebuildWasmAppBuilder">
<ItemGroup>
<WasmAppBuildProject Include="$(RepoTasksDir)mobile.tasks\WasmAppBuilder\WasmAppBuilder.csproj" />
<WasmAppBuildProject Include="$(RepoTasksDir)WasmAppBuilder\WasmAppBuilder.csproj" />
</ItemGroup>

<MSBuild Projects="@(WasmAppBuildProject)"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions src/tasks/installer.tasks/installer.tasks.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<IsShipping>false</IsShipping>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>

<ItemGroup>
<Compile Include="*.cs" />
<Compile Include="BuildTools.Publish\**\*.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
<PackageReference Include="NuGet.ProjectModel" Version="$(RefOnlyNugetProjectModelVersion)" />
<PackageReference Include="NuGet.Packaging" Version="$(RefOnlyNugetPackagingVersion)" />
<PackageReference Include="System.Reflection.Metadata" Version="1.7.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Build" Version="$(RefOnlyMicrosoftBuildVersion)" />
<PackageReference Include="Microsoft.Build.Framework" Version="$(RefOnlyMicrosoftBuildFrameworkVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(RefOnlyMicrosoftBuildTasksCoreVersion)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(RefOnlyMicrosoftBuildUtilitiesCoreVersion)" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Tasks.v4.0" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.Build" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Compression" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions tools-local/tasks/tasks.proj → src/tasks/tasks.proj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)mobile.tasks\AndroidAppBuilder\AndroidAppBuilder.csproj"
<ProjectReference Remove="$(MSBuildThisFileDirectory)AndroidAppBuilder\AndroidAppBuilder.csproj"
Condition="'$(TargetOS)' != 'Android'" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)mobile.tasks\AppleAppBuilder\AppleAppBuilder.csproj"
<ProjectReference Remove="$(MSBuildThisFileDirectory)AppleAppBuilder\AppleAppBuilder.csproj"
Condition="'$(TargetOS)' != 'iOS' and '$(TargetOS)' != 'tvOS'" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)mobile.tasks\WasmAppBuilder\WasmAppBuilder.csproj"
<ProjectReference Remove="$(MSBuildThisFileDirectoryWasmAppBuilder\WasmAppBuilder.csproj"
Condition="'$(TargetOS)' != 'Browser'" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)mobile.tasks\WasmBuildTasks\WasmBuildTasks.csproj"
<ProjectReference Remove="$(MSBuildThisFileDirectory)WasmBuildTasks\WasmBuildTasks.csproj"
Condition="'$(TargetOS)' != 'Browser'" />
<ProjectReference Remove="$(MSBuildThisFileDirectory)mobile.tasks\AotCompilerTask\MonoAOTCompiler.csproj"
<ProjectReference Remove="$(MSBuildThisFileDirectory)AotCompilerTask\MonoAOTCompiler.csproj"
Condition="'$(TargetsMobile)' != 'true'" />
</ItemGroup>

Expand Down
Loading

0 comments on commit e35526f

Please sign in to comment.