-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
40 lines (34 loc) · 867 Bytes
/
build.gradle.kts
File metadata and controls
40 lines (34 loc) · 867 Bytes
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
plugins {
base
id("com.lovelysystems.gradle") version ("0.0.7")
}
lovely {
gitProject()
dockerProject("ghcr.io/lovelysystems/docker-pilbox")
with(dockerFiles) {
from("requirements.txt")
}
}
val envDir = project.file("v")
val binDir = envDir.resolve("bin")
val pip = binDir.resolve("pip")
val python = binDir.resolve("python")
tasks {
val venv by creating {
group = "Bootstrap"
description = "Bootstraps a python virtual environment"
outputs.files(pip, python)
doLast {
exec {
commandLine("python3", "-m", "venv", "--clear", envDir)
}
exec {
commandLine(
pip, "install", "--upgrade",
"pip==18.0",
"pip-tools==2.0.2"
)
}
}
}
}