Updated documentation to reflect switch to gradle.

This commit is contained in:
Achim D. Brucker 2018-10-27 21:36:03 +01:00
parent cee54c801c
commit 2911969097
1 changed files with 27 additions and 38 deletions

View File

@ -9,34 +9,18 @@
* Eclipse Oxygen, including * Eclipse Oxygen, including
* The Plug-in Development Environment (PDE) * The Plug-in Development Environment (PDE)
* JavaScript Development Tools (JSDT) * JavaScript Development Tools (JSDT)
* Gradle Integration (Buildship)
* [Scala IDE and Scalatest Runner (the latter is optional)](http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site) * [Scala IDE and Scalatest Runner (the latter is optional)](http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site)
* ["Maven for Scala" - Maven Integration for Eclipse](http://alchim31.free.fr/m2e-scala/update-site)
* m2e - Maven Integration for Eclipse
* [CVC3](http://cs.nyu.edu/acsys/cvc3/) including the Java bindings for CVC3 * [CVC3](http://cs.nyu.edu/acsys/cvc3/) including the Java bindings for CVC3
* [apktool](https://ibotpeaches.github.io/Apktool/)
### Checkout ### Checkout
The repository can be cloned as usual: The repository can be cloned as usual:
``` ``` sh
git clone https://git.logicalhacking.com/DASCA/DASCA.git git clone https://git.logicalhacking.com/DASCA/DASCA.git
``` ```
### Resolving external dependencies
* Ensure that the environment variable `ANDROID_HOME` is set correctly and that
the Android SDK has API 19 installed, i.e.,
`${ANDROID_HOME}/platforms/android-19/android.jar` should be a valid path.
* Install ``apktool_2.3.0.jar`` into your local maven repository:
```
cd $(mktemp -d)
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.0.jar
mvn install:install-file -Dfile=apktool_2.3.0.jar -DgroupId=apktool -DartifactId=apktool -Dpackaging=jar -Dversion=2.3.0
```
### WALA configuration ### WALA configuration
DASCA (and the underlying WALA setup) is tested with Java version 8. DASCA (and the underlying WALA setup) is tested with Java version 8.
@ -48,34 +32,39 @@ by analyzing the programs based on a different Java version), you
might need to configure the location of the Java JDK. The JDK used might need to configure the location of the Java JDK. The JDK used
as part of the static analysis is configured in the `wala.properties` as part of the static analysis is configured in the `wala.properties`
file, e.g. file, e.g.
```
``` sh
cd DASCA/ cd DASCA/
echo "java_runtime_dir = <PATH-TO-JDK>" >> externals/WALA/com.ibm.wala.core/dat/wala.properties echo "java_runtime_dir = <PATH-TO-JDK>" >> externals/WALA/com.ibm.wala.core/dat/wala.properties
``` ```
Don't forget to adjust the path to the Java JDK accordingly, i.e., Don't forget to adjust the path to the Java JDK accordingly, i.e.,
the `<PATH-TO-JDK>` should point to the directory containing the file the `<PATH-TO-JDK>` should point to the directory containing the file
`rt.lib`. `rt.lib`.
### How to Compile ### How to Compile
First check that the variable `JAVA_HOME` is configured correctly, e.g.: First check that the variable `JAVA_HOME` is configured correctly, to ensure
``` that Java 8 is used, e.g.:
``` sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
``` ```
Second, resolve the dependencies using maven: The project can be compiled using gradle
```
cd src/com.logicalhacking.dasca.parent/ ``` sh
mvn -P wala clean verify -DskipTests=true ./gradlew clean assemble test
``` ```
After this, all projects can be imported into a fresh Eclipse ### Import into Eclipse
workspace using `File -> Import -> Maven -> Existing Maven Projects`:
1. Select the DASCA `src` folder as source for the import
2. Import all offered projects (WALA and DASCA)
While some WALA projects may contain compilation errors, all DASCA All projects can be imported into a (fresh) Eclipse workspace
projects (i.e., `com.logicalhacking.dasca.*`) should compile without errors. using `File -> Import -> Gradle -> Existing Maven Projects`:
1. Select the DASCA folder as source for the import
2. Import all offered projects
## Team ## Team