Merge "Inline the single call of java_library2"
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
load("@rules_java//java:defs.bzl", "java_binary", "java_library")
|
load("@rules_java//java:defs.bzl", "java_binary", "java_library")
|
||||||
load("//tools/bzl:java.bzl", "java_library2")
|
|
||||||
load("//tools/bzl:javadoc.bzl", "java_doc")
|
load("//tools/bzl:javadoc.bzl", "java_doc")
|
||||||
|
|
||||||
FUNCTION_SRCS = [
|
FUNCTION_SRCS = [
|
||||||
@@ -103,13 +102,6 @@ java_binary(
|
|||||||
runtime_deps = DEPLOY_ENV,
|
runtime_deps = DEPLOY_ENV,
|
||||||
)
|
)
|
||||||
|
|
||||||
java_library2(
|
|
||||||
name = "framework-lib",
|
|
||||||
testonly = True,
|
|
||||||
srcs = glob(
|
|
||||||
["**/*.java"],
|
|
||||||
exclude = FUNCTION_SRCS,
|
|
||||||
),
|
|
||||||
exported_deps = [
|
exported_deps = [
|
||||||
":function",
|
":function",
|
||||||
"//lib:jgit-junit",
|
"//lib:jgit-junit",
|
||||||
@@ -122,9 +114,18 @@ java_library2(
|
|||||||
"//lib/truth",
|
"//lib/truth",
|
||||||
"//lib/truth:truth-java8-extension",
|
"//lib/truth:truth-java8-extension",
|
||||||
"//lib/greenmail",
|
"//lib/greenmail",
|
||||||
] + TEST_DEPS,
|
] + TEST_DEPS
|
||||||
|
|
||||||
|
java_library(
|
||||||
|
name = "framework-lib",
|
||||||
|
testonly = True,
|
||||||
|
srcs = glob(
|
||||||
|
["**/*.java"],
|
||||||
|
exclude = FUNCTION_SRCS,
|
||||||
|
),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = DEPLOY_ENV,
|
exports = exported_deps,
|
||||||
|
deps = DEPLOY_ENV + exported_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
# Copyright (C) 2016 The Android Open Source Project
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# Syntactic sugar for native java_library() rule:
|
|
||||||
# accept exported_deps attributes
|
|
||||||
|
|
||||||
load("@rules_java//java:defs.bzl", "java_library")
|
|
||||||
|
|
||||||
def java_library2(deps = [], exported_deps = [], exports = [], **kwargs):
|
|
||||||
if exported_deps:
|
|
||||||
deps = deps + exported_deps
|
|
||||||
exports = exports + exported_deps
|
|
||||||
java_library(
|
|
||||||
deps = deps,
|
|
||||||
exports = exports,
|
|
||||||
**kwargs
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user