Merge "[ElmSharp] Add the TCs for checking basic operation of GenList"
[platform/core/csapi/tizenfx.git] / build / build.dummy.csproj
1 <Project DefaultTargets="Build">
2
3   <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
4
5   <Import Project="$(MSBuildThisFileDirectory)directories.props" />
6   <Import Project="$(MSBuildThisFileDirectory)version.props" />
7
8   <PropertyGroup>
9     <TargetFramework>netstandard2.0</TargetFramework>
10     <GenerateDependencyFile>false</GenerateDependencyFile>
11     <DummyAssemblyVersion>$(VersionPrefix)</DummyAssemblyVersion>
12     <OutDir>$(OutputDummyDir)</OutDir>
13   </PropertyGroup>
14
15   <!-- Properties for directories -->
16   <PropertyGroup>
17     <IntermediateLibDir>$(BaseIntermediateOutputPath)_ref_lib\</IntermediateLibDir>
18     <IntermediateAPIDir>$(BaseIntermediateOutputPath)_ref_api\</IntermediateAPIDir>
19   </PropertyGroup>
20
21   <!-- Properties for GenAPI tool -->
22   <PropertyGroup>
23     <GenAPICommand>dotnet $(GenAPIDir)GenAPI.exe</GenAPICommand>
24   </PropertyGroup>
25
26   <!-- Source assemblies -->
27   <ItemGroup>
28     <TizenAssemblies Include="$(OutputPublicDir)\*.dll" />
29     <TizenAssemblies Include="$(OutputPlatformDir)\*.dll" />
30   </ItemGroup>
31
32   <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
33
34   <Target Name="Compile" />
35   <Target Name="CopyFilesToOutputDirectory" />
36
37   <!-- Target for preparing reference lib directory -->
38   <Target Name="Prepare" DependsOnTargets="ResolveAssemblyReferences">
39     <ItemGroup>
40       <ReferencePath Include="@(TizenAssemblies)" />
41     </ItemGroup>
42     <MakeDir Directories="$(IntermediateLibDir);$(IntermediateAPIDir)" />
43     <Copy SourceFiles="@(ReferencePath)" DestinationFolder="$(IntermediateLibDir)" />
44     <RemoveDir Directories="$(OutputDummyDir)" />
45     <MakeDir Directories="$(OutputDummyDir)" />
46   </Target>
47
48   <!-- Target for generating *.AssemblyInfo.cs files -->
49   <Target Name="GenerateAsmInfo"
50           Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).AssemblyInfo.cs">
51
52     <PropertyGroup>
53       <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
54     </PropertyGroup>
55
56     <ItemGroup>
57       <AssemblyInfoLines Include="[assembly:System.Reflection.AssemblyVersion(&quot;$(DummyAssemblyVersion)&quot;)]" />
58     </ItemGroup>
59
60     <WriteLinesToFile
61       File="$(GeneratedAssemblyInfoSource)"
62       Lines="@(AssemblyInfoLines)"
63       Overwrite="true" />
64
65     <ItemGroup>
66       <FileWrites Include="$(GeneratedAssemblyInfoSource)" />
67     </ItemGroup>
68
69   </Target>
70
71   <!-- Target for generating reference source files using GenAPI -->
72   <Target Name="GenerateAPI"
73           Inputs="@(TizenAssemblies)" Outputs="$(IntermediateAPIDir)%(Filename).cs">
74     <PropertyGroup>
75       <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
76     </PropertyGroup>
77
78     <Message Text="[GenAPI] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssemblySource)" Importance="High" />
79
80     <Exec Command='$(GenAPICommand) -assembly:&quot;%(TizenAssemblies.Identity)&quot; -libPath:$(IntermediateLibDir) -out:$(GeneratedReferenceAssemblySource) -throw:&quot;Not Supported Feature&quot; -global' />
81   </Target>
82
83
84   <Target Name="GenerateDummy"
85           DependsOnTargets="GenerateAsmInfo;GenerateAPI"
86           Inputs="@(TizenAssemblies)" Outputs="$(OutputDummyDir)%(TizenAssemblies.Filename).dll">
87     <PropertyGroup>
88       <ThisAssemblyFilename>%(TizenAssemblies.Filename)</ThisAssemblyFilename>
89       <GeneratedAssemblyInfoSource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).AssemblyInfo.cs</GeneratedAssemblyInfoSource>
90       <GeneratedReferenceAssemblySource>$(IntermediateAPIDir)%(TizenAssemblies.Filename).cs</GeneratedReferenceAssemblySource>
91       <GeneratedReferenceAssembly>$(OutputDummyDir)%(TizenAssemblies.Filename).dll</GeneratedReferenceAssembly>
92     </PropertyGroup>
93
94     <Message Text="[Compile] %(TizenAssemblies.Filename) -> $(GeneratedReferenceAssembly)" Importance="High" />
95
96     <ItemGroup>
97       <FilteredReferencePath Include="@(ReferencePath)" Condition="%(Filename) != $(ThisAssemblyFilename)" />
98     </ItemGroup>
99
100     <Csc
101         Sources="$(GeneratedReferenceAssemblySource);$(GeneratedAssemblyInfoSource)"
102         OutputAssembly="$(GeneratedReferenceAssembly)"
103         AdditionalLibPaths="$(AdditionalLibPaths)"
104         AllowUnsafeBlocks="true"
105         DefineConstants="$(DefineConstants)"
106         DisabledWarnings="$(NoWarn)"
107         TargetType="$(OutputType)"
108         NoStandardLib="$(NoCompilerStandardLib)"
109         References="@(FilteredReferencePath)"
110         Deterministic="true"
111         ToolExe="$(CscToolExe)"
112         ToolPath="$(CscToolPath)" />
113
114   </Target>
115
116   <Target Name="AfterBuild" DependsOnTargets="Prepare;GenerateDummy">
117     <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
118   </Target>
119
120 </Project>
121