Skip to content

Commit

Permalink
[build] check any raw SWIG wrapper files generated by SWIG (#309)
Browse files Browse the repository at this point in the history
To avoid generating raw wrapper files, we perform checks during the
build process to prevent this.
  • Loading branch information
ZhangLe2016 authored Dec 10, 2024
1 parent dfb8c12 commit 5cff6d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/build-commissioner-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ cd ../

rm -rf "$BUILD_DIR"/libs && mkdir -p "$BUILD_DIR"/libs

## Check JNI contains any raw swig wrapper files

if find "$BUILD_DIR"/src/java/io/openthread/commissioner -name "SWIGTYPE_*" -print -quit | grep -q .; then
echo "*********** please check SWIG file \"commissioner.i\" ***********"
echo "Failed to create JAR library due to raw swig wrapper files under $BUILD_DIR/src/java/io/openthread/commissioner"
exit -1
fi

## Create JAR library
javac -source 8 -target 8 "$BUILD_DIR"/src/java/io/openthread/commissioner/*.java

Expand Down

0 comments on commit 5cff6d6

Please sign in to comment.