Commit Graph

5997 Commits

Author SHA1 Message Date
Ben Liblit c16f172932 Find Eclipse jars using local Maven mirror of Eclipse P2 repository
This should give us a set of mutually-consistent jars rather than
picking up random, outdated pieces from Maven Central or wherever else
I could find them.  We now also have a single, central place where we
set the Eclipse version that we're building against.  Much, *much*
cleaner.
2018-04-18 11:29:28 -05:00
Ben Liblit fc0b951ead Assume that Eclipse needs all standard test-resource processing 2018-04-18 11:29:28 -05:00
Ben Liblit a99db6b946 Trivial whitespace tweak 2018-04-18 11:29:28 -05:00
Ben Liblit 01e54886df Exclude one macOS test that I don't know how to fix right now 2018-04-18 11:29:28 -05:00
Ben Liblit 3d026d409e Download appropriate Android SDK for current OS 2018-04-18 11:29:28 -05:00
Ben Liblit baee9d32e1 Try to continue building/testing even after the first failure
If other, non-dependent tasks would also fail, I'd rather discover all
of them at once.
2018-04-18 11:29:28 -05:00
Ben Liblit d8948324f7 "rm" on macOS apparently doesn't understand long ("--foo") flags 2018-04-18 11:29:28 -05:00
Ben Liblit 393ef13622 macOS doesn't seem to have "xvfb-run", and may not need it anyway 2018-04-18 11:29:28 -05:00
Ben Liblit b5cfd56041 Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
We're not going to attempt macOS Travis CI testing for Maven builds,
because I don't know whether that's even expected to work on the
official WALA master branch.  Our main focus here is Gradle.

Note that Travis macOS images do not support JDK switching, so
explicitly selecting the JDK version now becomes part of the
Linux-only configuration.

Travis macOS images also do not support Android as a build "language".
So our Travis CI configuration for Gradle builds now declares that
this is a Java project rather than an Android one.  That's OK, though,
because our Gradle scripts already handle downloading the Android SDK;
we don't need Travis CI to do that for us.  When building using Maven,
though, we still call this an Android project because Maven builds do
still rely on Travis CI to provide the Android SDK.

squash! Enable macOS (a.k.a. OS X) Travis CI testing for Gradle builds
2018-04-18 11:29:27 -05:00
Ben Liblit 4853d2b275 Download a specific DroidBench release that we know works for us
If future DroidBench changes include things we need, then we can
decide to move to those newer revisions.  But we shouldn't allow
DroidBench to change out from under us implicitly whenever someone
commits something new to the DroidBench repository.
2018-04-18 11:29:27 -05:00
Ben Liblit c223625f22 Add "TODO" reminders of furture refactoring opportunities 2018-04-18 11:29:27 -05:00
Ben Liblit af5a22d4bb Factor out some repeated accesses to a task's output files 2018-04-18 11:29:27 -05:00
Ben Liblit 1cf1d7c05a Derive Android platforms version from Android build-tools version
This should help us keep the two in sync if the latter changes one
day.
2018-04-18 11:29:27 -05:00
Ben Liblit dfe3659dcb Got DynamicDalvikComparisonJavaLibsTest working at some point 2018-04-18 11:29:27 -05:00
Ben Liblit bbc9ec7e97 Ignore a transient file that appears during testing 2018-04-18 11:29:27 -05:00
Ben Liblit eb00a84a40 Grab an additional archive needed by DalvikAnnotationsTest 2018-04-18 11:29:27 -05:00
Ben Liblit 22245f8cb4 Download a few additional supporting files needed by tests 2018-04-18 11:29:27 -05:00
Ben Liblit 79c8cf1411 Import a class that we will soon be using multiple times 2018-04-18 11:29:27 -05:00
Ben Liblit 2e04ac9838 Fix accidental copying of entire subproject as test resource 2018-04-18 11:29:27 -05:00
Ben Liblit 90a947dad1 Use an "android.jar" that matches the "dx.jar" we are already using
Nothing was obviously failing with the older "android.jar", but I feel
more comfortable knowing that these two are more closely matched.
2018-04-18 11:29:27 -05:00
Ben Liblit fde718b5d3 Suppress harmless broken-pipe warnings from "yes" 2018-04-18 11:29:27 -05:00
Ben Liblit 386cdc117b Set Android build-tools version in just one place 2018-04-18 11:29:27 -05:00
Ben Liblit bc0062e4b0 Use more recent "dx.jar" than is available through Maven Central
This lets us ditch pre-Java-8 in the Gradle build.  (The official WALA
master branch recently got rid of pre-Java-8 in its Maven build.)
That, in turn, lets two "com.ibm.wala.dalvik.test" tests pass that
previously were failing.  We still have two other failing tests in
that subproject, but this is definitely progress!

