Skip to content

Commit 40f5e39

Browse files
Stewart Milesmontymxb
authored andcommitted
Type forwarding DLL for the Parse Task implementation and Unity plugin build. (#267)
1 parent 67c5a41 commit 40f5e39

File tree

12 files changed

+325
-1
lines changed

12 files changed

+325
-1
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,8 @@ _UpgradeReport_Files/
110110
Backup*/
111111
UpgradeLog*.XML
112112

113+
# Include all files in Unity project templates.
114+
!**/UnityProjectTemplate/**
115+
113116
# idea files
114-
.idea/
117+
.idea/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) 2015-present, Parse, LLC. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.
2+
3+
using System;
4+
using System.Reflection;
5+
using System.Runtime.InteropServices;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("Parse")]
11+
[assembly: AssemblyDescription("Makes accessing services from Parse native and straightforward.")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("Parse")]
15+
[assembly: AssemblyCopyright("Copyright © Parse 2012")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
[assembly: ComVisible(true)]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Runtime.CompilerServices;
2+
3+
[assembly: TypeForwardedToAttribute(typeof(System.AggregateException))]
4+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.CancellationToken))]
5+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.CancellationTokenRegistration))]
6+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.CancellationTokenSource))]
7+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.Task))]
8+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.Task<>))]
9+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskCompletionSource<>))]
10+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskContinuationOptions))]
11+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskCreationOptions))]
12+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskExtensions))]
13+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskFactory))]
14+
[assembly: TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskScheduler))]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F4A424D3-1BBF-4F29-BE8E-D1336505987E}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Unity.Tasks</RootNamespace>
11+
<AssemblyName>Unity.Tasks</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile>
15+
</TargetFrameworkProfile>
16+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17+
<RestorePackages>true</RestorePackages>
18+
<ProductVersion>10.0.0</ProductVersion>
19+
<SchemaVersion>2.0</SchemaVersion>
20+
</PropertyGroup>
21+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<DebugSymbols>true</DebugSymbols>
23+
<DebugType>full</DebugType>
24+
<Optimize>false</Optimize>
25+
<OutputPath>bin\Debug\Unity\</OutputPath>
26+
<DefineConstants>TRACE;DEBUG;UNITY</DefineConstants>
27+
<ErrorReport>prompt</ErrorReport>
28+
<WarningLevel>4</WarningLevel>
29+
<LangVersion>5</LangVersion>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<DebugType>pdbonly</DebugType>
33+
<Optimize>true</Optimize>
34+
<OutputPath>bin\Release\Unity\</OutputPath>
35+
<DefineConstants>TRACE;UNITY</DefineConstants>
36+
<ErrorReport>prompt</ErrorReport>
37+
<WarningLevel>4</WarningLevel>
38+
<LangVersion>5</LangVersion>
39+
<DocumentationFile>bin\Release\Unity\Unity.Tasks.xml</DocumentationFile>
40+
</PropertyGroup>
41+
<ItemGroup>
42+
<Reference Include="System" />
43+
<Reference Include="System.Core" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<!-- Assembly info, etc. -->
47+
<Compile Include="Properties\*.cs" />
48+
<Compile Include="Public\**\*.cs" />
49+
</ItemGroup>
50+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
51+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
52+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
53+
Other similar extension points exist, see Microsoft.Common.targets.
54+
<Target Name="BeforeBuild">
55+
</Target>
56+
<Target Name="AfterBuild">
57+
</Target>
58+
-->
59+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) 2015-present, Parse, LLC. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.
2+
3+
using System;
4+
using System.Reflection;
5+
using System.Runtime.InteropServices;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("Parse")]
11+
[assembly: AssemblyDescription("Makes accessing services from Parse native and straightforward.")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("Parse")]
15+
[assembly: AssemblyCopyright("Copyright © Parse 2012")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
[assembly: ComVisible(true)]
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{2B36560F-64B5-4CEE-9F85-ED8A4FA64A1B}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Unity.Tasks</RootNamespace>
11+
<AssemblyName>Unity.Tasks.UnityPlugin</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile>
15+
</TargetFrameworkProfile>
16+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17+
<RestorePackages>true</RestorePackages>
18+
<ProductVersion>10.0.0</ProductVersion>
19+
<SchemaVersion>2.0</SchemaVersion>
20+
</PropertyGroup>
21+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<DebugSymbols>true</DebugSymbols>
23+
<DebugType>full</DebugType>
24+
<Optimize>false</Optimize>
25+
<OutputPath>bin\Debug\Unity\</OutputPath>
26+
<DefineConstants>TRACE;DEBUG;UNITY</DefineConstants>
27+
<ErrorReport>prompt</ErrorReport>
28+
<WarningLevel>4</WarningLevel>
29+
<LangVersion>5</LangVersion>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<DebugType>pdbonly</DebugType>
33+
<Optimize>true</Optimize>
34+
<OutputPath>bin\Release\Unity\</OutputPath>
35+
<DefineConstants>TRACE;UNITY</DefineConstants>
36+
<ErrorReport>prompt</ErrorReport>
37+
<WarningLevel>4</WarningLevel>
38+
<LangVersion>5</LangVersion>
39+
<DocumentationFile>bin\Release\Unity\Unity.Tasks.xml</DocumentationFile>
40+
</PropertyGroup>
41+
<ItemGroup>
42+
<Reference Include="System" />
43+
<Reference Include="System.Core" />
44+
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
45+
<SpecificVersion>False</SpecificVersion>
46+
<HintPath>..\UnityEngine.dll</HintPath>
47+
<Private>False</Private>
48+
</Reference>
49+
</ItemGroup>
50+
<ItemGroup>
51+
<!-- Assembly info, etc. -->
52+
<Compile Include="Properties\*.cs" />
53+
</ItemGroup>
54+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
55+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
56+
<ItemGroup>
57+
<ProjectReference Include="..\Unity.Tasks\Unity.Tasks.csproj">
58+
<Project>{CE75C800-A97F-4464-9A8B-3F65258456BF}</Project>
59+
<Name>Unity.Tasks</Name>
60+
</ProjectReference>
61+
</ItemGroup>
62+
<ItemGroup>
63+
<ProjectReference Include="..\Unity.Tasks.TypeForwards\Unity.Tasks.TypeForwards.csproj">
64+
<Project>{F4A424D3-1BBF-4F29-BE8E-D1336505987E}</Project>
65+
<Name>Unity.Tasks.TypeForwards</Name>
66+
</ProjectReference>
67+
</ItemGroup>
68+
<PropertyGroup>
69+
<UnityProjectTemplatePath>UnityProjectTemplate</UnityProjectTemplatePath>
70+
<UnityProjectIntermediatePath>$(IntermediateOutputPath)\UnityProject</UnityProjectIntermediatePath>
71+
<UnityExecutablePath Condition="'$(OS)' == 'Windows'">$(ProgramFiles)\Unity\Editor\Unity.exe</UnityExecutablePath>
72+
<UnityExecutablePath Condition="'$(OS)' == 'Unix'">/Applications/Unity/Unity.app/Contents/MacOS/Unity</UnityExecutablePath>
73+
<BuildUnityPlugin Condition="'$(BuildUnityPlugin)' == ''">1</BuildUnityPlugin>
74+
</PropertyGroup>
75+
<ItemGroup>
76+
<UnityProjectTemplateFiles Include="UnityProjectTemplate\**\*.meta" />
77+
</ItemGroup>
78+
<Target Name="CreateUnityProject">
79+
<!-- Generate the Unity project. -->
80+
<Copy SourceFiles="@(UnityProjectTemplateFiles)"
81+
DestinationFolder="$(UnityProjectIntermediatePath)\%(RecursiveDir)" />
82+
<Copy SourceFiles="..\Unity.Compat\$(OutputPath)\Unity.Compat.dll;
83+
..\Unity.Tasks\$(OutputPath)\Unity.Tasks.dll;
84+
..\Unity.Tasks.TypeForwards\$(OutputPath)\Unity.Tasks.dll;"
85+
DestinationFiles="
86+
$(UnityProjectIntermediatePath)\Assets\Parse\Plugins\Unity.Compat.dll;
87+
$(UnityProjectIntermediatePath)\Assets\Parse\Plugins\Unity.Tasks.dll;
88+
$(UnityProjectIntermediatePath)\Assets\Parse\Plugins\dotNet45\Unity.Tasks.dll;" />
89+
</Target>
90+
<Target Name="BuildUnityPlugin"
91+
DependsOnTargets="CreateUnityProject"
92+
Condition="'$(BuildUnityPlugin)' == '1'">
93+
<!-- Convert paths to absolute paths (required to run Unity).
94+
ConvertToAbsolutePath isn't available in xbuild so use CreateItem to expand the path. -->
95+
<CreateItem Include="$(UnityProjectIntermediatePath)">
96+
<Output TaskParameter="Include" ItemName="_UnityProjectIntermediatePath" />
97+
</CreateItem>
98+
<CreateItem Include="$(IntermediateOutputPath)">
99+
<Output TaskParameter="Include" ItemName="_IntermediateOutputPath" />
100+
</CreateItem>
101+
<CreateItem Include="$(OutputPath)">
102+
<Output TaskParameter="Include" ItemName="_OutputPath" />
103+
</CreateItem>
104+
<!-- Run Unity to generate the plugin package. -->
105+
<ItemGroup>
106+
<UnityArgs Include="-batchmode" />
107+
<UnityArgs Include="-projectPath &quot;%(_UnityProjectIntermediatePath.FullPath)&quot;" />
108+
<UnityArgs Include="-logFile &quot;%(_IntermediateOutputPath.FullPath)/UnityProject.log&quot;" />
109+
<UnityArgs Include="-exportPackage Assets/Parse &quot;%(_OutputPath.FullPath)/ParseTasks.unitypackage&quot;" />
110+
<UnityArgs Include="-quit" />
111+
</ItemGroup>
112+
<Exec Command="&quot;$(UnityExecutablePath)&quot; @(UnityArgs,' ')" Outputs="$(OutputPath)/ParseTasks.unitypackage" />
113+
</Target>
114+
<Target Name="AfterBuild" DependsOnTargets="CreateUnityProject;BuildUnityPlugin"/>
115+
</Project>

Unity.Tasks.UnityPlugin/UnityProjectTemplate/Assets/Parse.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Unity.Tasks.UnityPlugin/UnityProjectTemplate/Assets/Parse/Plugins.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Unity.Tasks.UnityPlugin/UnityProjectTemplate/Assets/Parse/Plugins/Unity.Compat.dll.meta

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Unity.Tasks.UnityPlugin/UnityProjectTemplate/Assets/Parse/Plugins/Unity.Tasks.dll.meta

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)