+++ /dev/null
-<Project DefaultTargets="Build">
-
- <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
- <Import Project="$(MSBuildThisFileDirectory)directories.props" />
- <Import Project="$(MSBuildThisFileDirectory)version.props" />
-
- <PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
- <GenerateDependencyFile>false</GenerateDependencyFile>
- <DummyAssemblyVersion>$(VersionPrefix)</DummyAssemblyVersion>
- <OutDir>$(OutputDummyDir)</OutDir>
- </PropertyGroup>
-
- <!-- Properties for directories -->
- <PropertyGroup>
- <IntermediateLibDir>$(BaseIntermediateOutputPath)_ref_lib\</IntermediateLibDir>
- <IntermediateAPIDir>$(BaseIntermediateOutputPath)_ref_api\</IntermediateAPIDir>
- </PropertyGroup>
-
- <!-- Properties for GenAPI tool -->
- <PropertyGroup>
- <GenAPICommand>dotnet $(GenAPIDir)GenAPI.exe</GenAPICommand>
- </PropertyGroup>
-
- <!-- Source assemblies -->
- <ItemGroup>
- <TizenAssemblies Include="$(OutputPublicDir)\*.dll" />
- <TizenAssemblies Include="$(OutputInternalDir)\*.dll" />
- </ItemGroup>
-
- <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-
- <Target Name="Compile" />
- <Target Name="CopyFilesToOutputDirectory" />
-
- <!-- Target for preparing reference lib directory -->
- <Target Name="Prepare" DependsOnTargets="ResolveAssemblyReferences">
- <ItemGroup>
- <ReferencePath Include="@(TizenAssemblies)" />
- </ItemGroup>
- <MakeDir Directories="$(IntermediateLibDir);$(IntermediateAPIDir)" />
- <Copy SourceFiles="@(ReferencePath)" DestinationFolder="$(IntermediateLibDir)" />
- <RemoveDir Directories="$(OutputDummyDir)" />
- <MakeDir Directories="$(OutputDummyDir)" />
- </Target>
-
- <!-- Target for generating *.AssemblyInfo.cs files -->
- <Target Name="GenerateAsmInfo"
- Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).AssemblyInfo.cs">
-
- <PropertyGroup>
- <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
- </PropertyGroup>
-
- <ItemGroup>
- <AssemblyInfoLines Include="[assembly:System.Reflection.AssemblyVersion("$(DummyAssemblyVersion)")]" />
- </ItemGroup>
-
- <WriteLinesToFile
- File="$(GeneratedAssemblyInfoSource)"
- Lines="@(AssemblyInfoLines)"
- Overwrite="true" />
-
- <ItemGroup>
- <FileWrites Include="$(GeneratedAssemblyInfoSource)" />
- </ItemGroup>
-
- </Target>
-
- <!-- Target for generating reference source files using GenAPI -->
- <Target Name="GenerateAPI"
- Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).cs">
- <PropertyGroup>
- <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
- </PropertyGroup>
-
- <Message Text="[GenAPI] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssemblySource)" Importance="High" />
-
- <Exec Command='$(GenAPICommand) -assembly:"%(TizenAssemblies.Identity)" -libPath:$(IntermediateLibDir) -out:$(GeneratedReferenceAssemblySource) -throw:"Not Supported Feature" -global' />
- </Target>
-
-
- <Target Name="GenerateDummy"
- DependsOnTargets="GenerateAsmInfo;GenerateAPI"
- Inputs="@(TizenAssemblies)" Outputs="$(OutputDummyDir)%(TizenAssemblies.Filename).dll">
- <PropertyGroup>
- <ThisAssemblyFilename>%(TizenAssemblies.Filename)</ThisAssemblyFilename>
- <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
- <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
- <GeneratedReferenceAssembly>$(OutputDummyDir)%(TizenAssemblies.Filename).dll</GeneratedReferenceAssembly>
- </PropertyGroup>
-
- <Message Text="[Compile] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssembly)" Importance="High" />
-
- <ItemGroup>
- <FilteredReferencePath Include="@(ReferencePath)" Condition="%(Filename) != $(ThisAssemblyFilename)" />
- </ItemGroup>
-
- <Csc
- Sources="$(GeneratedReferenceAssemblySource);$(GeneratedAssemblyInfoSource)"
- OutputAssembly="$(GeneratedReferenceAssembly)"
- AdditionalLibPaths="$(AdditionalLibPaths)"
- AllowUnsafeBlocks="true"
- DefineConstants="$(DefineConstants)"
- DisabledWarnings="$(NoWarn)"
- TargetType="$(OutputType)"
- NoStandardLib="$(NoCompilerStandardLib)"
- References="@(FilteredReferencePath)"
- Deterministic="true"
- ToolExe="$(CscToolExe)"
- ToolPath="$(CscToolPath)" />
-
- </Target>
-
- <Target Name="AfterBuild" DependsOnTargets="Prepare;GenerateDummy">
- <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
- </Target>
-
-</Project>
-
<!-- Build Properties -->
<PropertyGroup>
<Configuration>Release</Configuration>
+ <GenDummyCommand>dotnet $(GenDummyDir)\GenDummy.dll</GenDummyCommand>
+ <PublicDummyProjectDir>$(ProjectRootDir).dummy\</PublicDummyProjectDir>
+ <InternalDummyProjectDir>$(ProjectRootDir)internal\.dummy\</InternalDummyProjectDir>
</PropertyGroup>
<!-- Projects to build -->
<ItemGroup>
- <ProjectToBuild Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj" Condition="'$(Project)' != ''" />
- <ProjectToBuild Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
- <ProjectToBuild Include="$(InternalProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
+ <ProjectToBuild Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj" Condition="'$(Project)' != ''">
+ <Visibility>Public</Visibility>
+ </ProjectToBuild>
+ <ProjectToBuild Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''">
+ <Visibility>Public</Visibility>
+ </ProjectToBuild>
+ <ProjectToBuild Include="$(InternalProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''">
+ <Visibility>Internal</Visibility>
+ </ProjectToBuild>
</ItemGroup>
<!--
<ItemGroup>
<DirToRemove Include="$(OutputBaseDir)" />
<DirToRemove Include="@(ProjectIntermediateDir)" />
+ <DirToRemove Include="$(PublicDummyProjectDir)" />
+ <DirToRemove Include="$(InternalDummyProjectDir)" />
</ItemGroup>
<RemoveDir Directories="@(DirToRemove)" />
</Target>
+ <!--
+ Target : Dummy
+ ==============
+ Generate dummy assemblies of all projects.
+ -->
+ <Target Name="Dummy" DependsOnTargets="GenerateDummyProject">
+
+ <ItemGroup>
+ <DummyProjectToBuild Include="$(PublicDummyProjectDir)**\*.csproj" />
+ <DummyProjectToBuild Include="$(InternalDummyProjectDir)**\*.csproj" />
+ </ItemGroup>
+
+ <MSBuild Projects="@(DummyProjectToBuild)"
+ Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources)"
+ BuildInParallel="false"
+ Targets="Restore" />
+
+ <MSBuild Projects="@(DummyProjectToBuild)"
+ Properties="Configuration=$(Configuration);WarningLevel=0;OutDir=$(OutputDummyDir);ProduceReferenceAssembly=False"
+ BuildInParallel="true"
+ UseResultsCache="true"
+ Targets="Build" />
+
+ </Target>
+
+
+ <Target Name="GenerateDummyProject" Inputs="@(ProjectToBuild)" Outputs="%(Filename)" >
+
+ <PropertyGroup>
+ <GeneratedDummyAssembly>$(OutputDummyDir)%(ProjectToBuild.Filename).dll</GeneratedDummyAssembly>
+ <ClonedProjectsDir Condition="'%(ProjectToBuild.Visibility)' == 'Public'" >$(PublicDummyProjectDir)</ClonedProjectsDir>
+ <ClonedProjectsDir Condition="'%(ProjectToBuild.Visibility)' == 'Internal'" >$(InternalDummyProjectDir)</ClonedProjectsDir>
+ </PropertyGroup>
+
+ <Message Text="[GenDummy] %(ProjectToBuild.Filename)" Importance="High" />
+ <Message Text="Directory = %(ProjectToBuild.Directory)" Importance="High" />
+
+ <Exec Command='$(GenDummyCommand) -project %(ProjectToBuild.Filename) -source %(ProjectToBuild.RootDir)%(ProjectToBuild.Directory).. -clonePath $(ClonedProjectsDir)' />
+
+ </Target>
+
+ <Target Name="AfterDummy">
+ <Message Text="Clean Directory" Importance="High" />
+ <RemoveDir Directories="$(PublicDummyProjectDir);$(InternalDummyProjectDir)" />
+ </Target>
+
</Project>