Skip to content

Commit

Permalink
Try a download type and using buildDir
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed Aug 29, 2024
1 parent 6fa44fb commit e19b3cc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions domains/zeto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,9 @@ task circuitsInstall(type: Exec) {
outputs.dir("node_modules")
}

task installCircom(type: Exec) {
def url = "https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64"
def f = new File(File.getTempDirectory(), "circom")
if (!f.exists()) {
new URL(url).withInputStream{ i -> f.withOutputStream{ it << i }}
f.setExecutable(true)
}
environment 'PATH', "${environment.PATH}:${f}"
task installCircom(type: Download) {
src "https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64"
dest new File(buildDir, "circom")
}

task circuitsGen(type: Exec, dependsOn: [circuitsInstall, installCircom]) {
Expand All @@ -87,6 +82,7 @@ task circuitsGen(type: Exec, dependsOn: [circuitsInstall, installCircom]) {
args '--', '-c', 'anon'
workingDir "${rootDir}/zeto/zkp/circuits"

environment 'PATH', "${environment.PATH}:${buildDir}/circom"
environment "CIRCUITS_ROOT", zkpOut
environment "PROVING_KEYS_ROOT", zkpOut
environment "PTAU_DOWNLOAD_PATH", zkpOut
Expand Down

0 comments on commit e19b3cc

Please sign in to comment.