Browse Source

Merge pull request #1619 from AvaloniaUI/SourceLink

Enable SourceLink
pull/1626/head
Steven Kirk 8 years ago
committed by GitHub
parent
commit
192a50f6e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      build/SourceLink.props
  2. 56
      packages.cake
  3. 1
      src/Directory.Build.props
  4. 3
      src/iOS/Avalonia.iOS/Avalonia.iOS.csproj
  5. 3
      src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj

5
build/SourceLink.props

@ -0,0 +1,5 @@
<Project>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
</ItemGroup>
</Project>

56
packages.cake

@ -155,38 +155,28 @@ public class Packages
var coreLibraries = new string[][] var coreLibraries = new string[][]
{ {
new [] { "./src/", "Avalonia.Animation", ".dll" }, new [] { "./src/", "Avalonia.Animation"},
new [] { "./src/", "Avalonia.Animation", ".xml" }, new [] { "./src/", "Avalonia.Base"},
new [] { "./src/", "Avalonia.Base", ".dll" }, new [] { "./src/", "Avalonia.Controls"},
new [] { "./src/", "Avalonia.Base", ".xml" }, new [] { "./src/", "Avalonia.DesignerSupport"},
new [] { "./src/", "Avalonia.Controls", ".dll" }, new [] { "./src/", "Avalonia.Diagnostics"},
new [] { "./src/", "Avalonia.Controls", ".xml" }, new [] { "./src/", "Avalonia.Input"},
new [] { "./src/", "Avalonia.DesignerSupport", ".dll" }, new [] { "./src/", "Avalonia.Interactivity"},
new [] { "./src/", "Avalonia.DesignerSupport", ".xml" }, new [] { "./src/", "Avalonia.Layout"},
new [] { "./src/", "Avalonia.Diagnostics", ".dll" }, new [] { "./src/", "Avalonia.Logging.Serilog"},
new [] { "./src/", "Avalonia.Diagnostics", ".xml" }, new [] { "./src/", "Avalonia.Visuals"},
new [] { "./src/", "Avalonia.Input", ".dll" }, new [] { "./src/", "Avalonia.Styling"},
new [] { "./src/", "Avalonia.Input", ".xml" }, new [] { "./src/", "Avalonia.Themes.Default"},
new [] { "./src/", "Avalonia.Interactivity", ".dll" }, new [] { "./src/Markup/", "Avalonia.Markup"},
new [] { "./src/", "Avalonia.Interactivity", ".xml" }, new [] { "./src/Markup/", "Avalonia.Markup.Xaml"},
new [] { "./src/", "Avalonia.Layout", ".dll" },
new [] { "./src/", "Avalonia.Layout", ".xml" },
new [] { "./src/", "Avalonia.Logging.Serilog", ".dll" },
new [] { "./src/", "Avalonia.Logging.Serilog", ".xml" },
new [] { "./src/", "Avalonia.Visuals", ".dll" },
new [] { "./src/", "Avalonia.Visuals", ".xml" },
new [] { "./src/", "Avalonia.Styling", ".dll" },
new [] { "./src/", "Avalonia.Styling", ".xml" },
new [] { "./src/", "Avalonia.Themes.Default", ".dll" },
new [] { "./src/", "Avalonia.Themes.Default", ".xml" },
new [] { "./src/Markup/", "Avalonia.Markup", ".dll" },
new [] { "./src/Markup/", "Avalonia.Markup", ".xml" },
new [] { "./src/Markup/", "Avalonia.Markup.Xaml", ".dll" },
new [] { "./src/Markup/", "Avalonia.Markup.Xaml", ".xml" }
}; };
var coreLibrariesFiles = coreLibraries.Select((lib) => { var extensionsToPack = new [] {".dll", ".xml", ".pdb"};
return (FilePath)context.File(lib[0] + lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard2.0/" + lib[1] + lib[2]);
var coreLibrariesFiles = coreLibraries
.Zip(extensionsToPack, (lib, ext) => new { lib, ext})
.Select((lib) => {
return (FilePath)context.File(lib.lib[0] + lib.lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard2.0/" + lib.lib[1] + lib.ext);
}).ToList(); }).ToList();
var coreLibrariesNuSpecContent = coreLibrariesFiles.Select((file) => { var coreLibrariesNuSpecContent = coreLibrariesFiles.Select((file) => {
@ -207,16 +197,14 @@ public class Packages
}; };
}); });
var net45RuntimePlatformExtensions = new [] {".xml", ".dll"}; var net45RuntimePlatform = extensionsToPack.Select(libSuffix => {
var net45RuntimePlatform = net45RuntimePlatformExtensions.Select(libSuffix => {
return new NuSpecContent { return new NuSpecContent {
Source = ((FilePath)context.File("./src/Avalonia.DotNetFrameworkRuntime/bin/" + parameters.DirSuffix + "/net461/Avalonia.DotNetFrameworkRuntime" + libSuffix)).FullPath, Source = ((FilePath)context.File("./src/Avalonia.DotNetFrameworkRuntime/bin/" + parameters.DirSuffix + "/net461/Avalonia.DotNetFrameworkRuntime" + libSuffix)).FullPath,
Target = "lib/net45" Target = "lib/net45"
}; };
}); });
var netCoreRuntimePlatformExtensions = new [] {".xml", ".dll"}; var netCoreRuntimePlatform = extensionsToPack.Select(libSuffix => {
var netCoreRuntimePlatform = netCoreRuntimePlatformExtensions.Select(libSuffix => {
return new NuSpecContent { return new NuSpecContent {
Source = ((FilePath)context.File("./src/Avalonia.DotNetCoreRuntime/bin/" + parameters.DirSuffix + "/netcoreapp2.0/Avalonia.DotNetCoreRuntime" + libSuffix)).FullPath, Source = ((FilePath)context.File("./src/Avalonia.DotNetCoreRuntime/bin/" + parameters.DirSuffix + "/netcoreapp2.0/Avalonia.DotNetCoreRuntime" + libSuffix)).FullPath,
Target = "lib/netcoreapp2.0" Target = "lib/netcoreapp2.0"

1
src/Directory.Build.props

@ -1,3 +1,4 @@
<Project> <Project>
<Import Project="..\build\SharedVersion.props" /> <Import Project="..\build\SharedVersion.props" />
<Import Project="..\build\SourceLink.props" Condition="'$(DisableSourceLink)' == ''" />
</Project> </Project>

3
src/iOS/Avalonia.iOS/Avalonia.iOS.csproj

@ -35,6 +35,9 @@
<CodesignKey>iPhone Developer</CodesignKey> <CodesignKey>iPhone Developer</CodesignKey>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<DisableSourceLink>true</DisableSourceLink>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AppBuilder.cs" /> <Compile Include="AppBuilder.cs" />
<Compile Include="AvaloniaRootViewController.cs" /> <Compile Include="AvaloniaRootViewController.cs" />

3
src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj

@ -94,6 +94,9 @@
<CodesignProvision>Automatic:AppStore</CodesignProvision> <CodesignProvision>Automatic:AppStore</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey> <CodesignKey>iPhone Distribution</CodesignKey>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<DisableSourceLink>true</DisableSourceLink>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Main.cs" /> <Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" /> <Compile Include="AppDelegate.cs" />

Loading…
Cancel
Save