-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy: Inject Jazzer version via a flag
This removes the need to have a "version bump" commit before every release.
- Loading branch information
Showing
11 changed files
with
159 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
third_party/rules_jvm_external-toolchains-attribute.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
From 6076dba7ccfe859d65adf8926339e8f31d4fb351 Mon Sep 17 00:00:00 2001 | ||
From: Fabian Meumertzheim <[email protected]> | ||
Date: Wed, 20 Sep 2023 13:40:24 +0200 | ||
Subject: [PATCH 2/2] java_export: Fix Make variable substitution | ||
|
||
This requires forwarding `toolchains` to all rules as well as evaluating | ||
Make variables for dependency coordinates in `pom_file`. | ||
--- | ||
private/rules/java_export.bzl | 10 +++++++++- | ||
private/rules/pom_file.bzl | 6 +++++- | ||
2 files changed, 14 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/private/rules/java_export.bzl b/private/rules/java_export.bzl | ||
index 81138db1..51618e82 100644 | ||
--- a/private/rules/java_export.bzl | ||
+++ b/private/rules/java_export.bzl | ||
@@ -84,6 +84,7 @@ def java_export( | ||
javadocopts = kwargs.pop("javadocopts", []) | ||
doc_deps = kwargs.pop("doc_deps", []) | ||
doc_url = kwargs.pop("doc_url", "") | ||
+ toolchains = kwargs.pop("toolchains", []) | ||
|
||
# Construct the java_library we'll export from here. | ||
native.java_library( | ||
@@ -108,6 +109,7 @@ def java_export( | ||
classifier_artifacts = classifier_artifacts, | ||
doc_deps = doc_deps, | ||
doc_url = doc_url, | ||
+ toolchains = toolchains, | ||
) | ||
|
||
def maven_export( | ||
@@ -124,7 +126,8 @@ def maven_export( | ||
classifier_artifacts = {}, | ||
*, | ||
doc_deps = [], | ||
- doc_url = ""): | ||
+ doc_url = "", | ||
+ toolchains = None): | ||
""" | ||
All arguments are the same as java_export with the addition of: | ||
lib_name: Name of the library that has been built. | ||
@@ -210,6 +213,7 @@ def maven_export( | ||
visibility = visibility, | ||
tags = tags + maven_coordinates_tags, | ||
testonly = testonly, | ||
+ toolchains = toolchains, | ||
) | ||
|
||
native.filegroup( | ||
@@ -251,6 +255,7 @@ def maven_export( | ||
visibility = visibility, | ||
tags = tags, | ||
testonly = testonly, | ||
+ toolchains = toolchains, | ||
) | ||
classifier_artifacts.setdefault("javadoc", docs_jar) | ||
|
||
@@ -262,6 +267,7 @@ def maven_export( | ||
visibility = visibility, | ||
tags = tags, | ||
testonly = testonly, | ||
+ toolchains = toolchains, | ||
) | ||
|
||
maven_publish( | ||
@@ -273,6 +279,7 @@ def maven_export( | ||
visibility = visibility, | ||
tags = tags, | ||
testonly = testonly, | ||
+ toolchains = toolchains, | ||
) | ||
|
||
# We may want to aggregate several `java_export` targets into a single Maven BOM POM | ||
@@ -287,6 +294,7 @@ def maven_export( | ||
testonly = testonly, | ||
tags = tags, | ||
visibility = visibility, | ||
+ toolchains = toolchains, | ||
) | ||
|
||
# Finally, alias the primary output | ||
diff --git a/private/rules/pom_file.bzl b/private/rules/pom_file.bzl | ||
index eba5306e..2f8b74b0 100644 | ||
--- a/private/rules/pom_file.bzl | ||
+++ b/private/rules/pom_file.bzl | ||
@@ -15,6 +15,10 @@ def _pom_file_impl(ctx): | ||
for dep in additional_deps: | ||
for coords in dep[MavenInfo].as_maven_dep.to_list(): | ||
all_maven_deps.append(coords) | ||
+ expanded_maven_deps = [ | ||
+ ctx.expand_make_variables("additional_deps", coords, ctx.var) | ||
+ for coords in all_maven_deps | ||
+ ] | ||
|
||
# Expand maven coordinates for any variables to be replaced. | ||
coordinates = ctx.expand_make_variables("coordinates", info.coordinates, ctx.var) | ||
@@ -22,7 +26,7 @@ def _pom_file_impl(ctx): | ||
out = generate_pom( | ||
ctx, | ||
coordinates = coordinates, | ||
- versioned_dep_coordinates = sorted(all_maven_deps), | ||
+ versioned_dep_coordinates = sorted(expanded_maven_deps), | ||
pom_template = ctx.file.pom_template, | ||
out_name = "%s.xml" % ctx.label.name, | ||
) |