-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
55 lines (45 loc) · 1.07 KB
/
build.gradle
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
// Python build file
// See https://github.com/xvik/gradle-use-python-plugin for an excellent explanation of the basics.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.org.gatored:gatorgradle:+"
}
}
plugins {
id "ru.vyarus.use-python" version "1.2.0"
}
apply plugin: "org.gatored.gatorgradle"
// declare the repositories that are used to meet dependencies
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
python {
// dependencies
pip 'pip:18.0.0'
pip 'flake8:3.5.0'
// pip 'some_module:1.0'
minPythonVersion = "3.6"
// 3.6 is installed on Alden computers
// force no fallback to python2
pythonBinary = "python3"
}
// run task to run python code
task run(type: PythonTask) {
// can also pass arguments, or use array form
command = "src/example.py"
}
task check(type: PythonTask) {
module = "flake8"
// path to check
command = "src"
}
// empty (default) pip install task to set up "gradle build" command as installer
task build(type: PipInstallTask) {
}