Commit 3ada93c
authored
[infra] support local dev-channel uploads (#8949)
Adds support for local `dev` channel builds and deployments to the
JetBrains Marketplace for `flutter-intellij`, comparable to what we did
for the Dart plugin:
flutter/dart-intellij-third-party#340.
Along the way we found some gradle issues and curl failures and added
safeguards for Gradle Configuration Cache invalidation and more verbose
local diagnostics.
Fixes: #8925
---
### Key Changes
#### 1. Gradle Build & Versioning (`build.gradle.kts`)
- **Dynamic Git Hash Fallback**: Dynamically resolves the Git commit
hash prefix (`git rev-parse --short HEAD`) as part of the `dev` channel
version calculation if the `KOKORO_GIT_COMMIT` environment variable is
absent.
- **Configuration-Cache Safety**: Refactored the `dev`, `release`, and
`singleIdeVersion` project property lookups to use the modern Gradle
`providers.gradleProperty(...)` API. This registers properties as
configuration inputs, ensuring correct cache invalidation when switching
project parameters.
- **Dynamic Version Inspection**: Registered a new, configuration-cache
safe `printVersion` task to easily query the calculated plugin version
from the command line.
- **Robust Catching**: Handled potential compilation/CLI environment
crashes gracefully (e.g., if git is not present or executing outside of
a git clone) with comprehensive code comments.
#### 2. Kokoro Deployment Pipeline (`tool/kokoro/deploy.sh`)
- **Token Injection**: Added support for the `JB_MARKETPLACE_TOKEN`
environment variable to allow local authorization token injection.
- **Visible Debugging**: Removed the `--fail` option and replaced it
with `curl -i` to ensure full JetBrains Marketplace error payloads are
printed directly to standard output on error rather than hidden behind
generic curl exit codes.
- **Robust Zip Path Matching**: Fallback to `flutter-intellij.zip`
automatically if not running inside the Kokoro pipeline directory
structure.
- **Local Setup Quality-of-Life**: Updated `setup.sh` to bypass cloning
the Flutter SDK if `../flutter` is already present locally, making local
pipeline test runs pain-free.
---
### Verification & Testing
#### 1. Version calculation matches local Git state:
```bash
$ ./gradlew printVersion -Pdev
flutterPluginVersion: 93.0.0-dev.20260506-9a1a847
...
> Task :printVersion
93.0.0-dev.20260506-9a1a847
```
**Verified deployment** 👍 :
<img width="2314" height="772" alt="image"
src="https://github.com/user-attachments/assets/0059bb70-31a7-4401-bcd1-20077f56431b"
/>
---
Review the contribution guidelines below:
- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [x] I've included the required information in the description above.
- [x] My up-to-date information is in the `AUTHORS` file.
- [x] I've updated `CHANGELOG.md` if appropriate.
<details>
<summary>Contribution guidelines:</summary><br>
- See
our [contributor guide](../CONTRIBUTING.md) and
the [Flutter organization contributor
guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use
`dart format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best
practices
([discussion](#8098)).
</details>1 parent 3ab1d89 commit 3ada93c
2 files changed
Lines changed: 57 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | | - | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | | - | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
67 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
68 | 85 | | |
69 | 86 | | |
70 | 87 | | |
| |||
305 | 322 | | |
306 | 323 | | |
307 | 324 | | |
308 | | - | |
309 | | - | |
| 325 | + | |
| 326 | + | |
310 | 327 | | |
311 | 328 | | |
312 | 329 | | |
| |||
322 | 339 | | |
323 | 340 | | |
324 | 341 | | |
325 | | - | |
| 342 | + | |
326 | 343 | | |
327 | 344 | | |
328 | 345 | | |
| |||
523 | 540 | | |
524 | 541 | | |
525 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | | - | |
20 | 29 | | |
21 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
27 | 39 | | |
28 | | - | |
| 40 | + | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
| |||
0 commit comments