Skip to content

Commit 95b685e

Browse files
authored
build: commit a Gradle wrapper for the JetBrains plugin (#61)
* build: commit a Gradle wrapper for the JetBrains plugin Gradle is not installed on the dev machine and never has been on PATH, but `editors/jetbrains/` had no wrapper, so every release that needed `gradle publishPlugin` had to re-acquire Gradle first. That cost time on 0.4.0 and again on 0.5.0, each time looking like the publish was blocked when it was only the launcher that was missing. The wrapper pins 8.12, the version the project has always built with, and fetches it on first use. RELEASING.md and the plugin README now say `./gradlew`, and RELEASING says why a bare `gradle` is the wrong reach. Also records in the ledger that the JetBrains upload waits on moderation, so the plugins API reporting the previous version is not a failed publish. * build: pin the wrapper scripts' line endings A committed `gradlew` with CRLF fails on Linux and macOS with a bad-interpreter error, and the `.bat` wants the reverse. Both are correct in the index today; these rules keep them that way regardless of a contributor's core.autocrlf, and mark the wrapper jar binary so it is never line-ending converted.
1 parent 4165ca5 commit 95b685e

8 files changed

Lines changed: 378 additions & 11 deletions

File tree

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ editors/tree-sitter-pyfun/src/parser.c linguist-generated
33
editors/tree-sitter-pyfun/src/tree_sitter/** linguist-generated
44
editors/zed/grammars/** linguist-vendored
55
editors/zed/*.wasm linguist-generated
6+
7+
# The Gradle wrapper. `gradlew` is a POSIX shell script: committed with CRLF it
8+
# fails on Linux/macOS with a bad-interpreter error, so pin its endings. The
9+
# `.bat` is the reverse, and the jar must never be line-ending converted.
10+
editors/jetbrains/gradlew text eol=lf
11+
editors/jetbrains/gradlew.bat text eol=crlf
12+
editors/jetbrains/gradle/wrapper/gradle-wrapper.jar binary

RELEASING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ that is fine or a broken install. Version numbers are cheap; that doubt is not.
2323
(https://marketplace.visualstudio.com/manage/publishers/pyfun — the CLI auth
2424
path is broken; do not fight it).
2525
- **Open VSX**: `npx ovsx publish <vsix> -p $OPEN_VSX_APIKEY`.
26-
- **JetBrains**: `gradle publishPlugin` (needs `JETBRAINS_PERMANENT_TOKEN`;
27-
JDK 21) — but see the acceptance gate below.
26+
- **JetBrains**: `./gradlew publishPlugin` in `editors/jetbrains/` (needs
27+
`JETBRAINS_PERMANENT_TOKEN` and JDK 21; the wrapper fetches Gradle itself,
28+
so nothing has to be installed) — but see the acceptance gate below. The
29+
upload then waits on JetBrains moderation, so the plugins API keeps
30+
reporting the previous version for a while; that is not a failed publish.
31+
**Use the wrapper, never a bare `gradle`** — Gradle is not installed on the
32+
dev machine, and each release that reached for it lost time rediscovering
33+
that.
2834
4. Verify: `pip install "pyfun-lang[jupyter]==X.Y.Z"` in a clean venv, then
2935
`pip install -U "pyfun-lang[jupyter]"` in the day-to-day Python env so the
3036
Jupyter kernel is not stranded on the previous compiler.

ROADMAP.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,11 @@ registry (PR to zed-industries/extensions), and consider shipping Helix indent/t
334334
32915) is live (`editors/jetbrains/`, thin: file type + TextMate grammar + LSP4IJ wiring, free
335335
mode + legacy CE, 2024.2+). At **0.4.0** (2026-08-02, verified against the plugins API — the
336336
earlier "0.4.0 is not uploaded yet" note was stale, as the "awaiting moderation" one had been
337-
before it; check the API rather than this line). **0.5.0 is owed.** Acceptance is granted, so
338-
nothing gates it but the toolchain: `gradle publishPlugin` needs JDK 21 **and Gradle**, and
339-
Gradle is not installed on the dev machine (there is no wrapper in `editors/jetbrains/`, so
340-
`gradle` must come from PATH). Adding a Gradle wrapper would make this scriptable like Open VSX.
337+
before it; check the API rather than this line). **0.5.0 uploaded 2026-08-02 and is awaiting
338+
moderation** — the API lists approved versions only, so it will read 0.4.0 until that clears.
339+
`editors/jetbrains/` now has a **committed Gradle wrapper**: `./gradlew publishPlugin` (JDK 21 +
340+
`JETBRAINS_PERMANENT_TOKEN`) needs nothing installed, because Gradle is *not* on this machine and
341+
two releases running lost time rediscovering that before reaching for a bare `gradle`.
341342
- **VS Code Marketplace** — accepted and live as `pyfun.pyfun`, at **0.4.0** (2026-08-02, verified
342343
against the gallery API; **0.5.0 is owed** — the vsix is built at
343344
`editors/vscode/pyfun-0.5.0.vsix` and attached to the GitHub release). The **only surface that cannot be scripted**: the vsix is uploaded by

editors/jetbrains/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ installing this plugin auto-installs LSP4IJ as a dependency.
1111

1212
## Build
1313

14-
Requires JDK 21. From this directory:
14+
Requires JDK 21. Gradle itself does not need installing: the committed wrapper
15+
downloads the pinned version on first use. From this directory:
1516

1617
```bash
17-
gradle buildPlugin # -> build/distributions/pyfun-jetbrains-<version>.zip
18-
gradle runIde # launch a sandbox IDE with the plugin for testing
19-
gradle verifyPluginStructure
18+
./gradlew buildPlugin # -> build/distributions/pyfun-jetbrains-<version>.zip
19+
./gradlew runIde # launch a sandbox IDE with the plugin for testing
20+
./gradlew verifyPluginStructure
2021
```
2122

2223
## Publish
@@ -27,4 +28,4 @@ gradle verifyPluginStructure
2728
select the zip, license **Apache-2.0**, category **Programming Language**.
2829
Moderation takes ~1–3 business days.
2930
- **Every later release**: bump `version` in `build.gradle.kts`, then
30-
`JETBRAINS_PERMANENT_TOKEN=<token> gradle publishPlugin`.
31+
`JETBRAINS_PERMANENT_TOKEN=<token> ./gradlew publishPlugin`.
42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

editors/jetbrains/gradlew

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)