about summary refs log tree commit diff
path: root/nix/buildBazelPackageNG/bazelRulesJavaHook/setup-hook.sh
blob: f7f7e3afe5bf8c6f5d390210ffdf0889212b7406 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
prePatchHooks+=(_setupLocalJavaRepo)

javaVersions=(11 17 21)
javaPlatforms=(
  "linux" "linux_aarch64" "linux_ppc64le" "linux_s390x"
  "macos" "macos_aarch64"
  "win" "win_arm64")

_setupLocalJavaRepo() {
	for javaVersion in ${javaVersions[@]}; do
		for javaPlatform in ${javaPlatforms[@]}; do
			bazelFlagsArray+=(
				"--override_repository=remotejdk${javaVersion}_${javaPlatform}=@local_java@"
			)
		done
	done
}