Skip to content

Commit e2fdea2

Browse files
committed
move android dev commands under root dev.yml
1 parent 231a7a1 commit e2fdea2

2 files changed

Lines changed: 77 additions & 60 deletions

File tree

android/dev.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

dev.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,26 @@ name: checkout-kit
33
up:
44
- packages:
55
- quicktype
6+
- rover
67
- ruby
78
- custom:
89
name: Install bundle packages
910
met?: BUNDLE_GEMFILE=swift/Gemfile bundle check
1011
meet: BUNDLE_GEMFILE=swift/Gemfile bundle install
12+
# Android
13+
- custom:
14+
name: Ensure Android sample app .env files exist
15+
met?: |
16+
([ -f "./android/samples/MobileBuyIntegration/.env" ] || exit 1)
17+
meet: cd android && ./scripts/setup_env.sh
18+
19+
open:
20+
"GitHub": "https://github.com/Shopify/checkout-kit"
21+
"Issues": "https://github.com/Shopify/checkout-kit/issues"
22+
"PRs": "https://github.com/Shopify/checkout-kit/pulls"
1123

1224
commands:
25+
# Repo-wide
1326
codegen:
1427
desc: "Generate UCP models. Usage: dev codegen <kotlin|swift>"
1528
syntax: "<kotlin|swift>"
@@ -38,3 +51,67 @@ commands:
3851
swift) shift; cd swift && ./Scripts/apollo_codegen "$@" ;;
3952
*) echo "Usage: dev apollo codegen <android|swift> [accelerated|mobile-buy|all]"; exit 1 ;;
4053
esac
54+
55+
# Android
56+
android:
57+
desc: "Android Checkout Kit commands"
58+
subcommands:
59+
build:
60+
desc: Build the library
61+
run: cd android && ./gradlew :lib:build
62+
subcommands:
63+
samples:
64+
desc: Build all sample applications
65+
run: cd android/samples/MobileBuyIntegration && ./gradlew build
66+
67+
test:
68+
desc: Run all tests with clean build
69+
run: cd android && ./gradlew clean test --console=plain
70+
subcommands:
71+
specific:
72+
desc: Run specific test class
73+
syntax: <TestClassName> (e.g. CheckoutBridgeTest)
74+
run: cd android && ./gradlew :lib:testDebugUnitTest --tests "$1"
75+
76+
style:
77+
desc: Run code formatting and linting
78+
aliases: [lint]
79+
run: cd android && ./gradlew detekt lintRelease
80+
81+
fix:
82+
desc: Automatically fix format and lint issues where possible
83+
run: cd android && ./gradlew detekt --auto-correct
84+
85+
api:
86+
desc: Validate or update the public API baseline (lib/api/lib.api)
87+
run: |
88+
echo "Usage: dev android api {check|dump}"
89+
echo ""
90+
echo " check Verify public API matches the committed baseline"
91+
echo " dump Regenerate the baseline after intentional public API changes"
92+
subcommands:
93+
check:
94+
desc: Verify public API matches the committed baseline
95+
run: cd android && ./gradlew :lib:apiCheck
96+
dump:
97+
desc: Regenerate the baseline after intentional public API changes
98+
run: cd android && ./gradlew :lib:apiDump
99+
100+
check:
101+
desc: Run all Android checks (license headers, detekt, android lint)
102+
run: |
103+
set -e
104+
cd android
105+
./scripts/check_license_headers.rb
106+
./gradlew detekt
107+
./gradlew lintRelease
108+
subcommands:
109+
license-headers:
110+
desc: Check MIT license headers in source files
111+
run: cd android && ./scripts/check_license_headers.rb
112+
detekt:
113+
desc: Run detekt static analysis
114+
run: cd android && ./gradlew detekt
115+
android-lint:
116+
desc: Run Android lint
117+
run: cd android && ./gradlew lintRelease

0 commit comments

Comments
 (0)