Files
picar/pycar/build.gradle
Piv 622ed0911e Add some readme files, start fixing docker build.
Docker (and CI in general) build currently isn't generating protobuf files.
Docker image also needs to check that pigpio works.
2020-08-30 15:16:15 +09:30

34 lines
848 B
Groovy

configurations {
python {
canBeResolved = true
canBeConsumed = false
}
}
dependencies {
python project(path: ':protobuf', configuration: 'python')
}
task copyPythonCode(type: Copy, dependsOn: configurations.python){
// Copy python protobuf code from proto project.
from zipTree(configurations.python.asPath)
into 'src'
}
task build(type: Exec, dependsOn: copyPythonCode) {
executable 'python3'
args 'setup.py', 'bdist_wheel'
}
task buildDocker(type: Exec, dependsOn: copyPythonCode) {
executable 'docker'
workingDir projectDir
args 'build', '--build-arg', "PYPI_USERNAME=$System.env.PYPI_USERNAME", '--build-arg', "PYPI_PASSWORD=$System.env.PYPI_PASSWORD", '-t', 'vato.ddns.net:8082/pycar:latest', '.'
}
task clean {
doLast {
delete 'dist'
delete 'build'
}
}