Coverage for /home/runner/work/coxbuild/coxbuild/src/coxbuild/extensions/gradle/__init__.py: 0%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from pathlib import Path
3import coxbuild
4from coxbuild.configurations import Configuration
5from coxbuild.schema import group, run, task
7from .. import ProjectSettings, withProject
9grouped = group("gradle")
12@grouped
13@withProject
14@task
15def build(path: Path | None = None, *, project: ProjectSettings):
16 run(["gradle", "build"], cwd=path or project.src)
19@grouped
20@withProject
21@task
22def test(path: Path | None = None, *, project: ProjectSettings):
23 run(["gradle", "test"], cwd=path or project.test)