blob: 99776c4114a1fbc6ee43136d5bc3be95b2f582ad [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_binary("check-licenses") {
gopackage = "go.fuchsia.dev/fuchsia/tools/check-licenses/cmd"
deps = [ ":main" ]
}
go_library("main") {
name = "go.fuchsia.dev/fuchsia/tools/check-licenses/cmd"
source_dir = "cmd"
deps = [
":golden",
":lib",
"//third_party/golibs:cloud.google.com/go/storage",
"//third_party/golibs:github.com/google/subcommands",
"//tools/lib/logger",
]
}
go_library("templates") {
name = "go.fuchsia.dev/fuchsia/tools/check-licenses/templates"
source_dir = "templates"
}
go_library("lib") {
name = "go.fuchsia.dev/fuchsia/tools/check-licenses/lib"
deps = [
":templates",
"//tools/lib/logger",
]
source_dir = "lib"
}
go_library("golden") {
name = "go.fuchsia.dev/fuchsia/tools/check-licenses/golden"
source_dir = "golden"
}
install_host_tools("host") {
deps = [ ":check-licenses" ]
outputs = [ "check-licenses" ]
}
group("tests") {
testonly = true
deps = [
":check-licenses_golden_tests($host_toolchain)",
":check-licenses_lib_tests($host_toolchain)",
":check-licenses_main_tests($host_toolchain)",
]
}
go_test("check-licenses_main_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/check-licenses/cmd" ]
deps = [ ":main" ]
}
go_test("check-licenses_lib_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/check-licenses/lib" ]
deps = [ ":lib" ]
}
go_test("check-licenses_golden_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/check-licenses/golden" ]
deps = [ ":golden" ]
}