Files
Ulf Wiger 53eaa3056a Add ASN.1-to-Java codegen and RLP codec for spend/signed tx subset.
Generate typed records from GajumaruChainObjects.asn, implement Asn1Rlp
and BasicEncoders matching Erlang static serialization, and add golden-vector
equivalence tests against gmser_chain_objects output.
2026-07-22 11:31:15 +02:00

33 lines
1023 B
Bash
Executable File

#! /usr/bin/env bash
# Copyright (c) 2026 QPQ AG <info@qpq.swiss>. All rights reserved.
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-QPQ-Commercial
set -e
abs_dir="$(cd -P $(dirname ${BASH_SOURCE}) && pwd)"
project_dir="$(dirname $abs_dir)"
# Prefer Homebrew OpenJDK when /usr/bin/java is a macOS stub.
if [[ -x /opt/homebrew/opt/openjdk/bin/javac ]]; then
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
elif [[ -x /opt/homebrew/opt/openjdk@25/bin/javac ]]; then
export PATH="/opt/homebrew/opt/openjdk@25/bin:$PATH"
elif [[ -x /opt/homebrew/opt/openjdk@21/bin/javac ]]; then
export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"
fi
# Clean
rm -rf "$project_dir/build/classes/*"
rm -f "$project_dir/Testinator.class"
# Build every .java file
find "$project_dir/src/main/java" -name "*.java" | xargs javac \
--release 21 \
-d "$project_dir/build/classes"
# Build the Testinator thingy
javac -cp "build/classes" -d build src/Testinator.java
echo "Bytecode in $project_dir/build/classes/"