|
1 | | -# Copyright 2018 Google LLC |
| 1 | +# Copyright 2026 Google LLC |
2 | 2 | # |
3 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | # you may not use this file except in compliance with the License. |
5 | 5 | # You may obtain a copy of the License at |
6 | 6 | # |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
8 | 8 | # |
9 | 9 | # Unless required by applicable law or agreed to in writing, software |
10 | 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -"""This script is used to synthesize generated parts of this library.""" |
16 | | - |
17 | | -import os |
18 | 15 | import synthtool as s |
19 | | -import synthtool.languages.java as java |
| 16 | +from synthtool.languages import java |
20 | 17 |
|
| 18 | +'This script is used to synthesize generated parts of this library.' |
| 19 | +import os |
21 | 20 |
|
22 | 21 | for library in s.get_staging_dirs(): |
23 | | - # put any special-case replacements here |
24 | | - if os.path.exists("owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json"): |
25 | | - os.remove("owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json") |
26 | | - s.move(library) |
27 | | - |
| 22 | + # put any special-case replacements here |
| 23 | + if os.path.exists('owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json'): |
| 24 | + os.remove('owl-bot-staging/v2/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/gapic_metadata.json') |
| 25 | + s.move(library) |
28 | 26 | s.remove_staging_dirs() |
29 | | - |
30 | | -java.common_templates(excludes=[ |
31 | | - '.kokoro/nightly/integration.cfg', |
32 | | - '.kokoro/nightly/java11-integration.cfg', |
33 | | - '.kokoro/nightly/samples.cfg', |
34 | | - '.kokoro/presubmit/integration.cfg', |
35 | | - '.kokoro/presubmit/samples.cfg', |
36 | | - '.kokoro/presubmit/graalvm-native.cfg', |
37 | | - '.kokoro/presubmit/graalvm-native-17.cfg', |
38 | | - '.kokoro/requirements.in', |
39 | | - '.kokoro/requirements.txt', |
40 | | - '.github/trusted-contribution.yml', |
41 | | - '.github/workflows/auto-release.yaml', |
42 | | - 'CONTRIBUTING.md', |
43 | | - 'renovate.json' |
| 27 | +java.common_templates(monorepo=True, excludes=[ |
| 28 | + ".github/*", |
| 29 | + ".kokoro/*", |
| 30 | + "samples/*", |
| 31 | + "CODE_OF_CONDUCT.md", |
| 32 | + "CONTRIBUTING.md", |
| 33 | + "LICENSE", |
| 34 | + "SECURITY.md", |
| 35 | + "java.header", |
| 36 | + "license-checks.xml", |
| 37 | + "renovate.json", |
| 38 | + ".gitignore" |
44 | 39 | ]) |
0 commit comments