Skip to content

Commit

Permalink
Fix the locations for the license files in shaded and unshaded jar fi…
Browse files Browse the repository at this point in the history
…les.

PiperOrigin-RevId: 599295727
  • Loading branch information
gunan authored and copybara-github committed Jan 17, 2024
1 parent 3f380a6 commit 244fbb7
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,44 @@ jar_jar(
java_binary(
name = "compiler_uberjar",
main_class = "com.google.javascript.jscomp.CommandLineRunner",
resources = [
":LICENSE",
],
runtime_deps = [":compiler_lib"],
)

version = "$(COMPILER_VERSION)" or "1.0-SNAPSHOT"

genrule(
name = "third_party_licenses_genrule",
srcs = [
"//license_check:THIRD_PARTY_NOTICES",
],
outs = [
"THIRD_PARTY_NOTICES",
],
cmd = "cp $(location //license_check:THIRD_PARTY_NOTICES) $(location THIRD_PARTY_NOTICES)",
)

java_export(
name = "compiler_unshaded",
maven_coordinates = "com.google.javascript:closure-compiler-unshaded:{0}".format(version),
pom_template = "maven/closure-compiler-unshaded.pom.xml.tpl",
runtime_deps = [
"//:compiler_unshaded_lib",
],
)

java_library(
name = "compiler_unshaded_lib",
resources = [
":LICENSE",
":THIRD_PARTY_NOTICES",
],
srcs = [
":CommandLineRunnerVersion",
],
deps = [
"//:compiler_lib",
],
)
Expand Down Expand Up @@ -145,6 +173,10 @@ filegroup(
java_binary(
name = "compiler_unshaded_no_runtime_libs",
main_class = "com.google.javascript.jscomp.CommandLineRunner",
resources = [
":LICENSE",
":THIRD_PARTY_NOTICES",
],
runtime_deps = [":compiler_lib_no_runtime_libs"],
)

Expand All @@ -157,8 +189,8 @@ oss_java_library(
],
resources = [
":LICENSE",
":THIRD_PARTY_NOTICES",
":externs_zip",
"//license_check:THIRD_PARTY_NOTICES",
] + glob([
"src/**/*.properties",
]),
Expand Down

0 comments on commit 244fbb7

Please sign in to comment.