BUCK2 import Maven dependencies
Meta's BUCK2 doesn't yet have Java and Android support (see github issue 394 ), however, it's useful to have a script to autogenerate remote_file and prebuilt_jar rules from Maven coordinates, if the code did work. If you're trying to get BUCK2 to compile Java, save yourself the trouble just yet and use Bazel - it should work for you. That said, here's a quick attempt at a script to import maven jars for BUCK. If it's useful to you, feel free to use. #!/usr/bin/env bash # # Import a Maven dependency based on the coordinates. # # # Print debug log # set -x # Exit on error set -e if [[ $# != 1 ]]; then echo Usage: $0 com.pinterest.optimus:library:version echo echo Imports the given Maven target into a BUCK file in third_party/ exit 1 fi # Change to third-party directory cd `dirname $0` MVN_COORDS=$1 GROUP_ID=$(echo $MVN_COORDS | cut -f 1 -d:) ARTIFACT_ID=$(echo $MVN_COORDS | cut -f 2 -d:) VERSION=$(echo $MVN_COORDS | cut -f 3 -d:) MAVEN_CENTRAL_UR...