-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmise.toml
More file actions
125 lines (112 loc) · 6.53 KB
/
Copy pathmise.toml
File metadata and controls
125 lines (112 loc) · 6.53 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Tools every vitre task needs. The JDK the Gradle and ktlint tasks want on a CI runner is in
# mise.ci.toml, which mise merges over this file only when MISE_ENV=ci.
[tools]
node = "24" # Executes generated snapshot/handle JavaScript in the JVM regression suite.
ktlint = "latest"
# The `pre-commit` task shells out to prek, so it is declared here rather than assumed present:
# `mise install` in a fresh clone should be enough to run the hooks.
prek = "latest"
[tasks.wrapper]
description = "Generate the Gradle wrapper at the project root"
run = "gradle wrapper --gradle-version 9.1.0 --distribution-type all"
[tasks.test]
description = "Run the library and sample unit tests"
# The sample is in here for one file: its MCP client is the only thing in the repo that reads what
# the server emits, so its tests are what stops a protocol change from being noticed by nobody.
# `compileAndroidDeviceTest` because nothing else type-checks that source set: `test:android` needs
# hardware and so never runs in CI, and the on-device test is the most fragile file in the repo — it
# subclasses Koog's `Tool` and leans on the dependency exclusions in vitre-koog/build.gradle.kts. A
# Koog bump that breaks it should turn CI red, not wait for somebody to plug in a phone.
run = """
./gradlew \
:vitre-core:allTests \
:vitre-agent:allTests \
:vitre-mcp:allTests \
:vitre-koog:allTests \
:vitre-koog:compileAndroidDeviceTest \
:sample:composeApp:allTests
"""
[tasks."test:live"]
description = "Run the live-LLM Koog test (needs ANTHROPIC_API_KEY)"
# Separate from `test` because it needs a key, a network and a few cents: it is the only test in the
# repo that puts a real model in the loop, which is the only way to check that the tool descriptors
# this module generates are ones a provider accepts and that PageToolDocs actually steers a model.
# It skips itself with a printed note when the key is absent, and CI does not run it — this task is
# how you run it deliberately, after changing the tools, their descriptions or the Koog version.
#
# export ANTHROPIC_API_KEY=... # or: echo 'export ANTHROPIC_API_KEY=...' > .env.local
# mise run test:live # && source .env.local
run = './gradlew :vitre-koog:jvmTest -Pvitre.live --tests "*LiveModelDrivesThePageTest*" --rerun'
[tasks."test:android"]
description = "Run the on-device Koog agent test on a connected device or emulator"
# Separate from `test` because it needs hardware: it is the only test in the repo that drives a real
# WebView, which is the only way to check that the agent tools and the platform actually meet.
run = "./gradlew :vitre-koog:connectedAndroidDeviceTest"
[tasks.build]
description = "Build library artifacts + Android sample APK + iOS debug framework + desktop jar"
# The desktop half is only `jvmJar`, deliberately: `packageDistributionForCurrentOS` would build a
# .dmg/.msi/.deb, which takes minutes and proves nothing this task is for.
run = """
./gradlew \
:vitre-core:assemble \
:vitre-compose:assemble \
:vitre-agent:assemble \
:vitre-mcp:assemble \
:vitre-koog:assemble \
:sample:composeApp:linkDebugFrameworkIosSimulatorArm64 \
:sample:androidApp:assembleDebug \
:sample:desktopApp:jvmJar
"""
[tasks.publish]
description = "Publish the five library modules to Maven Central (CI only — needs credentials and a signing key)"
# One Gradle invocation for all five modules on purpose: the publish plugin funnels every module's
# artifacts into a single Central Portal deployment, so the release is atomic — either all of
# vitre-core, -compose, -agent, -mcp and -koog appear at this version, or none do. Running the task
# per module would stage five separate deployments and a failure halfway through would leave a
# half-published version that Central will not let anyone take back.
#
# `publishAndReleaseToMavenCentral` rather than `publishToMavenCentral` plus
# `mavenCentralAutomaticPublishing=true`: same effect, but the intent is at the call site instead of
# buried in gradle.properties, and the sibling task stays available for a dry run.
#
# No version is passed. VERSION_NAME in gradle.properties is the released version — changing it on
# main is what triggers the workflow that runs this task — so there is nothing to plumb through and
# no second value that could disagree with the committed one.
#
# `--no-configuration-cache` overrides org.gradle.configuration-cache=true from gradle.properties,
# and is not optional: the publish plugin refuses a release outright with "Publishing releases to
# Maven Central is not supported yet with configuration caching enabled", and Gradle cannot store
# the entry anyway — PublishToMavenRepository holds a repository spec it has no way to serialise
# (gradle/gradle#22779). It costs nothing here. Publishing is a cold, once-per-release build on a
# fresh runner, so there is no warm cache entry for it to reuse; every other task in this file keeps
# the cache.
run = "./gradlew publishAndReleaseToMavenCentral --no-configuration-cache"
[tasks."publish:local"]
description = "Publish the library modules to ~/.m2 to try them from another project"
# Signing off. It is on globally because Maven Central rejects an unsigned artifact, and it is not
# waived for the local repo — a bare `publishToMavenLocal` fails with "no configured signatory" on a
# machine without a GPG key, which is most of them. Nothing consumes a ~/.m2 signature, so turning it
# off here costs nothing and keeps this task usable by anyone.
#
# The version is whatever VERSION_NAME says, so between releases this overwrites the ~/.m2 copy of
# the last released version with your working tree. That is usually what you want when you are
# testing a change from another project; pass `-PVERSION_NAME=...` when it is not.
run = "./gradlew publishToMavenLocal -PsignAllPublications=false"
[tasks."android:install"]
description = "Install the sample androidApp on a connected device or running emulator"
run = "./gradlew :sample:androidApp:installDebug"
[tasks.clean]
description = "Clean all Gradle outputs"
run = "./gradlew clean"
[tasks.lint]
description = "Check Kotlin code style with ktlint"
run = 'ktlint "**/*.kt" "**/*.kts" "!**/build/**" "!**/.gradle/**"'
[tasks.fmt]
description = "Auto-format Kotlin code with ktlint"
run = 'ktlint --format "**/*.kt" "**/*.kts" "!**/build/**" "!**/.gradle/**"'
[tasks."fmt:check"]
description = "Check Kotlin formatting without modifying files"
run = 'ktlint "**/*.kt" "**/*.kts" "!**/build/**" "!**/.gradle/**"'
[tasks."pre-commit"]
description = "Run pre-commit checks via prek"
run = "prek run --show-diff-on-failure --color=always --all-files --hook-stage=manual"