Skip to content

Commit 36a183b

Browse files
committed
Add plugin
1 parent 3c8f677 commit 36a183b

4 files changed

Lines changed: 142 additions & 2 deletions

File tree

.changepacks/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
]
1010
},
1111
"publish": {
12-
"java": "./gradlew publishToMavenCentral --stacktrace"
12+
"java": "./gradlew publishToMavenCentral --stacktrace",
13+
"libs/vespera-bridge-gradle-plugin/build.gradle.kts": "./gradlew publishToMavenCentral publishPlugins --stacktrace"
1314
}
1415
}

.github/workflows/CI.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ jobs:
6969
changepacks:
7070
name: changepacks
7171
runs-on: ubuntu-latest
72-
needs: test
72+
# jni-e2e gates publishing: a release must never ship with a broken
73+
# JNI dispatch path on any supported OS.
74+
needs: [test, jni-e2e]
7375
permissions:
7476
# create pull request comments
7577
pull-requests: write
@@ -106,6 +108,10 @@ jobs:
106108
# GPG signing (in-memory key, no keyring file)
107109
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
108110
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
111+
# Gradle Plugin Portal credentials (read natively by
112+
# com.gradle.plugin-publish for the `publishPlugins` task)
113+
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
114+
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
109115
outputs:
110116
changepacks: ${{ steps.changepacks.outputs.changepacks }}
111117
release_assets_urls: ${{ steps.changepacks.outputs.release_assets_urls }}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
import { Box, Flex, Text, VStack } from '@devup-ui/react'
2+
import Link from 'next/link'
3+
4+
interface Stat {
5+
value: string
6+
unit: string
7+
label: string
8+
detail: string
9+
}
10+
11+
const STATS: Stat[] = [
12+
{
13+
value: '2.2',
14+
unit: 'µs',
15+
label: 'Direct JNI dispatch',
16+
detail: 'Per round-trip via pooled direct ByteBuffers',
17+
},
18+
{
19+
value: '2.9',
20+
unit: 'µs',
21+
label: 'Sync dispatch',
22+
detail: 'Length-prefixed binary wire, no JSON envelope',
23+
},
24+
{
25+
value: '14.5',
26+
unit: 'GB/s',
27+
label: 'Streaming throughput',
28+
detail: '256 KiB chunks, 3.3× faster than v0.x',
29+
},
30+
{
31+
value: '32',
32+
unit: '%',
33+
label: 'Async dispatch',
34+
detail: 'Daemon-attached completion + JMethodID caching',
35+
},
36+
]
37+
38+
export function Performance() {
39+
return (
40+
<Flex
41+
bg="$containerBackground"
42+
flexDir="column"
43+
overflow="hidden"
44+
px="20px"
45+
py="$spacingSpacing80"
46+
>
47+
<VStack
48+
alignSelf="center"
49+
gap="40px"
50+
maxW="1280px"
51+
w="100%"
52+
>
53+
<VStack gap="16px">
54+
<Text color="$title" typography="h3">
55+
Microsecond dispatch, gigabyte/s streaming
56+
</Text>
57+
<Text color="$text" typography="body">
58+
Vespera embeds your Axum router inside the JVM via JNI — zero TCP, zero
59+
JSON envelope, raw bytes end-to-end. Numbers below are measured through the
60+
real JNI boundary on AMD Ryzen 9 9950X, JDK 21.
61+
</Text>
62+
</VStack>
63+
64+
<Flex
65+
flexDir={['column', null, null, 'row']}
66+
gap={['$spacingSpacing12', null, null, '$spacingSpacing20']}
67+
w="100%"
68+
>
69+
{STATS.map((stat) => (
70+
<VStack
71+
key={stat.label}
72+
bg="$cardBase"
73+
borderRadius="$spacingSpacing08"
74+
flex="1"
75+
gap={['$spacingSpacing08', null, null, '$spacingSpacing12']}
76+
minH={['unset', null, null, '180px']}
77+
px={['$spacingSpacing20', null, null, '$spacingSpacing24']}
78+
py={['$spacingSpacing16', null, null, '$spacingSpacing24']}
79+
>
80+
<Flex alignItems="baseline" gap="$spacingSpacing04">
81+
<Text
82+
color="$vesperaPrimary"
83+
typography="displaySm"
84+
>
85+
{stat.value}
86+
</Text>
87+
<Text color="$vesperaPrimary" typography="h4">
88+
{stat.unit}
89+
</Text>
90+
</Flex>
91+
<Text color="$title" typography="titleB">
92+
{stat.label}
93+
</Text>
94+
<Text color="$textSub" typography="bodySm">
95+
{stat.detail}
96+
</Text>
97+
</VStack>
98+
))}
99+
</Flex>
100+
101+
<Text color="$caption" typography="caption">
102+
Measured in-process on a 1 MiB binary wire round-trip; streaming throughput
103+
measured with a 64 MiB payload. Full methodology and raw runs in the{' '}
104+
<Box
105+
as={Link}
106+
color="$vesperaPrimary"
107+
href="https://github.com/dev-five-git/vespera/blob/main/libs/vespera-bridge/docs/jni-before-after-2026-06-11.md"
108+
rel="noopener noreferrer"
109+
target="_blank"
110+
textDecoration="underline"
111+
>
112+
JNI benchmark report
113+
</Box>
114+
.
115+
</Text>
116+
</VStack>
117+
</Flex>
118+
)
119+
}

libs/vespera-bridge-gradle-plugin/build.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import com.vanniktech.maven.publish.GradlePublishPlugin
2+
13
plugins {
24
`java-gradle-plugin`
35
`kotlin-dsl`
46
id("com.vanniktech.maven.publish") version "0.36.0"
7+
// Gradle Plugin Portal publishing (`publishPlugins` task). Credentials
8+
// come from GRADLE_PUBLISH_KEY / GRADLE_PUBLISH_SECRET env vars in CI.
9+
id("com.gradle.plugin-publish") version "2.1.1"
510
}
611

712
group = "kr.devfive"
@@ -23,6 +28,10 @@ repositories {
2328
}
2429

2530
gradlePlugin {
31+
// Required by the Plugin Portal (`com.gradle.plugin-publish`).
32+
website.set("https://github.com/dev-five-git/vespera")
33+
vcsUrl.set("https://github.com/dev-five-git/vespera.git")
34+
2635
plugins {
2736
create("vesperaBridge") {
2837
id = "kr.devfive.vespera-bridge"
@@ -49,6 +58,11 @@ mavenPublishing {
4958
publishToMavenCentral(automaticRelease = true)
5059
if (shouldSign) signAllPublications()
5160

61+
// `com.gradle.plugin-publish` owns the sources/javadoc jars in this
62+
// setup — vanniktech docs mandate GradlePublishPlugin (not GradlePlugin)
63+
// when both plugins are applied, to avoid duplicate jar registration.
64+
configure(GradlePublishPlugin())
65+
5266
coordinates(
5367
groupId = "kr.devfive",
5468
artifactId = "vespera-bridge-gradle-plugin",

0 commit comments

Comments
 (0)