Skip to content

Commit

Permalink
Updating .NET Bazel build rules for NuGet dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed May 3, 2019
1 parent 913cce4 commit 40b345b
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 2 deletions.
30 changes: 29 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,33 @@ dotnet_nuget_new(
name = "json.net",
package = "newtonsoft.json",
version = "12.0.2",
build_file = "//third_party/dotnet/nuget/packages:json.net.bzl"
build_file = "//third_party/dotnet/nuget/packages:newtonsoft.json.bzl"
)

dotnet_nuget_new(
name = "moq",
package = "moq",
version = "4.10.1",
build_file = "//third_party/dotnet/nuget/packages:moq.bzl"
)

dotnet_nuget_new(
name = "castle.core",
package = "castle.core",
version = "4.3.1",
build_file = "//third_party/dotnet/nuget/packages:castle.core.bzl"
)

dotnet_nuget_new(
name = "system.threading.tasks.extensions",
package = "system.threading.tasks.extensions",
version = "4.5.1",
build_file = "//third_party/dotnet/nuget/packages:system.threading.tasks.extensions.bzl"
)

dotnet_nuget_new(
name = "nunit",
package = "nunit",
version = "3.11.0",
build_file = "//third_party/dotnet/nuget/packages:nunit.bzl"
)
8 changes: 7 additions & 1 deletion third_party/dotnet/nuget/packages/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
exports_files(["json.net.bzl"])
exports_files([
"newtonsoft.json.bzl",
"moq.bzl",
"nunit.bzl",
"castle.core.bzl",
"system.threading.tasks.extensions.bzl"
])
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions third_party/dotnet/nuget/packages/castle.core.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package(default_visibility = [ "//visibility:public" ])
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library")

net_import_library(
name = "net45",
src = "lib/net45/Castle.Core.dll",
)

core_import_library(
name = "netcore",
src = "lib/netstandard15/Castle.Core.dll"
)
Binary file not shown.
Binary file removed third_party/dotnet/nuget/packages/moq.4.8.1.nupkg
Binary file not shown.
20 changes: 20 additions & 0 deletions third_party/dotnet/nuget/packages/moq.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package(default_visibility = [ "//visibility:public" ])
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library")

net_import_library(
name = "net45",
src = "lib/net45/Moq.dll",
deps = [
"@castle.core//:net45",
"@system.threading.tasks.extensions//:net45",
],
)

core_import_library(
name = "netcore",
src = "lib/netstandard13/Moq.dll",
deps = [
"@castle.core//:netcore",
"@system.threading.tasks.extensions//:netcore",
],
)
12 changes: 12 additions & 0 deletions third_party/dotnet/nuget/packages/nunit.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package(default_visibility = [ "//visibility:public" ])
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library")

net_import_library(
name = "net45",
src = "lib/net45/nunit.framework.dll"
)

core_import_library(
name = "netcore",
src = "lib/netstandard20/nunit.framework.dll"
)
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package(default_visibility = [ "//visibility:public" ])
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library")

net_import_library(
name = "net45",
src = "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll",
)

core_import_library(
name = "netcore",
src = "lib/netstandard2.0/System.Threading.Tasks.Extensions.dll"
)

0 comments on commit 40b345b

Please sign in to comment.