Skip to content

Commit 5944127

Browse files
docs(hermetic-build): improve usability of development guide (#12362)
1 parent b2a1e4e commit 5944127

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

sdk-platform-java/hermetic_build/DEVELOPMENT.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,21 @@ python hermetic_build/library_generation/cli/entry_point.py generate \
190190
2. Set the version of gapic-generator-java
191191

192192
```shell
193-
LOCAL_GENERATOR_VERSION=$(mvn \
193+
export LOCAL_GENERATOR_VERSION=$(mvn \
194194
org.apache.maven.plugins:maven-help-plugin:evaluate \
195195
-Dexpression=project.version \
196-
-pl gapic-generator-java \
196+
-pl sdk-platform-java/gapic-generator-java \
197197
-DforceStdout \
198198
-q)
199199
```
200200

201-
3. Run the image
201+
3. Clone the googleapis repository (API definitions)
202+
```shell
203+
cd google-cloud-java
204+
git clone https://github.com/googleapis/googleapis
205+
```
206+
207+
4. Run the image
202208

203209
```shell
204210
# Assume you want to generate the library in the current working directory
@@ -208,13 +214,13 @@ python hermetic_build/library_generation/cli/entry_point.py generate \
208214
--quiet \
209215
-u "$(id -u):$(id -g)" \
210216
-v "$(pwd):/workspace" \
211-
-v /path/to/api-definitions:/workspace/apis \
217+
-v "$(pwd)/googleapis:/googleapis" \
212218
-e GENERATOR_VERSION="${LOCAL_GENERATOR_VERSION}" \
213219
local:image-tag \
214-
--generation-config-path=/workspace/generation_config_file \
215-
--library-names=apigee-connect,asset \
220+
--generation-config-path=/workspace/generation_config.yaml \
221+
--library-names=translate \
216222
--repository-path=/workspace \
217-
--api-definitions-path=/workspace/apis
223+
--api-definitions-path=/googleapis
218224
```
219225

220226
# Debugging tips

0 commit comments

Comments
 (0)