Teach Gradle how to download "/tmp/DroidBench" when needed
One less thing for developers to have to remember to do manually!
This commit is contained in:
parent
75270b18ca
commit
a32a3e3191
|
@ -9,10 +9,7 @@ addons:
|
|||
packages:
|
||||
- realpath
|
||||
- xvfb
|
||||
before_install:
|
||||
- echo $ANDROID_HOME
|
||||
- git clone --depth=1 https://github.com/secure-software-engineering/DroidBench.git /tmp/DroidBench
|
||||
- source "travis/before-install-$BUILD_SYSTEM"
|
||||
before_install: source "travis/before-install-$BUILD_SYSTEM"
|
||||
install: source "travis/install-$BUILD_SYSTEM"
|
||||
script: source "travis/script-$BUILD_SYSTEM"
|
||||
before_cache: source "travis/before-cache-$BUILD_SYSTEM"
|
||||
|
|
|
@ -18,3 +18,22 @@ dependencies {
|
|||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
}
|
||||
|
||||
task cloneDroidBench(type: Exec) {
|
||||
// TODO: download to somewhere private to this build tree; update code that looks in "/tmp" accordingly
|
||||
def destDir = '/tmp/DroidBench'
|
||||
inputs.property('repository', 'https://github.com/secure-software-engineering/DroidBench.git')
|
||||
outputs.dirs destDir
|
||||
doFirst { delete destDir }
|
||||
commandLine 'git', 'clone', '--depth=1', inputs.properties.repository, destDir
|
||||
// TODO: should check out a specific tag or hash
|
||||
}
|
||||
|
||||
processTestResources {
|
||||
dependsOn cloneDroidBench
|
||||
|
||||
def testdata = project(':com.ibm.wala.core.testdata')
|
||||
dependsOn testdata.verifyJavaCup
|
||||
from testdata.collectJLex
|
||||
from testdata.downloadJavaCup
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# -*- mode: sh; sh-shell: sh -*-
|
||||
|
||||
git clone --depth=1 https://github.com/secure-software-engineering/DroidBench.git /tmp/DroidBench
|
||||
|
||||
export M2_HOME=$HOME/apache-maven-3.5.0
|
||||
|
||||
if [ ! -d $M2_HOME/bin ]; then
|
||||
|
|
Loading…
Reference in New Issue