Instructions that apply only to gemini-cli.
read_file tool:Instructions that are useful for WebRTC development, and not specific to a single agentic tool.
webrtc/src or // for the current workspace (which can be determined by running gclient root and appending /src to the output).autoninja --quiet -C {OUT_DIR} {TARGET}autoninja command that is missing --quiet, add --quiet.Unless otherwise instructed, run tests with: tools/autotest.py --quiet --run-all --no-try-android-wrappers --no-fast-local-dev -C {OUT_DIR} {RELEVANT_TEST_FILENAMES}
When using tools/autotest.py:
autoninja beforehand because autotest.py automatically builds relevant targets.:) are not valid inputs for {RELEVANT_TEST_FILENAMES}.When you have finished validating your changes through other means, run:
git cl format git cl presubmit -u --force
WebRTC on Android uses both Java and C++ frequently. Our JNI uses codegen from //third_party/jni_zero.
Identifying JNI methods:
@CalledByNative are called by C++.@NativeMethods are calls into C++.long and has a prefix of “native”, then it maps to a method of the same name on the C++ class that comes after the “native” prefix. Eg. void foo(long nativeBarImpl) means you need to find BarImpl::Foo in C++.Finding JNI methods:
{JavaClass}.java (where {JavaClass} is taken from the #include "{JavaClass}_jni.h".{JavaClass}_jni.h in C++ files (where {JavaClass} is taken from the .java file name).When making changes to JNI methods, always make changes to both the .java and .cc/.h files involved.