Added NuGet support

This commit is contained in:
Sam Harwell 2013-08-04 16:26:18 -05:00
parent 880bc161a2
commit 6736b3f900
6 changed files with 116 additions and 0 deletions

86
build/Antlr4.nuspec Normal file
View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Antlr4</id>
<version>0.0.0</version>
<authors>Sam Harwell, Terence Parr</authors>
<owners>Sam Harwell</owners>
<description>The C# target of the ANTLR 4 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description>
<language>en-us</language>
<projectUrl>https://github.com/sharwell/antlr4cs</projectUrl>
<licenseUrl>https://raw.github.com/sharwell/antlr4cs/master/LICENSE.txt</licenseUrl>
<iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl>
<copyright>Copyright © Sam Harwell 2013</copyright>
<releaseNotes>https://github.com/sharwell/antlr4cs/releases/v$version$</releaseNotes>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<tags>antlr antlr4 parsing</tags>
<title>ANTLR 4</title>
<summary>The C# target of the ANTLR 4 parser generator.</summary>
<references>
<group targetFramework="net20">
<reference file="Antlr4.Runtime.v2.0.dll"/>
</group>
<group targetFramework="net30">
<reference file="Antlr4.Runtime.v3.0.dll"/>
</group>
<group targetFramework="net35">
<reference file="Antlr4.Runtime.v3.5.dll"/>
</group>
<group targetFramework="net40">
<reference file="Antlr4.Runtime.v4.0.dll"/>
</group>
<group targetFramework="net45">
<reference file="Antlr4.Runtime.v4.5.dll"/>
</group>
</references>
</metadata>
<files>
<!-- Tools -->
<file src="$M2_REPO$\com\tunnelvisionlabs\antlr4-csharp\4.1-SNAPSHOT\antlr4-csharp-4.1-SNAPSHOT-complete.jar" target="tools"/>
<!-- Runtime Libraries -->
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v2.0\$Configuration$\Antlr4.Runtime.v2.0.dll" target="lib\net20"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v2.0\$Configuration$\Antlr4.Runtime.v2.0.pdb" target="lib\net20"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v2.0\$Configuration$\Antlr4.Runtime.v2.0.xml" target="lib\net20"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.0\$Configuration$\Antlr4.Runtime.v3.0.dll" target="lib\net30"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.0\$Configuration$\Antlr4.Runtime.v3.0.pdb" target="lib\net30"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.0\$Configuration$\Antlr4.Runtime.v3.0.xml" target="lib\net30"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.5\$Configuration$\Antlr4.Runtime.v3.5.dll" target="lib\net35"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.5\$Configuration$\Antlr4.Runtime.v3.5.pdb" target="lib\net35"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v3.5\$Configuration$\Antlr4.Runtime.v3.5.xml" target="lib\net35"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.0\$Configuration$\Antlr4.Runtime.v4.0.dll" target="lib\net40"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.0\$Configuration$\Antlr4.Runtime.v4.0.pdb" target="lib\net40"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.0\$Configuration$\Antlr4.Runtime.v4.0.xml" target="lib\net40"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.5\$Configuration$\Antlr4.Runtime.v4.5.dll" target="lib\net45"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.5\$Configuration$\Antlr4.Runtime.v4.5.pdb" target="lib\net45"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\v4.5\$Configuration$\Antlr4.Runtime.v4.5.xml" target="lib\net45"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\CF3.5\$Configuration$\Antlr4.Runtime.CF3.5.dll" target="lib\net35-cf"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\CF3.5\$Configuration$\Antlr4.Runtime.CF3.5.pdb" target="lib\net35-cf"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\CF3.5\$Configuration$\Antlr4.Runtime.CF3.5.xml" target="lib\net35-cf"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\Portable\$Configuration$\Antlr4.Runtime.Portable.dll" target="lib\portable-net40"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\Portable\$Configuration$\Antlr4.Runtime.Portable.pdb" target="lib\portable-net40"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\Portable\$Configuration$\Antlr4.Runtime.Portable.xml" target="lib\portable-net40"/>
<!-- Build Configuration -->
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v3.5\$Configuration$\Antlr4.v3.5.props" target="build\net35\Antlr4.props"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v3.5\$Configuration$\Antlr4.v3.5.targets" target="build\net35\Antlr4.targets"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v3.5\$Configuration$\Antlr4BuildTasks.v3.5.dll" target="build\net35"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v4.0\$Configuration$\Antlr4.v4.0.props" target="build\net40\Antlr4.props"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v4.0\$Configuration$\Antlr4.v4.0.targets" target="build\net40\Antlr4.targets"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\v4.0\$Configuration$\Antlr4BuildTasks.v4.0.dll" target="build\net40"/>
<!-- Source Code -->
<file exclude="..\runtime\CSharp\Antlr4.Runtime\obj\**\*.cs" src="..\runtime\CSharp\Antlr4.Runtime\**\*.cs" target="src"/>
</files>
</package>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Folder containing Antlr4BuildTasks.v3.5.dll -->
<Antlr4BuildTaskPath>.</Antlr4BuildTaskPath>
<!-- Path to the ANTLR tool itself -->
<Antlr4ToolPath>..\..\tools\antlr4-csharp-4.1-SNAPSHOT-complete.jar</Antlr4ToolPath>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Folder containing Antlr4BuildTasks.v4.0.dll -->
<Antlr4BuildTaskPath>.</Antlr4BuildTaskPath>
<!-- Path to the ANTLR tool itself -->
<Antlr4ToolPath>..\..\tools\antlr4-csharp-4.1-SNAPSHOT-complete.jar</Antlr4ToolPath>
</PropertyGroup>
</Project>

View File

@ -56,6 +56,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Antlr4.v3.5.props">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Antlr4.v3.5.targets">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>

View File

@ -57,6 +57,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Antlr4.v4.0.props">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Antlr4.v4.0.targets">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>

View File

@ -199,6 +199,12 @@ namespace Antlr4.Build.Tasks
AppDomain domain = null;
bool success;
if (!Path.IsPathRooted(ToolPath))
ToolPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), ToolPath);
if (!Path.IsPathRooted(BuildTaskPath))
BuildTaskPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), BuildTaskPath);
try
{
domain = GetAntlrTaskAppDomain();