1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 03:57:50 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-11 14:02:47 +02:00
parent 8735fe4177
commit 2c3accf4e8
10 changed files with 526 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
bash "$ROOT/scripts/ensure-gradle-wrapper.sh"
export ANDROIDCAST_ROOT="$ROOT"
export ANDROIDCAST_CCACHE="${ANDROIDCAST_CCACHE:-1}"
export ANDROIDCAST_USE_DISTCC="${ANDROIDCAST_USE_DISTCC:-0}"

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Ensure gradle/wrapper/* exists (often missing when .gitignore hid gradle/ or after git clean).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
JAR="$ROOT/gradle/wrapper/gradle-wrapper.jar"
PROPS="$ROOT/gradle/wrapper/gradle-wrapper.properties"
if [[ -f "$JAR" && -f "$PROPS" ]]; then
exit 0
fi
echo "ERROR: Gradle wrapper missing at gradle/wrapper/" >&2
echo " expected: gradle-wrapper.jar + gradle-wrapper.properties" >&2
echo " fix: cd \"$ROOT\" && gradle wrapper --gradle-version 8.9" >&2
echo " note: .gitignore must NOT ignore gradle/wrapper/ (see repo .gitignore)" >&2
exit 1

34
scripts/verify-gitignore.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Quick check that paths required for ./rebuild.sh are not gitignored.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
required=(
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.properties
gradle/wireguard-tunnel/build.gradle
gradlew
third-party/README.md
)
fail=0
for path in "${required[@]}"; do
if [[ ! -e "$path" ]]; then
echo "MISSING on disk: $path" >&2
fail=1
continue
fi
if git check-ignore -q "$path" 2>/dev/null; then
echo "GITIGNORE BLOCKS: $path" >&2
fail=1
else
echo "OK: $path"
fi
done
if [[ "$fail" -ne 0 ]]; then
echo "fix .gitignore — see header comments in .gitignore" >&2
exit 1
fi
echo "verify-gitignore: all required paths visible to git"