Our Gradle build scripts manage the entire process of downloading and
locally installing the appropriate Android SDK.  That includes
automatically accepting a license.  Maybe some lawyer will throw a fit
about that some day.  Until then, I'd rather have a build system that
does everything needed without imposing additional manual steps on
developers.
2018-04-18 11:29:27 -05:00
Ben Liblit a09be64332 Ignore some transient files that appear during testing 2018-04-18 11:29:27 -05:00
Ben Liblit 77e0fc2b9c Set name and version to help Gradle composite-build substitutions 2018-04-18 11:29:27 -05:00
Ben Liblit 5398570308 Update Eclipse JUnit test launchers for use with Buildship
Previously Buildship removed its classpath from all of these
launchers.  Now it's automatically putting that back in as soon as I
visit each launcher in Eclipse's "Run Configurations" dialog.  Not
sure what's going on here, but it certainly seems more sane to me to
assume that the Buildship-computed classpath *is* needed for all of
these.  I have an open question on the Gradle discussion forum to try
to understand what's going on here and how to fix it:
<https://discuss.gradle.org/t/launchers-lose-buildship-classpath-on-import-regain-it-later/25641>.
2018-04-18 11:29:27 -05:00
Ben Liblit 525c4aa5fe Update Eclipse "Java Application" launchers for use with Buildship 2018-04-18 11:29:27 -05:00
Ben Liblit c2edaf3119 Use Eclipse-computed paths rather than hard-coding absolute paths 2018-04-18 11:29:27 -05:00
Ben Liblit ca17b12187 Remove launchers whose main Java code is found nowhere in WALA 2018-04-18 11:29:27 -05:00
Ben Liblit f6db318c91 Note some excessive resource copying that we should eventually fix 2018-04-18 11:29:27 -05:00
Ben Liblit 39781604a2 Create a broad "Process Test Resources" Eclipse launch configuration
This should prepare test resources for all subprojects.  A WALA
developer should run this once before running any tests inside
Eclipse.  Initially I'd hoped to make this more narrowly focused, but
Eclipse just doesn't have the infrastructure to deal with fine-grained
dependencies.  On the other hand, running "./gradlew
eclipsePrepareTestResources" automatically for each build seems like
overkill, and could end up being rather slow.  So for now we require
that the developer run this once, by hand.
2018-04-18 11:29:27 -05:00
Ben Liblit 61d8ee1b02 Fix various warnings produced by "./gradlew javadoc"
Three stubborn warnings remain, but this is progress!
2018-04-18 11:29:27 -05:00
Ben Liblit eb4e97a665 Fix warnings about Javadoc links to "java.lang.reflect" package 2018-04-18 11:29:27 -05:00
Ben Liblit da90d1cf5a Trigger custom clean tasks whenever running "./gradlew clean"
A cleaned tree is now much closer to a pristine tree that has just
been checked out and never built.  The only extra created files that
are left behind are ".gradle", "buildSrc/.gradle", and
"buildSrc/build".
2018-04-18 11:29:27 -05:00
Ben Liblit 51cef18bc9 Unpack node.js in the same place that Maven unpacks it
This gets rid of some Eclipse warnings that stem from Buildship being
confused about what it should treat as a source directory if Maven and
Gradle are both being used in the same tree.
2018-04-18 11:29:27 -05:00
Ben Liblit b3dab4c2b0 Tweak Buildship-generated Eclipse ".project" file for extra jars 2018-04-18 11:29:27 -05:00
Ben Liblit 504849e6f5 Update Gradle wrapper to Gradle 4.5
No major new features for us here, but better native caching and other
performance improvements.
2018-04-18 11:29:27 -05:00
Ben Liblit 5f2bab0f3d Get a core test to work by putting "bcel-5.2.jar" where expected 2018-04-18 11:29:27 -05:00
Ben Liblit 031740338f Get a Dalvik test to work by putting "dx.jar" where expected 2018-04-18 11:29:27 -05:00
Ben Liblit 817166c128 Compute a library path from the native software model
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.  That being said, extracting this
information from the depths of the native software model seems *far*
more complex than it should be.  I had hoped for something nicer in
response to
<https://discuss.gradle.org/t/compute-wl-rpath-flag-suitable-for-native-shared-library/25278>,
but so far there's nothing.
2018-04-18 11:29:27 -05:00
Ben Liblit 50bed1cbe8 Compute a library path from the corresponding linker task
Previously we were repeating the library path twice, but that's not
good for long-term maintenance.
2018-04-18 11:29:27 -05:00
Ben Liblit 22421c6882 rpath only matters for shared libraries 2018-04-18 11:29:27 -05:00
Ben Liblit 7c4c2c895c Add previously-undeclared dependency of tests on native library 2018-04-18 11:29:27 -05:00
Ben Liblit a98b913373 Avoid random leftover junk by using "Sync" instead of "Copy" 2018-04-18 11:29:27 -05:00
Ben Liblit c98ea16374 Simplify filtering of archive contents 2018-04-18 11:29:26 -05:00
Ben Liblit 8303eaba4c Override specific "cleanFooBar" tasks instead of generic "clean" 2018-04-18 11:29:26 -05:00
Ben Liblit 5b825997bf Be more concise by calling property setters instead of assigning 2018-04-18 11:29:26 -05:00
Ben Liblit ad1f024b77 Be more concise by omitting implicit "it." in closures 2018-04-18 11:29:26 -05:00
Ben Liblit 2aadd55227 Change archive file names while unpacking, rather than in two stages 2018-04-18 11:29:26 -05:00
Ben Liblit c812e72cb5 Use Groovy's implicit "it" closure argument 2018-04-18 11:29:26 -05:00