一键导入
using-gradle
Use this skill when you need to build the project, compile code, or run tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill when you need to build the project, compile code, or run tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | using-gradle |
| description | Use this skill when you need to build the project, compile code, or run tests. |
./gradlew build # full build
./gradlew package # build + generate protobuf sources (required before first compile)
./gradlew clean # clean build artifacts
./gradlew -PspotbugsEnableHtmlReport check # all checks including SpotBugs and Checkstyle
Compile a single module without running tests:
./gradlew :fdb-relational-core:compileJava
./gradlew :fdb-record-layer-core:compileJava
| Task | What it runs |
|---|---|
test | Unit + integration tests, excluding WipesFDB and AutomatedTest tags |
quickTest | Like test but faster (excludes WipesFDB) |
destructiveTest | Tests tagged WipesFDB — wipes FDB data, single fork |
performanceTest | Tests tagged Performance, assertions disabled |
rpcTest | Tests via embedded RPC server rather than embedded connection |
mixedModeTest | Tests tagged MixedMode (requires external server JARs) |
singleVersionTest | Tests against a single external server version |
Run a specific test class or method in a module:
./gradlew :fdb-relational-core:test --tests 'com.apple.foundationdb.relational.recordlayer.EmbeddedRelationalStatementTest'
./gradlew :fdb-relational-core:test --tests 'com.apple.foundationdb.relational.recordlayer.EmbeddedRelationalStatementTest.testGet'
./gradlew :yaml-tests:test # run all yaml integration tests
./gradlew :yaml-tests:test --tests 'YamlIntegrationTests.myTestName'
Custom seed and iteration count (for reproducing flaky yaml tests):
./gradlew :yaml-tests:test -Ptests.yaml.seed=12345 -Ptests.yaml.iterations=10
Tests that hit FDB require a running FoundationDB cluster and fdb-environment.yaml in the
repo root.
Example fdb-environment.yaml:
libraryPath: /usr/local/lib/libfdb_c.dylib
clusterFiles:
- /usr/local/etc/foundationdb/fdb.cluster
./gradlew publishToMavenLocal -PpublishBuild=true
Jars land in ~/.m2/repository/org/foundationdb/.
./gradlew :fdb-relational-core:jmh
Benchmark sources live in fdb-relational-core/src/jmh/java/. The active benchmarks are
controlled by the includes list in the jmh {} block of fdb-relational-core.gradle.
Useful JMH options (pass as Gradle properties or edit the block):
./gradlew :fdb-relational-core:jmh -Pjmh.include=DirectAccessVsQueryBenchmark
Write or update documentation in docs/sphinx/source/. Applies the appropriate style for user-facing vs. architecture docs.
Standards for writing tests in fdb-record-layer. Apply when writing or reviewing test code.
Code review the current branch for adherence to project standards, correctness, and best practices.
Simplifies and refines recently modified code for clarity, consistency, and maintainability while preserving all functionality.
Rebuild working context after a session restart. Reads branch state, recent commits, open PRs, and changed files to produce a "what was I doing" summary.
Coding standards for all Java code in fdb-record-layer. Apply when writing or reviewing any Java code.