Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ucloud
ucloud-sdk-java
Repository navigation
Code
Issues
1
(1)
Pull requests
12
(12)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
ucloud-sdk-java
/
Makefile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
49 lines (41 loc) · 1.79 KB
master
Breadcrumbs
ucloud-sdk-java
/
Makefile
Copy path
Top
File metadata and controls
Code
Blame
49 lines (41 loc) · 1.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
JAVA_FILES=$$(find ./ -name "*.java")
.PHONY: help
help:
@echo "build 制品构建脚"
@echo "test-cov 单元测试覆盖率基线"
@echo "fmt 格式化"
.PHONY: build
build:
mvn clean package -DskipTests=true
.PHONY: fmt
fmt:
google-java-format --aosp -r ${JAVA_FILES}
# CI 语法闸。只保两件事,都由 mvn compile 一次覆盖全部产品 module:
# G1 生成的代码能被编译 —— 编译不过直接失败。
# G2 生成的代码没有重复项 —— 重复方法、重复 <module> 都是编译期错误,天然被抓住。
# 已知缺口(如实记录,不要以为这条闸是全的):
# 重复的 <dependency> 在 maven 里只有 WARNING、不会让构建失败,本 target 对它无闸。
# 要补需引入 maven-enforcer-plugin 的 banDuplicatePomDependencyVersions,
# 经评估后决定不引入,故该缺口保留。
#
# 编译命令包了一层 scripts/mvn-compile.sh:它只在「依赖解析失败」时重试,
# 编译错误立刻失败。起因是 codegen PR #180 被一次拉不到发布插件的网络抖动打红,
# 那既不是代码问题也不是闸误判,却会让那一轮发布退回人工。详见脚本文件头。
.PHONY: ci-syntax
ci-syntax:
@bash $(CURDIR)/scripts/mvn-compile.sh
# 警告:当前是空壳,exit 0 但什么都没检查,不要把它的通过当成风格已过检。
# 填实需要先跑一次全仓 google-java-format(见 fmt),是个独立的大 diff,不在 CI 改造范围内。
.PHONY: lint
lint:
echo "skipped"
.PHONY: test-cov
test-cov:
mvn test
.PHONY: dev
dev:
mkdir -p cache
curl -sLo ./cache/google-java-format-1.7-all-deps.jar https://github.com/google/google-java-format/releases/download/google-java-format-1.7/google-java-format-1.7-all-deps.jar
.PHONY: install
install:
mvn clean install -DskipTests=true
You can’t perform that action at this time.