Commit Graph

53 Commits

Author SHA1 Message Date
Ben Liblit
d9f7abdad3 Augment cleanTest tasks rather than replacing them
Previously I hadn't realized that Gradle's "java" plugin would generate
default "cleanTest" tasks for us.  By defining my own "cleanTest" tasks
we were replacing the generated ones, but what we really wanted to do
was augment them with additional files to delete.
2018-08-11 12:36:22 -05:00
Julian Dolby
d54859f923 revert chnage 2018-08-03 00:29:29 -04:00
Julian Dolby
768a546f19 try to force kawa compiles 2018-08-03 00:02:12 -04:00
Julian Dolby
7e6cfe84f6 more support for method handles, particularly for ones created with
reflection.
2018-08-02 19:35:32 -04:00
Ben Liblit
e2ce6a84b0 Load plugins using "plugins" closure rather than "apply plugin"
Apparently the latter is considered a "legacy method":
<https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application>.
2018-05-23 16:47:58 -05:00
Ben Liblit
decd164fa6 Require JUnit 4.12 instead of 4.11
WALA itself does not use any JUnit 4.12 features.  However, I am
working on a WALA-based project that does require JUnit 4.12.  Mixing
jar versions is a path to madness.  So if the WALA maintainers don't
mind, it would make my life easier if WALA itself required JUnit 4.12.
Otherwise, I need to maintain that 4.11/4.12 difference indefinitely
as a divergence between official WALA and my WALA variant.

I suppose an alternative could be to let the JUnit version be
specified externally somehow. I have not explored this option in
depth, but could look into it if simply moving to JUnit 4.12 is
undesirable.
2018-05-21 17:27:54 -05:00
Ben Liblit
000b21f36e Rename a build task to more clearly reflect what it builds
This task has an input named "hello_hash.ml", and an output named
"hello_hash.jar".  So calling this task "generateHelloHash" is too
vague.  Now we call it "generateHelloHashJar" instead.
2018-04-18 11:29:29 -05:00
Ben Liblit
03e43d100b Update gradle-download-plugin and use some of its new features
We now download and verify checksums as a single task, rather than as
two separate tasks.  This simplifies other task dependencies, since we
no longer have a checksum-verified "stamp" file separate from the
download itself.  Unfortunately the combined task now has a
significant amount of repeated boilerplate.  I'm hoping to refactor
that all out into a custom task class, but haven't yet figured out the
details:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.

