Revert "Build WALA using Gradle instead of Maven" (#298)
This commit is contained in:
parent
8f41069b23
commit
99c2493e37
|
@ -1,6 +0,0 @@
|
|||
((groovy-mode
|
||||
(c-file-style . "bsd")))
|
||||
|
||||
;; Local variables:
|
||||
;; flycheck-disabled-checkers: (emacs-lisp emacs-lisp-checkdoc)
|
||||
;; End:
|
|
@ -4,15 +4,9 @@
|
|||
*.swp
|
||||
*/bin/
|
||||
*/bin/*
|
||||
*/build/
|
||||
*~
|
||||
.classpath
|
||||
.metadata/
|
||||
.project
|
||||
/*/.settings/org.eclipse.buildship.core.prefs
|
||||
/.gradle/
|
||||
/.settings/org.eclipse.buildship.core.prefs
|
||||
/build/
|
||||
com.ibm.wala.cast/lib/
|
||||
com.ibm.wala.cast.java.jdt.test/
|
||||
com.ibm.wala.cast.java.polyglot/lib/
|
||||
com.ibm.wala.cast.java.test.data/src/JLex/
|
||||
|
@ -31,7 +25,6 @@ com.ibm.wala.cast.js.rhino/lib/
|
|||
com.ibm.wala.cast.js.test.data/examples-src/ajaxslt/
|
||||
com.ibm.wala.cast.js.test/examples-src/ajaxslt/
|
||||
com.ibm.wala.cast.js/lib/
|
||||
com.ibm.wala.cast/lib/
|
||||
com.ibm.wala.core.testdata/*.jar
|
||||
com.ibm.wala.core.testdata/@dot/
|
||||
com.ibm.wala.core.testdata/lib/
|
||||
|
@ -41,12 +34,12 @@ com.ibm.wala.core.tests/report
|
|||
com.ibm.wala.core/@dot
|
||||
com.ibm.wala.core/com.ibm.wala.core*.jar
|
||||
com.ibm.wala.core/dat/wala.properties
|
||||
com.ibm.wala.dalvik/src/logback.xml
|
||||
com.ibm.wala.ide.jdt.test/testdata/
|
||||
edu.kit.wala.smali.test/out/
|
||||
target/
|
||||
com.ibm.wala.dalvik.test/data/sample.cup
|
||||
com.ibm.wala.dalvik.test/parser.java
|
||||
com.ibm.wala.dalvik.test/report
|
||||
com.ibm.wala.dalvik.test/sym.java
|
||||
com.ibm.wala.dalvik/src/logback.xml
|
||||
com.ibm.wala.ide.jdt.test/testdata/
|
||||
edu.kit.wala.smali.test/out/
|
||||
results
|
||||
target/
|
||||
|
|
38
.travis.yml
38
.travis.yml
|
@ -1,23 +1,30 @@
|
|||
sudo: false
|
||||
language: android
|
||||
android:
|
||||
components:
|
||||
- build-tools-26.0.2
|
||||
jdk: oraclejdk8
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- realpath
|
||||
- xvfb
|
||||
before_install:
|
||||
- set -e
|
||||
- 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"
|
||||
- echo $ANDROID_HOME
|
||||
- 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 curl https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz | tar zxf - -C $HOME; fi
|
||||
- export PATH=$M2_HOME/bin:$PATH
|
||||
install:
|
||||
- mvn clean verify -DskipTests=true -B -q
|
||||
script:
|
||||
- xvfb-run mvn clean install -B -q
|
||||
- bash ./dependent-projects-trigger.sh $AUTH_TOKEN
|
||||
- mvn javadoc:aggregate -B -q
|
||||
- bash ./upload-javascript.sh $GH_TOKEN
|
||||
- ./build-maven-jars.py "install -Dgpg.skip"
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.goomph"
|
||||
- "$HOME/.gradle/caches"
|
||||
- "$HOME/.gradle/wrapper"
|
||||
- "$HOME/.m2"
|
||||
- "$HOME/apache-maven-3.5.0"
|
||||
- "$TRAVIS_BUILD_DIR/com.ibm.wala.core.testdata/ocaml/ocamljava-2.0-alpha1/lib"
|
||||
|
@ -25,16 +32,3 @@ env:
|
|||
global:
|
||||
- secure: KcugjQYnBqeZ7XenZD5QY7jhekVPO0QpQyjDUteLytaokhyRK2g6eNvr/pPerN2uWUvsPwO18P9F+oOupge1cpPZf4cEY8RzLIromyUoRWd6JA0SKciUYdN2kSqnC4uZSJGXeGLoroyEEL4Q2sqimpkbIGxgxYtVniWgJULOyR4=
|
||||
- secure: jacvGPYX4ugG/HgwJEEpWnllWsS/ipX+qRJ7qM5mbDYryeqsz0eiaxBxQ6IpDyj0v6O4DUi74lSQs/UxCWcUxvOn/5AweCZfoF1U8vt1xivanR4MbC2kr6rJ6ohICuJ4PHDS4IffncgaP3Y8cfExHq6+d0tbibYkjRIiMUGpSik=
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: BUILD_SYSTEM=gradle
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
- os: linux
|
||||
env: BUILD_SYSTEM=maven
|
||||
language: android
|
||||
jdk: oraclejdk8
|
||||
- os: osx
|
||||
env: BUILD_SYSTEM=gradle
|
||||
language: java
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.buildship.core.launch.runconfiguration">
|
||||
<listAttribute key="arguments"/>
|
||||
<booleanAttribute key="build_scans_enabled" value="false"/>
|
||||
<stringAttribute key="gradle_distribution" value="GRADLE_DISTRIBUTION(WRAPPER)"/>
|
||||
<stringAttribute key="gradle_user_home" value=""/>
|
||||
<listAttribute key="jvm_arguments"/>
|
||||
<booleanAttribute key="offline_mode" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="override_workspace_settings" value="false"/>
|
||||
<booleanAttribute key="show_console_view" value="true"/>
|
||||
<booleanAttribute key="show_execution_view" value="true"/>
|
||||
<listAttribute key="tasks">
|
||||
<listEntry value="afterEclipseBuildshipImport"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="working_dir" value="${workspace_loc:/com.ibm.wala}"/>
|
||||
</launchConfiguration>
|
283
README-Gradle.md
283
README-Gradle.md
|
@ -1,283 +0,0 @@
|
|||
This document describes some WALA-specific aspects of our new Gradle
|
||||
build system, plus a few general Gradle features that may be of
|
||||
particular interest to WALA developers. However, it is not a Gradle
|
||||
tutorial.
|
||||
|
||||
# Pros and Cons of Switching to Gradle
|
||||
|
||||
## Selected Gradle Advantages in Brief
|
||||
|
||||
- [more comprehensive management of external
|
||||
dependencies](#comprehensive-external-dependencies)
|
||||
- faster builds using [parallel task
|
||||
execution](https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:parallel_execution)
|
||||
and [user-scoped
|
||||
caching](https://docs.gradle.org/current/userguide/build_cache.html)
|
||||
(both enabled by default)
|
||||
- [trustworthy dependencies for incremental
|
||||
builds](#trustworthy-dependencies-for-incremental-builds)
|
||||
- [composite builds](#composite-builds) for easier integration of WALA
|
||||
into larger projects
|
||||
- [automated Travis CI testing on macOS](#travis-ci-macos)
|
||||
|
||||
## Known Shortcomings
|
||||
|
||||
The Gradle build system is not yet ready to replace Maven, due to a
|
||||
few [known shortcomings](https://github.com/liblit/WALA/milestone/1).
|
||||
Paramount among these is that [Gradle WALA builds do not yet package
|
||||
up Eclipse plug-ins / features in the proper
|
||||
manner](https://github.com/liblit/WALA/issues/6). I have [poked at
|
||||
this a
|
||||
bit](https://github.com/liblit/WALA/tree/gradle-artifact-publishing),
|
||||
but I simply do not understand Eclipse and/or OSGi well enough to get
|
||||
the job done. I welcome help from anyone with the right knowledge!
|
||||
|
||||
Either Gradle or Maven can be used to build WALA from the command
|
||||
line. However, it was not possible to extend this dual-build-system
|
||||
support to Eclipse. Working with WALA in Eclipse *requires* [doing
|
||||
things the Gradle way](#eclipse). Fortunately, this is rather
|
||||
seamless; I see no reason why an Eclipse-using WALA developer should
|
||||
need to avoid this switch.
|
||||
|
||||
As noted [below](#classpath-and-project-as-generated-files), Eclipse
|
||||
`.classpath` and `.project` files are now generated rather than being
|
||||
repository-tracked source files. However, a few Maven-run tests
|
||||
depend on having certain of these files present. One way to create
|
||||
them is to [import WALA into
|
||||
Eclipse](#importing-wala-projects-into-eclipse) before starting your
|
||||
Maven tests. If you prefer a non-interactive approach, you can
|
||||
instead run `./gradlew prepareMavenBuild` before starting your Maven
|
||||
tests.
|
||||
|
||||
# Getting Started
|
||||
|
||||
## External Dependencies: Patience is a Virtue
|
||||
|
||||
Gradle downloads many packages and supporting Java libraries as
|
||||
needed. Your first Gradle build may take a long time. On a fast
|
||||
workstation with a University-grade network and no local caches, my
|
||||
initial run of `./gradlew assemble processTestResources` took five
|
||||
minutes. On a decent laptop with residential DSL and no local caches,
|
||||
the same initial build took twenty minutes. Fortunately, user- and
|
||||
project-level Gradle caches will make incremental rebuilds much
|
||||
faster. Rerunning `./gradlew assemble processTestResources` with a
|
||||
warm cache in an already-built tree takes under three seconds.
|
||||
|
||||
Maven is the same, really. You may already have most of what Maven
|
||||
needs downloaded and cached locally, but your first Maven WALA build
|
||||
was probably slow as well. Recent Travis CI runs have showed Gradle
|
||||
and Maven builds completing in fifteen to twenty minutes, without
|
||||
significant variation between the two build systems.
|
||||
|
||||
<a id="comprehensive-external-dependencies"/>The good news is that the
|
||||
Gradle build knows about all of its external dependencies and will
|
||||
download them as needed. This even includes some complex dependencies
|
||||
that the Maven build does not automate. For example, the Gradle build
|
||||
will automatically gather required Android SDK components: setting
|
||||
`$ANDROID_HOME` is not needed. Gradle builds will also download
|
||||
`/tmp/DroidBench` when needed to run tests; the Maven build system
|
||||
required that each developer do this by hand.
|
||||
|
||||
## Eclipse
|
||||
|
||||
### One-Time Eclipse Configuration
|
||||
|
||||
To work with WALA inside Eclipse, first **install Eclipse Buildship**
|
||||
using either [the Eclipse
|
||||
Marketplace](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-marketplace)
|
||||
or [the Eclipse update
|
||||
manager](http://www.vogella.com/tutorials/EclipseGradle/article.html#installation-via-the-eclipse-update-manager).
|
||||
Buildship integrates Eclipse with Gradle, much like how M2Eclipse
|
||||
integrates Eclipse with Maven. Restart Eclipse after installing this
|
||||
feature.
|
||||
|
||||
### Importing WALA Projects Into Eclipse
|
||||
|
||||
Once you are running a Buildship-enabled Eclipse, **[use the “Existing
|
||||
Gradle Project” import
|
||||
wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project)
|
||||
to import WALA into Eclipse.** Select and import the topmost level of
|
||||
your WALA source tree. On the “Import Options” page of the import
|
||||
wizard, leave all settings at their defaults: the “Override workspace
|
||||
settings” option should be off, and the grayed-out “Gradle
|
||||
distribution” choice should be set to “Gradle wrapper”. You do not
|
||||
need to select each of WALA’s sub-projects; import only the top-level
|
||||
WALA source tree, and the rest will follow.
|
||||
|
||||
After the lengthy import process completes, **use “Run → After
|
||||
Importing WALA Into Eclipse” to perform some post-import cleanup and
|
||||
configuration.** Immediately after importing, you may see some errors
|
||||
in the Eclipse “Problems” view. These should all go away after
|
||||
running the “After Importing WALA Into Eclipse” step.
|
||||
|
||||
Note: a pristine WALA source tree is *not* pre-configured as a group
|
||||
of Eclipse projects. Using the standard Eclipse “Existing Projects
|
||||
into Workspace” import wizard will not work correctly. You must [use
|
||||
the “Existing Gradle Project” import
|
||||
wizard](http://www.vogella.com/tutorials/EclipseGradle/article.html#import-an-existing-gradle-project)
|
||||
instead.
|
||||
|
||||
### `.classpath` and `.project` as Generated Files
|
||||
|
||||
You will find no `.classpath` or `.project` files anywhere in [the
|
||||
Gradle fork of WALA’s git repository](https://github.com/liblit/WALA).
|
||||
Importing using the “Existing Gradle Project” wizard creates these
|
||||
Eclipse project configuration files automatically based on the
|
||||
underlying Gradle configuration.
|
||||
|
||||
Therefore, when working with Eclipse + Gradle, you should **treat
|
||||
`.classpath` and `.project` files as *generated* artifacts,** not as
|
||||
files to edit directly or through the Eclipse project configuration
|
||||
GUI. For example, avoid using the Java Build Path settings dialog to
|
||||
make changes that are stored in a `.classpath` file: the modified
|
||||
`.classpath` file is not git-tracked, so your changes will eventually
|
||||
be lost or overwritten.
|
||||
|
||||
The right way to change the contents of any of a `.classpath` or
|
||||
`.project` file is to change the Gradle configuration such that the
|
||||
generated `.classpath` and `.project` files will have the desired
|
||||
contents, likely by using [Gradle’s `eclipse`
|
||||
plugin](https://docs.gradle.org/current/userguide/eclipse_plugin.html).
|
||||
A few WALA sub-projects already use this: look for `eclipse.project`
|
||||
in `*/build.gradle` for examples.
|
||||
|
||||
## Gradle Command Line
|
||||
|
||||
You do not need to install Gradle separately. **WALA includes its own
|
||||
copy of Gradle, available as the `gradlew` script in the top-level
|
||||
WALA directory.** Use this script for all command-line Gradle actions.
|
||||
For example, to compile all of WALA’s main (non-test) code and gather
|
||||
it into jar archives, run `./gradlew assemble`.
|
||||
|
||||
In general, most Gradle-generated artifacts will appear somewhere
|
||||
under `*/build`. For example the jar archives created by the
|
||||
`assemble` task can be found as `*/build/libs/*.jar`. Note, however,
|
||||
that Eclipse-generated artifacts will still appear in the same places
|
||||
as before, such as `*/bin` and `*/target`.
|
||||
|
||||
### Trustworthy Dependencies For Incremental Builds
|
||||
|
||||
Gradle has excellent understanding of task and file dependencies. You
|
||||
can trust it to perform incremental rebuilds rather than always
|
||||
rebuilding from scratch. If you are used to always running `mvn clean
|
||||
compile` instead of `mvn compile`, or `mvn clean install` instead of
|
||||
`mvn install`, I recommend that you drop `clean` as a reflexive extra
|
||||
step and **trust Gradle to do incremental builds correctly.**
|
||||
|
||||
### Favorite Build Tasks
|
||||
|
||||
Some useful Gradle tasks include:
|
||||
|
||||
- `assemble`: build WALA’s main (non-test) code
|
||||
|
||||
- `build`: build all WALA code and run all automated tests
|
||||
|
||||
- `javadoc`: build all Javadoc documentation
|
||||
|
||||
- `publishToMavenLocal`: install WALA’s jar files under `~/.m2`
|
||||
|
||||
- `clean`: remove all Gradle-generated artifacts
|
||||
|
||||
### Tasks in Specific Sub-Projects
|
||||
|
||||
When you run `./gradlew` in the top-level WALA directory, any tasks
|
||||
you list will be built in all sub-projects. For example, `./gradlew
|
||||
assemble` builds all non-test WALA jars in all sub-projects. If you
|
||||
want to build tasks only in specific sub-projects, you have two options:
|
||||
|
||||
1. Give the fully-qualified name of the sub-project task. For
|
||||
example, to assemble only the Dalvik jar, you could run `./gradlew
|
||||
:com.ibm.wala.dalvik:assemble`.
|
||||
|
||||
1. Run Gradle from within some sub-project directory. For example, to
|
||||
assemble only the Dalvik jar, you could `cd com.ibm.wala.dalvik`
|
||||
and then run `../gradlew assemble`. Note the proper relative path
|
||||
to the top-level Gradle script: `../gradle` instead of `./gradlew`.
|
||||
|
||||
### Task Name Abbreviation
|
||||
|
||||
[Any build task can be
|
||||
abbreviated](https://docs.gradle.org/current/userguide/command_line_interface.html#_task_name_abbreviation)
|
||||
by shortening each camel-case-delimited word in its name. For
|
||||
example, the `processTestResources` task can probably be abbreviated
|
||||
as `procTeRes` or even `pTR`.
|
||||
|
||||
### Useful Command-Line Flags
|
||||
|
||||
Among Gradle’s command-line flags, I have found the following
|
||||
particularly useful:
|
||||
|
||||
- [`--continue`](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:continue_build_on_failure):
|
||||
keep building non-dependent sub-tasks even after an initial failure.
|
||||
Especially useful in conjunction with the `build` or `test` tasks to
|
||||
see multiple test failures rather than giving up after the first
|
||||
failure.
|
||||
|
||||
- [`-t`,
|
||||
`--continuous`](https://docs.gradle.org/current/userguide/command_line_interface.html#_continuous_build):
|
||||
keep Gradle process running and re-execute the given tasks whenever
|
||||
input files change. Similar to Eclipse’s behavior of updating the
|
||||
build whenever you change and save a file.
|
||||
|
||||
- [`--tests=...`](https://docs.gradle.org/current/userguide/java_plugin.html#test_filtering):
|
||||
run only the selected tests. Use in conjunction with the `build` or
|
||||
`test` tasks for faster turnaround if you are focusing on getting
|
||||
just one or a few failing tests to pass.
|
||||
|
||||
- [`--scan`](https://scans.gradle.com/): upload a detailed report of
|
||||
the build process to a Gradle-hosted server for further exploration
|
||||
and analysis. The only security here is the obscurity of the
|
||||
generated URL for the build report. If you are not concerned about
|
||||
potentially making your build details public, then `--scan` is a
|
||||
good way to gain insights into why Gradle did what it did, and how
|
||||
long each piece took.
|
||||
|
||||
### Composite Builds
|
||||
|
||||
Gradle’s [composite
|
||||
builds](https://docs.gradle.org/current/userguide/composite_builds.html)
|
||||
allow a Gradle-managed project to recursively include other
|
||||
Gradle-managed projects, with Gradle managing the entire build process
|
||||
in a coherent, integrated manner. Thus, if you use Gradle to build
|
||||
your WALA-based project, you can easily have it use WALA from your
|
||||
own, private WALA tree instead of from `~/.m2` or the public Maven
|
||||
repository.
|
||||
|
||||
This is especially useful if you frequently find yourself switching
|
||||
between multiple different personal or experimental WALA builds. By
|
||||
avoiding `~/.m2`, each WALA-based project can be its own composite
|
||||
build, with its own WALA subtree, and no project interferes with any
|
||||
other.
|
||||
|
||||
# Travis CI
|
||||
|
||||
I use a [Travis CI build
|
||||
matrix](https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix)
|
||||
to perform automated testing in three configurations:
|
||||
|
||||
1. Gradle build on Ubuntu 14 (Trusty Tahr)
|
||||
1. Maven build on Ubuntu 14 (Trusty Tahr)
|
||||
1. Gradle build on macOS 10.12 (Sierra)
|
||||
|
||||
Until we are ready to completely replace Maven with Gradle, it is
|
||||
important that both keep working. Therefore, I use Travis CI to build
|
||||
and test WALA on Ubuntu using both Gradle and Maven. Every new pull
|
||||
request must be validated in both of these configurations before I
|
||||
will accept it onto the `gradle-and-buildship` branch.
|
||||
|
||||
<a id="travis-ci-macos"/>The official WALA repository has no macOS CI
|
||||
testing. However, [macOS is the main development platform for at
|
||||
least one WALA
|
||||
maintainer](https://github.com/liblit/WALA/issues/3#issuecomment-356823287),
|
||||
so it is great to have Travis CI helping us keep that platform
|
||||
working. I will not accept pull requests that introduce regressions
|
||||
into Gradle macOS builds. However, I am not using Travis CI to test
|
||||
Maven macOS builds. Initial attempts using [the official WALA master
|
||||
sources](https://github.com/wala/WALA) failed. As it is my goal to
|
||||
replace Maven entirely, investigating Maven+macOS failures further is
|
||||
not a priority.
|
||||
|
||||
<!--
|
||||
LocalWords: processTestResources pre classpath gradlew mvn
|
||||
LocalWords: javadoc buildship issuecomment
|
||||
-->
|
|
@ -3,8 +3,3 @@ WALA [![Build Status](https://travis-ci.org/wala/WALA.svg?branch=master)](https:
|
|||
|
||||
This is the main source repository for WALA. For more details on WALA, see <a
|
||||
href="http://wala.sourceforge.net">the WALA home page</a> and <a href="https://wala.github.io/javadoc">WALA Javadoc</a>.
|
||||
|
||||
**Note:** historically, WALA has used Maven as its build system.
|
||||
However, this WALA branch can also use Gradle as an alternative to
|
||||
Maven. See [the Gradle-specific README](README-Gradle.md) for more
|
||||
instructions and helpful tips.
|
||||
|
|
161
build.gradle
161
build.gradle
|
@ -1,161 +0,0 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// plugin configuration must precede everything else
|
||||
//
|
||||
|
||||
plugins {
|
||||
id 'com.diffplug.gradle.p2.asmaven' version '3.10.0'
|
||||
id 'com.github.hauner.jarTest' version '1.0.1' apply false
|
||||
id 'de.undercouch.download'
|
||||
id 'nebula.lint' version '8.3.1'
|
||||
id "nebula.source-jar" version '7.0.1' apply false
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// required Eclipse components
|
||||
//
|
||||
|
||||
p2AsMaven {
|
||||
group 'eclipse-deps', {
|
||||
repoEclipse '4.7.2'
|
||||
slicingOption 'latestVersionOnly', 'true'
|
||||
iu 'org.eclipse.core.commands'
|
||||
iu 'org.eclipse.core.contenttype'
|
||||
iu 'org.eclipse.core.jobs'
|
||||
iu 'org.eclipse.core.resources'
|
||||
iu 'org.eclipse.core.runtime'
|
||||
iu 'org.eclipse.equinox.app'
|
||||
iu 'org.eclipse.equinox.common'
|
||||
iu 'org.eclipse.equinox.preferences'
|
||||
iu 'org.eclipse.jdt.core'
|
||||
iu 'org.eclipse.jface'
|
||||
iu 'org.eclipse.osgi'
|
||||
iu 'org.eclipse.pde.core'
|
||||
iu 'org.eclipse.swt'
|
||||
iu 'org.eclipse.ui.ide'
|
||||
iu 'org.eclipse.ui.workbench'
|
||||
}
|
||||
group 'wst-deps', {
|
||||
repo 'http://download.eclipse.org/releases/oxygen'
|
||||
slicingOption 'latestVersionOnly', 'true'
|
||||
iu 'org.eclipse.wst.jsdt.core'
|
||||
iu 'org.eclipse.wst.jsdt.ui'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// common Java setup shared by multiple projects
|
||||
//
|
||||
|
||||
group name
|
||||
version '1.5.0-SNAPSHOT'
|
||||
|
||||
subprojects { subproject ->
|
||||
// skip generic Java setup for the few projects that have no Java code whatsoever
|
||||
switch (subproject.name) {
|
||||
case 'com.ibm.wala-repository':
|
||||
case ~/.*_feature/:
|
||||
return
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'nebula.source-jar'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
version rootProject.version
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "$rootProject.buildDir/p2asmaven/maven"
|
||||
}
|
||||
}
|
||||
|
||||
jar.manifest.from('META-INF/MANIFEST.MF')
|
||||
|
||||
task afterEclipseBuildshipImport(dependsOn: processTestResources)
|
||||
|
||||
test {
|
||||
include '**/*Test.class'
|
||||
include '**/*TestCase.class'
|
||||
include '**/*Tests.class'
|
||||
include '**/Test*.class'
|
||||
exclude '**/*AndroidLibs*.class'
|
||||
|
||||
maxParallelForks = Integer.MAX_VALUE
|
||||
}
|
||||
}
|
||||
|
||||
task afterEclipseBuildshipImport(type: Exec) {
|
||||
commandLine './revert-launchers.sh'
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// find platform-specific SWT implementations
|
||||
//
|
||||
|
||||
def osgi_platform
|
||||
|
||||
switch (System.getProperty('os.name')) {
|
||||
case ~/Mac OS X/:
|
||||
osgi_platform = 'cocoa.macosx.x86_64'
|
||||
break
|
||||
case ~/Windows.*/:
|
||||
osgi_platform = 'win32.win32.x86_64'
|
||||
break
|
||||
case ~/Linux/:
|
||||
osgi_platform = 'gtk.linux.x86_64'
|
||||
break
|
||||
}
|
||||
|
||||
System.setProperty('osgi.platform', osgi_platform)
|
||||
|
||||
subprojects {
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
// failOnVersionConflict()
|
||||
dependencySubstitution {
|
||||
substitute module('eclipse-deps:org.eclipse.swt.${osgi.platform}') with module("eclipse-deps:org.eclipse.swt.${System.getProperty('osgi.platform')}:3.+")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// optional lint checking of Gradle scripts
|
||||
//
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'nebula.lint'
|
||||
gradleLint.alwaysRun = false
|
||||
gradleLint {
|
||||
rules = ['all-dependency']
|
||||
excludedRules = [
|
||||
'duplicate-dependency-class',
|
||||
'transitive-duplicate-dependency-class',
|
||||
'unused-dependency',
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// disable Javadoc linter until documentation is in better shape
|
||||
//
|
||||
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
/.gradle/
|
|
@ -1,7 +0,0 @@
|
|||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'de.undercouch:gradle-download-task:3.4.1'
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
import org.gradle.api.tasks.*
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// create a Javadoc-style "package-list" file
|
||||
//
|
||||
|
||||
@CacheableTask
|
||||
class CreatePackageList extends org.gradle.api.DefaultTask {
|
||||
|
||||
@PathSensitive(PathSensitivity.RELATIVE)
|
||||
@Input Object sourceSet
|
||||
|
||||
@OutputFile File packageList = new File("$temporaryDir/package-list")
|
||||
|
||||
@TaskAction
|
||||
def create() {
|
||||
sourceSet.sourceCollections.collect { collection ->
|
||||
def sourceRoot = collection.tree.dir.toPath()
|
||||
collection.collect { source ->
|
||||
def javaSourceFilePath = source.toPath()
|
||||
def parentPath = javaSourceFilePath.parent
|
||||
def relativePath = sourceRoot.relativize(parentPath)
|
||||
relativePath.toString().replace(File.separator, '.')
|
||||
}
|
||||
}.flatten().sort().unique().each {
|
||||
packageList << "$it\n"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
import org.gradle.api.tasks.*
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// download and use checksum to verify that we got what we expected
|
||||
//
|
||||
|
||||
@CacheableTask
|
||||
class VerifiedDownload extends org.gradle.api.DefaultTask {
|
||||
|
||||
// URL of resource to download
|
||||
def @Input src
|
||||
|
||||
// expected checksum of resource as hex digits
|
||||
def @Input checksum
|
||||
|
||||
// algorithm to use for computing checksum
|
||||
def @Input algorithm = 'MD5'
|
||||
|
||||
// whether to use ETag for selective downloading
|
||||
def @Input useETag = true
|
||||
|
||||
// local file into which resource should be saved
|
||||
def @OutputFile dest
|
||||
|
||||
File getDest() {
|
||||
return project.file(dest)
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
downloadAndVerify() {
|
||||
def destFile = getDest()
|
||||
project.download {
|
||||
src this.src
|
||||
dest destFile
|
||||
overwrite true
|
||||
onlyIfModified true
|
||||
useETag this.useETag
|
||||
}
|
||||
project.verifyChecksum {
|
||||
src destFile
|
||||
algorithm this.algorithm
|
||||
checksum this.checksum
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala-repository</artifactId>
|
||||
<packaging>eclipse-repository</packaging>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.java.ecj</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.java.ecj
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Bundle: com.ibm.wala.cast.java,
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
sourceSets.main.java.srcDirs = ['src']
|
||||
|
||||
dependencies {
|
||||
compile(
|
||||
'eclipse-deps:org.eclipse.core.runtime:+',
|
||||
'eclipse-deps:org.eclipse.equinox.common:+',
|
||||
'eclipse-deps:org.eclipse.jdt.core:+',
|
||||
'org.osgi:org.osgi.core:4.2.0',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.java'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.java.ecj</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>WALA CAst Java ECJ</name>
|
||||
<description>WALA Common AST Java ECJ front-end</description>
|
||||
|
@ -45,27 +45,27 @@
|
|||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.util</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.java</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.core</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.shrike</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>WALA</artifactId>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.java.ecj</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.java.test.data</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/java.test.data JLex download.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -18,7 +18,6 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
|||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=error
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
|
@ -69,7 +68,7 @@ org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
|||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||
|
@ -91,7 +90,6 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
|
|
|
@ -2,6 +2,6 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.java.test.data
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
apply plugin: 'eclipse'
|
||||
|
||||
sourceSets.test.java.srcDirs = ['src']
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// download JLex
|
||||
//
|
||||
|
||||
task downloadJLex(type: VerifiedDownload) {
|
||||
src 'http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java'
|
||||
checksum 'fe0cff5db3e2f0f5d67a153cf6c783af'
|
||||
dest 'src/JLex/Main.java'
|
||||
}
|
||||
|
||||
task cleanDownloadJLex(type: Delete) {
|
||||
delete downloadJLex.dest.parent
|
||||
}
|
||||
|
||||
compileTestJava.dependsOn downloadJLex
|
||||
clean.dependsOn cleanDownloadJLex
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// create Eclipse metadata for use by Maven when running
|
||||
// com.ibm.wala.cast.java.test.JDTJavaIRTests and
|
||||
// com.ibm.wala.cast.java.test.JDTJava15IRTests tests
|
||||
//
|
||||
|
||||
task prepareMavenBuild(dependsOn: [eclipseClasspath, eclipseProject]) {
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.java.test.data</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -42,6 +42,7 @@ public class ArraysAndSuch {
|
|||
public static void main(String args[]) {
|
||||
ArraysAndSuch.main();
|
||||
}
|
||||
@SuppressWarnings("null")
|
||||
public static void main() {
|
||||
Object o1 = null;
|
||||
Object[] os1 = new Object[] { null, o1, null };
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.java.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.java.test
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Activator: com.ibm.wala.cast.java.test.TestPlugin
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: com.ibm.wala.core.tests,
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
apply plugin: 'com.github.hauner.jarTest'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
eclipse.project.natures 'org.eclipse.pde.PluginNature'
|
||||
|
||||
sourceSets.test.java.srcDirs = ['src']
|
||||
|
||||
dependencies {
|
||||
testCompile(
|
||||
'junit:junit:4.11',
|
||||
'org.osgi:org.osgi.core:4.2.0',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.java'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
maxHeapSize = '800M'
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
source.. = src/
|
||||
output.. = bin/test
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
OSGI-INF/l10n/bundle.properties,\
|
||||
OSGI-INF/
|
||||
javacProjectSettings = true
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.java.test</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.java</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.java
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: com.ibm.wala.cast,
|
||||
com.ibm.wala.core,
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
apply plugin: 'eclipse'
|
||||
|
||||
eclipse.project.natures 'org.eclipse.pde.PluginNature'
|
||||
|
||||
sourceSets.main.java.srcDirs = ['src']
|
||||
|
||||
dependencies {
|
||||
compile(
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/main
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
OSGI-INF/l10n/bundle.properties,\
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.java</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>WALA CAst</name>
|
||||
<description>WALA Common AST core Java front-end functionality</description>
|
||||
|
@ -45,22 +45,22 @@
|
|||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.util</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.core</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.shrike</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>WALA</artifactId>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.java</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="tests"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="lib" path="lib/htmlparser-1.4.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1 +0,0 @@
|
|||
/*.html
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.html.nu_validator</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.html.nu_validator
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Export-Package: com.ibm.wala.cast.js.html.nu_validator,
|
||||
com.ibm.wala.cast.js.test
|
||||
Require-Bundle: com.ibm.wala.cast.js;bundle-version="1.0.0",
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
sourceSets {
|
||||
main.java.srcDirs = ['src']
|
||||
test {
|
||||
java.srcDirs = ['tests']
|
||||
resources.srcDirs = [project(':com.ibm.wala.cast.js.test.data').file('examples-src')]
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(
|
||||
'nu.validator.htmlparser:htmlparser:1.4',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.js'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
testCompile(
|
||||
project(':com.ibm.wala.cast.test'),
|
||||
project(':com.ibm.wala.core.tests'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.rhino.test'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test'),
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
maxHeapSize = '800M'
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>WALA</artifactId>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.html.nu_validator</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="testdata"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.nodejs.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.nodejs.test
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Export-Package: NodejsRequireJsonTest,
|
||||
NodejsRequireTargetSelectorResolve,
|
||||
NodejsRequireTargetSelectorResolve.requireDynamic,
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
sourceSets.test {
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['testdata']
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile(
|
||||
'junit:junit:4.11',
|
||||
project(':com.ibm.wala.cast.js.nodejs'),
|
||||
project(':com.ibm.wala.core'),
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
maxHeapSize = '800M'
|
||||
|
||||
// fails with java.lang.OutOfMemoryError for unknown reasons
|
||||
exclude '**/NodejsRequireTargetSelectorResolveTest.class'
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.nodejs.test</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="dat">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry exported="true" kind="lib" path="lib/json-20160212.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.cast"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.cast.js"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.cast.js.rhino"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.core"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.util"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.ibm.wala.shrike"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.nodejs</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.nodejs
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Export-Package: com.ibm.wala.cast.js.nodejs,
|
||||
org.json
|
||||
Require-Bundle: com.ibm.wala.cast.js;bundle-version="1.3.10",
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
dependencies {
|
||||
compile(
|
||||
'commons-io:commons-io:2.4',
|
||||
'org.json:json:20160212',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.js'),
|
||||
project(':com.ibm.wala.cast.js.rhino'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
}
|
||||
|
||||
task downloadNodeJS(type: VerifiedDownload) {
|
||||
src 'https://api.github.com/repos/nodejs/node/zipball/0a604e92e258c5ee2752d763e50721e35053f135'
|
||||
dest "$temporaryDir/nodejs.zip"
|
||||
checksum '33c5ba7a5d45644e70d268d8ad3e57df'
|
||||
}
|
||||
|
||||
task unpackNodeJSLib(type: Copy, dependsOn: downloadNodeJS) {
|
||||
from(zipTree(downloadNodeJS.dest)) {
|
||||
include 'nodejs-node-0a604e9/lib/*.js'
|
||||
eachFile {
|
||||
relativePath new RelativePath(!directory, relativePath.lastName)
|
||||
}
|
||||
}
|
||||
|
||||
into 'dat/core-modules'
|
||||
includeEmptyDirs false
|
||||
}
|
||||
|
||||
task cleanUnpackNodeJSLib(type: Delete) {
|
||||
delete fileTree(dir: 'dat/core-modules', include: '*.js')
|
||||
}
|
||||
|
||||
processResources.dependsOn unpackNodeJSLib
|
||||
clean.dependsOn cleanUnpackNodeJSLib
|
||||
|
||||
sourceSets.main {
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['dat']
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<artifactId>com.ibm.wala.cast.js.nodejs</artifactId>
|
||||
|
|
|
@ -116,6 +116,8 @@ public class NodejsRequireTargetSelector implements MethodTargetSelector {
|
|||
IClass script = builder.getClassHierarchy()
|
||||
.lookupClass(TypeReference.findOrCreate(jsLoader.getReference(), className));
|
||||
|
||||
System.err.println(builder.getClassHierarchy());
|
||||
|
||||
IMethod method = script.getMethod(AstMethodReference.fnSelector);
|
||||
previouslyRequired.put(sourceModule.getClassName(), method);
|
||||
|
||||
|
|
|
@ -13,16 +13,13 @@ package com.ibm.wala.cast.js.nodejs;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil;
|
||||
import com.ibm.wala.classLoader.SourceFileModule;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
import com.ibm.wala.util.collections.HashSetFactory;
|
||||
import com.ibm.wala.util.io.TemporaryFile;
|
||||
|
||||
|
@ -54,18 +51,8 @@ public class NodejsRequiredCoreModule extends NodejsRequiredSourceModule {
|
|||
return NodejsRequiredCoreModule.class.getClassLoader().getResourceAsStream("core-modules/" + name + ".js");
|
||||
|
||||
}
|
||||
|
||||
private static final Map<String,File> names = HashMapFactory.make();
|
||||
|
||||
public static NodejsRequiredCoreModule make(String name) throws IOException {
|
||||
if (! names.containsKey(name)) {
|
||||
java.nio.file.Path p = Files.createTempDirectory("nodejs");
|
||||
File f = new File(p.toFile(), name + ".js");
|
||||
f.deleteOnExit();
|
||||
p.toFile().deleteOnExit();
|
||||
names.put(name, f);
|
||||
}
|
||||
File file = names.get(name);
|
||||
File file = new File(System.getProperty("java.io.tmpdir"), name+".js");
|
||||
TemporaryFile.streamToFile(file, getModule(name));
|
||||
SourceFileModule sourceFileModule = CAstCallGraphUtil.makeSourceModule(file.toURI().toURL(), file.getName());
|
||||
return new NodejsRequiredCoreModule(file, sourceFileModule);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="harness-src"/>
|
||||
<classpathentry kind="lib" path="/com.ibm.wala.cast.js.test.data/examples-src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.rhino.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.rhino.test
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: com.ibm.wala.cast.js.rhino;bundle-version="1.0.0",
|
||||
com.ibm.wala.cast.js;bundle-version="1.0.0",
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
apply plugin: 'com.github.hauner.jarTest'
|
||||
|
||||
sourceSets.test {
|
||||
java.srcDirs = ['harness-src']
|
||||
resources.srcDirs = [project(':com.ibm.wala.cast.js.test.data').file('examples-src')]
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile(
|
||||
'junit:junit:4.11',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.js'),
|
||||
project(':com.ibm.wala.cast.js.rhino'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.test'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
}
|
||||
|
||||
test {
|
||||
environment 'TRAVIS', 1
|
||||
maxHeapSize = '800M'
|
||||
}
|
||||
|
||||
task cleanTest(type: Delete) {
|
||||
delete 'actual.dump'
|
||||
delete 'expected.dump'
|
||||
}
|
||||
|
||||
clean.dependsOn cleanTest
|
|
@ -1,5 +1,6 @@
|
|||
source.. = harness-src/
|
||||
output.. = bin/
|
||||
output.. = bin/,\
|
||||
/com.ibm.wala.cast.js.test.data/examples-src/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
OSGI-INF/l10n/bundle.properties,\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.ibm.wala.cast.js.rhino.test/harness-src/com/ibm/wala/cast/js/vis/JsViewerDriver.java"/>
|
||||
|
@ -6,9 +6,8 @@
|
|||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.ibm.wala.cast.js.vis.JsViewerDriver"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value=""file:${resource_loc:/com.ibm.wala.cast.js.test/examples-src/pages/page1.html}""/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="file:${workspace_loc}/com.ibm.wala.cast.js.test/examples-src/pages/page1.html"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.js.rhino.test"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx800M"/>
|
||||
</launchConfiguration>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.ibm.wala.cast.js.test.TestForInLoopHackRhino"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.js.rhino.test"/>
|
||||
</launchConfiguration>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.ibm.wala.cast.js.test.TestMozillaBugPagesRhino"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.js.rhino.test"/>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.ibm.wala.cast.js.rhino.test"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.ibm.wala.cast.js.test.data/examples-src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.rhino.test</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="lib" path="lib/rhino-1.7.6.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.rhino</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,12 +2,12 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.rhino
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: com.ibm.wala.cast;bundle-version="1.5.0",
|
||||
com.ibm.wala.cast.js;bundle-version="1.5.0",
|
||||
com.ibm.wala.core;bundle-version="1.5.0",
|
||||
com.ibm.wala.util;bundle-version="1.5.0"
|
||||
Require-Bundle: com.ibm.wala.cast;bundle-version="1.4.4",
|
||||
com.ibm.wala.cast.js;bundle-version="1.4.4",
|
||||
com.ibm.wala.core;bundle-version="1.4.4",
|
||||
com.ibm.wala.util;bundle-version="1.4.4"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.ibm.wala.cast.js.translator,
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
sourceSets.main.java.srcDirs = ['source']
|
||||
|
||||
dependencies {
|
||||
compile(
|
||||
'org.mozilla:rhino:1.7.7.1',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.js'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.js.rhino</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>WALA CAst JS Rhino</name>
|
||||
<description>WALA JS Rhino adapter</description>
|
||||
|
@ -45,22 +45,22 @@
|
|||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.util</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.core</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.js</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mozilla</groupId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<artifactId>WALA</artifactId>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.rhino</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.test.data</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Eclipse-LazyStart: true
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.test.data;singleton:=true
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: examples-src/
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
apply plugin: 'base'
|
||||
|
||||
task downloadAjaxslt(type: VerifiedDownload) {
|
||||
def version = '0.8.1'
|
||||
def versionedArchive = "ajaxslt-${version}.tar.gz"
|
||||
src "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ajaxslt/$versionedArchive"
|
||||
dest "$temporaryDir/$versionedArchive"
|
||||
checksum 'c995abe3310a401bb4db7f28a6409756'
|
||||
}
|
||||
|
||||
task unpackAjaxslt(type: Sync, dependsOn: downloadAjaxslt) {
|
||||
from(tarTree(downloadAjaxslt.dest)) {
|
||||
eachFile {
|
||||
def newSegments = relativePath.segments[1 .. -1] as String[]
|
||||
relativePath new RelativePath(!directory, newSegments)
|
||||
}
|
||||
}
|
||||
into 'examples-src/ajaxslt'
|
||||
}
|
||||
|
||||
clean.dependsOn cleanUnpackAjaxslt
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.test.data</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="harness-src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.ibm.wala.cast.js.test"/>
|
||||
|
@ -16,7 +16,6 @@
|
|||
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.ibm.wala.cast.js.test"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/com.ibm.wala.cast.js.test.data/examples-src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.js.test"/>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js.test
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: com.ibm.wala.cast.js,
|
||||
com.ibm.wala.cast,
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
apply plugin: 'com.github.hauner.jarTest'
|
||||
|
||||
sourceSets.test {
|
||||
java.srcDirs = ['harness-src']
|
||||
resources.srcDirs = [project(':com.ibm.wala.cast.js.test.data').file('examples-src')]
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile(
|
||||
'junit:junit:4.11',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.cast.js'),
|
||||
project(':com.ibm.wala.cast.js.rhino'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.test'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
}
|
||||
|
||||
processTestResources.dependsOn ':com.ibm.wala.cast.js.test.data:unpackAjaxslt'
|
||||
|
||||
test {
|
||||
maxHeapSize = '800M'
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.js.test</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source"/>
|
||||
<classpathentry kind="src" path="dat"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jericho-html-3.2.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.js</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -35,7 +35,7 @@ org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.js;singleton:=true
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/jericho-html-3.2.jar
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
sourceSets.main {
|
||||
java.srcDirs = ['source']
|
||||
resources.srcDirs = ['dat']
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(
|
||||
'commons-io:commons-io:2.4',
|
||||
'net.htmlparser.jericho:jericho-html:3.2',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.shrike'),
|
||||
project(':com.ibm.wala.util'),
|
||||
)
|
||||
}
|
||||
|
||||
task createPackageList(type: CreatePackageList) {
|
||||
sourceSet sourceSets.main.java
|
||||
}
|
||||
|
||||
javadoc {
|
||||
def rhino = project(':com.ibm.wala.cast.js.rhino').compileJava
|
||||
dependsOn rhino
|
||||
doFirst {
|
||||
classpath += files rhino
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.js</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>WALA CAst JS</name>
|
||||
<description>WALA JS frontend</description>
|
||||
|
@ -45,22 +45,22 @@
|
|||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.util</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.core</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.shrike</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.htmlparser.jericho</groupId>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<artifactId>WALA</artifactId>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>com.ibm.wala.cast.js</artifactId>
|
||||
|
|
|
@ -104,7 +104,7 @@ import com.ibm.wala.util.strings.Atom;
|
|||
* {@link JSImplicitPointsToSetVisitor#visitAstGlobalRead(AstGlobalRead)}.
|
||||
* Finally, we need to represent direct flow of the global object to handle
|
||||
* receiver argument semantics (see
|
||||
* {@link com.ibm.wala.cast.js.translator.RhinoToAstTranslator}). To do so, we create a
|
||||
* {@link org.mozilla.javascript.RhinoToAstTranslator}). To do so, we create a
|
||||
* reference to a global named {@link #GLOBAL_OBJ_VAR_NAME}, which is handled
|
||||
* specially in {@link JSConstraintVisitor#visitAstGlobalRead(AstGlobalRead)}.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="harness-src/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -12,7 +12,6 @@
|
|||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.buildship.core.classpathprovider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.ibm.wala.cast.test"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Djava.library.path=${project_loc:/com.ibm.wala.cast.test}/bin"/>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name
|
||||
Bundle-SymbolicName: com.ibm.wala.cast.test
|
||||
Bundle-Version: 1.5.0.qualifier
|
||||
Bundle-Version: 1.4.4.qualifier
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle:
|
||||
org.junit;bundle-version="4.0.0",
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
apply plugin: 'com.github.hauner.jarTest'
|
||||
apply plugin: 'cpp'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
eclipse.project.natures 'org.eclipse.pde.PluginNature'
|
||||
|
||||
sourceSets.test.java.srcDirs = ['harness-src/java']
|
||||
|
||||
dependencies {
|
||||
testCompile(
|
||||
'junit:junit:4.11',
|
||||
project(':com.ibm.wala.cast'),
|
||||
project(':com.ibm.wala.core'),
|
||||
project(':com.ibm.wala.util'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: build following targets for "test"-only, not "main"
|
||||
|
||||
def currentJvm = org.gradle.internal.jvm.Jvm.current()
|
||||
|
||||
task generateJniHeaders(type: Exec, dependsOn: [testClasses, ':com.ibm.wala.cast:classes']) {
|
||||
// classes for which we need headers
|
||||
def nativePackage = 'com.ibm.wala.cast.test'
|
||||
def nativeClasses = ['TestNativeTranslator']
|
||||
def qualifiedClasses = nativeClasses.collect { "$nativePackage.$it" }
|
||||
|
||||
// inputs and outputs, suitable for use with rule-based model configuration
|
||||
ext {
|
||||
sourceDir = null
|
||||
headerDir = "$buildDir/include"
|
||||
}
|
||||
inputs.files files(qualifiedClasses.collect { "$buildDir/${it.replace('.', '/')}.class" })
|
||||
outputs.dir headerDir
|
||||
outputs.cacheIf { true }
|
||||
|
||||
// javah command to generate headers
|
||||
def sourceSets = [sourceSets.test, project(':com.ibm.wala.cast').sourceSets.main]
|
||||
def classesDirs = sourceSets.inject(files()) { acc, val -> acc.plus(val.output.classesDirs) }
|
||||
def classpath = classesDirs.asPath
|
||||
def javah = currentJvm.getExecutable('javah')
|
||||
commandLine(javah, '-d', "$headerDir", '-classpath', classpath)
|
||||
args(qualifiedClasses)
|
||||
}
|
||||
|
||||
model {
|
||||
components {
|
||||
xlator_test(NativeLibrarySpec) {
|
||||
sources.cpp {
|
||||
source {
|
||||
srcDirs = ['harness-src/c']
|
||||
include 'smoke.cpp'
|
||||
}
|
||||
generatedBy generateJniHeaders
|
||||
['cast', 'jdk'].each {
|
||||
lib project: ':com.ibm.wala.cast', library: it
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
withType(StaticLibraryBinarySpec) {
|
||||
buildable = false
|
||||
}
|
||||
withType(SharedLibraryBinarySpec) {
|
||||
switch ("$targetPlatform.operatingSystem.name/$targetPlatform.architecture.name") {
|
||||
case 'linux/x86-64':
|
||||
// TODO: compute path on following line from 'cast' library properties somehow
|
||||
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
|
||||
// TODO: compute path on following line from 'jdk' library properties somehow
|
||||
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
smoke_main(NativeExecutableSpec) {
|
||||
sources.cpp {
|
||||
source {
|
||||
srcDirs = ['harness-src/c']
|
||||
include 'smoke_main.cpp'
|
||||
}
|
||||
['cast', 'jdk'].each {
|
||||
lib project: ':com.ibm.wala.cast', library: it
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
switch ("$targetPlatform.operatingSystem.name/$targetPlatform.architecture.name") {
|
||||
case 'linux/x86-64':
|
||||
// TODO: compute path on following line from 'cast' library properties somehow
|
||||
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
|
||||
// TODO: compute path on following line from 'jdk' library properties somehow
|
||||
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
def lib = linkXlator_testSharedLibrary
|
||||
dependsOn lib
|
||||
systemProperty 'java.library.path', lib.destinationDir
|
||||
|
||||
// TODO: compute path on following line from 'cast' library properties somehow
|
||||
def castLibDir = "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
|
||||
environment 'DYLD_LIBRARY_PATH', castLibDir
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
source.. = harness-src/java
|
||||
output.. = bin/test
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
OSGI-INF/l10n/bundle.properties,\
|
||||
OSGI-INF/
|
||||
javacProjectSettings = true
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ibm.wala</groupId>
|
||||
<artifactId>WALA</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.4.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.ibm.wala.cast.test</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source/java"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="${build_project}/source/c/cbuild.sh"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
|
||||
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}/source/c"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${bash}"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
|
||||
</launchConfiguration>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.ibm.wala.cast</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/make WALA.CAst.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue