Developer guide¶
Set up a checkout¶
Use Maven and JDK 8+ for SDK development. The SDK targets Java 8; on newer JDKs the build validates the Java 8 API surface. Use JDK 17 for full Javadoc generation.
Format and test¶
bash lint.sh # applies google-java-format to SDK and test sources
mvn clean test
mvn install -DskipTests -Dgpg.skip=true -Dmaven.javadoc.skip=true
mvn -f examples/pom.xml clean test
The full SDK suite includes Qwen tokenizer tests. To run them offline, provision the vocabulary before mvn clean test and point DASHSCOPE_QWEN_VOCAB at it. See tokenization.
Install the SDK from the same checkout before testing the separately built examples. See examples for individual commands and dry-run boundaries.
Preview the docs¶
python3 -m venv .venv-docs
source .venv-docs/bin/activate
python -m pip install -r requirements-doc.txt
python -m mkdocs build --strict
JDK17=/path/to/jdk17 bash docs/serve.sh # preview with generated Javadoc
Update English and Simplified Chinese together. See the maintenance guide and shared site template.