We now also use ETags to be smarter about when a fresh download is or
is not actually needed.  I think there are still opportunities for
improved caching here, but this is a step in the right direction.
2018-04-18 11:29:28 -05:00
Ben Liblit
7fd8f02382 Replicate test include/exclude patterns already used in Maven builds 2018-04-18 11:29:28 -05:00
Ben Liblit
9a2af5bbb8 Add "com.ibm.wala.core.testdata" to classpath for testing
This lets the "DynamicCallGraphTest" tests pass.  The tests in that
class expect to find some element of the classpath that includes the
substring "com.ibm.wala.core.testdata".  They then treat that as a
collection of bytecode files to instrument.
2018-04-18 11:29:28 -05:00
Ben Liblit
fca0f7c117 Fix jar exclusion patterns to match what Ant uses
One previously-failing test class now passes.  Progress!
2018-04-18 11:29:28 -05:00
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
2e04ac9838 Fix accidental copying of entire subproject as test resource 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
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
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
b7b01c8486 Replicate Maven's extra system property settings for some tests 2018-04-18 11:29:26 -05:00
Ben Liblit
a1cf040897 Add missing test resources to make many more regression tests pass 2018-04-18 11:29:26 -05:00
Ben Liblit
afeba0d984 Remove some test exclusions that are not actually needed now 2018-04-18 11:29:26 -05:00
Ben Liblit
5c30dd7581 Explicitly disable regression tests that are currently failing
<https://github.com/liblit/WALA/issues/5> notes that several
subprojects' tests are currently broken under Gradle.  I'd still like
to be able to run non-broken tests, though.  So here I'm disabling the
failing tests.  The intent is to treat these exclusions as a to-do
list.  We can remove exclusions as we get the corresponding tests
working.  No more exclusions means
<https://github.com/liblit/WALA/issues/5> is fixed.
2018-04-18 11:29:26 -05:00
Ben Liblit
4b48f8ee4d Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-18 11:29:25 -05:00
Ben Liblit
3ce242a22c Simplify loading of plugins shared by many subprojects 2018-04-18 11:29:25 -05:00
Ben Liblit
1432e18c37 Clean up some simple syntactic redundancy in dependency declarations 2018-04-18 11:29:25 -05:00
Ben Liblit
5d5fa18b5f Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-18 11:29:25 -05:00
Ben Liblit
afa982adf2 Properly distinguish main from test code, now that I know how 2018-04-18 11:29:25 -05:00
Ben Liblit
530d74929f Many improvements to Gradle build support, including within Eclipse 2018-04-18 11:29:24 -05:00
Sungho Lee
ffaa2e4626 change hamcrest library version of core.tests 2018-04-18 11:29:24 -05:00
Sungho Lee
50d0f7ee71 Change build.gradle files for proper format and delete all tests 2018-04-18 11:29:24 -05:00
Sungho Lee
4a31927b00 Gradle build scripts 2018-04-18 11:29:24 -05:00
Ben Liblit
99c2493e37 Revert "Build WALA using Gradle instead of Maven" (#298) 2018-04-18 12:15:56 -04:00
Ben Liblit
e42e36c4de Rename a build task to more clearly reflect what it builds
This task has an input named "hello_hash.ml", and an output named
"hello_hash.jar".  So calling this task "generateHelloHash" is too
vague.  Now we call it "generateHelloHashJar" instead.
2018-04-17 15:02:36 -05:00
Ben Liblit
ba455f4737 Update gradle-download-plugin and use some of its new features
We now download and verify checksums as a single task, rather than as
two separate tasks.  This simplifies other task dependencies, since we
no longer have a checksum-verified "stamp" file separate from the
download itself.  Unfortunately the combined task now has a
significant amount of repeated boilerplate.  I'm hoping to refactor
that all out into a custom task class, but haven't yet figured out the
details:
<https://github.com/michel-kraemer/gradle-download-task/issues/108>.

We now also use ETags to be smarter about when a fresh download is or
is not actually needed.  I think there are still opportunities for
improved caching here, but this is a step in the right direction.
2018-04-17 15:02:36 -05:00
Ben Liblit
2bf92e1214 Replicate test include/exclude patterns already used in Maven builds 2018-04-17 15:02:36 -05:00
Ben Liblit
f287ee5c41 Add "com.ibm.wala.core.testdata" to classpath for testing
This lets the "DynamicCallGraphTest" tests pass.  The tests in that
class expect to find some element of the classpath that includes the
substring "com.ibm.wala.core.testdata".  They then treat that as a
collection of bytecode files to instrument.
2018-04-17 15:02:36 -05:00
Ben Liblit
2763589d1f Fix jar exclusion patterns to match what Ant uses
One previously-failing test class now passes.  Progress!
2018-04-17 15:02:36 -05:00
Ben Liblit
5e0e251766 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-17 15:02:36 -05:00
Ben Liblit
e529c9d96f Fix accidental copying of entire subproject as test resource 2018-04-17 15:02:35 -05:00
Ben Liblit
557ea62426 Note some excessive resource copying that we should eventually fix 2018-04-17 15:02:35 -05:00
Ben Liblit
57e3dc15fa 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-17 15:02:35 -05:00
Ben Liblit
f7f8dd4351 Get a core test to work by putting "bcel-5.2.jar" where expected 2018-04-17 15:02:35 -05:00
Ben Liblit
2c1bc5c52c Replicate Maven's extra system property settings for some tests 2018-04-17 15:02:35 -05:00
Ben Liblit
9c58a94056 Add missing test resources to make many more regression tests pass 2018-04-17 15:02:35 -05:00
Ben Liblit
9d9b10cd0a Remove some test exclusions that are not actually needed now 2018-04-17 15:02:35 -05:00
Ben Liblit
e2e340b490 Explicitly disable regression tests that are currently failing
<https://github.com/liblit/WALA/issues/5> notes that several
subprojects' tests are currently broken under Gradle.  I'd still like
to be able to run non-broken tests, though.  So here I'm disabling the
failing tests.  The intent is to treat these exclusions as a to-do
list.  We can remove exclusions as we get the corresponding tests
working.  No more exclusions means
<https://github.com/liblit/WALA/issues/5> is fixed.
2018-04-17 15:02:35 -05:00
Ben Liblit
da27efec97 Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-17 15:02:35 -05:00
Ben Liblit
2bc0768242 Simplify loading of plugins shared by many subprojects 2018-04-17 15:02:35 -05:00
Ben Liblit
db348b4ddd Clean up some simple syntactic redundancy in dependency declarations 2018-04-17 15:02:35 -05:00
Ben Liblit
651f40c170 Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-17 15:02:35 -05:00
Ben Liblit
695cd2863c Properly distinguish main from test code, now that I know how 2018-04-17 15:02:35 -05:00
Ben Liblit
401fbaf89a Many improvements to Gradle build support, including within Eclipse 2018-04-17 15:02:35 -05:00