Commit Graph

5665 Commits

Author SHA1 Message Date
Ben Liblit ba5849afb6 Simplify inclusion of "OSGI-INF" and the only file it contains 2018-04-18 11:29:25 -05:00
Ben Liblit 6bcca003a2 Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-18 11:29:25 -05:00
Ben Liblit 9a3ecd6ab9 Disable some Eclipse warnings on Java test inputs
I think these were previously not being compiled at all.  Now, with
Buildship generating Eclipse ".project" settings automatically, these
are being processed.  In general we don't care much about questionable
code in test data, though.
2018-04-18 11:29:25 -05:00
Ben Liblit 89860b53bb Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-18 11:29:25 -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 310ef1daa5 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-18 11:29:25 -05:00
Ben Liblit 8d0f64f3c6 Update Gradle wrapper to latest version (4.4.1) 2018-04-18 11:29:25 -05:00
Sungho Lee 3984cd0001 Fill the dynamic library path for OSX 2018-04-18 11:29:25 -05:00
Sungho Lee c1f6b70eb0 Fill the dynamic library path for OSX 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
Sungho Lee 9084cb9ad3 Check Java version 2018-04-18 11:29:25 -05:00
Sungho Lee 6bc547a48b Remove unused dependencies 2018-04-18 11:29:25 -05:00
Ben Liblit 69a67fe7ec Better handling of OS- and architecture-specific JDK paths 2018-04-18 11:29:25 -05:00
Ben Liblit 0500d237f9 Add various test resource directories
Unfortunately these tests are still not finding their resources
properly at test run time.  I don't know why.  It seems to have
something to do with how the tests instantiate and use class loaders.
I'm probably going to need expert help with this.
2018-04-18 11:29:25 -05:00
Ben Liblit 7fc607cc1c Dependency tweaks suggested by Gradle linter 2018-04-18 11:29:25 -05:00
Ben Liblit 3d973e9d61 Find the "xlator_test" shared library at test run time
Dependencies are still not set properly here, so you need to have
built the shared library ("./gradlew xlator_testSharedLibrary") before
running the ":com.ibm.wala.cast.test:test" test task.  But at least
the tests do now find and load that shared library properly.
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 0704a66ab1 Cleaner way to form colon-deliminated search path from list of paths 2018-04-18 11:29:25 -05:00
Ben Liblit 0f69db6fe3 Cleaner approach to augmenting Javadoc classpath 2018-04-18 11:29:25 -05:00
Ben Liblit 01a4fe025e Start getting some unit tests to pass
The main requirement here is to arrange for the proper classpath
settings when tests are running so that they can find any associated
resources (i.e., other supporting files).
2018-04-18 11:29:25 -05:00
Ben Liblit 04d9397a1d Tweak classpath for some Javadoc build tasks
This comes up when the Javadoc comments refer to classes in other
subprojects that the corresponding Java code did not actually depend
upon.
2018-04-18 11:29:25 -05:00
Ben Liblit e52c8d981d Declare common library dependencies for source sets, not binaries
No sense repeating this for each binary when it's the same for all of
them.
2018-04-18 11:29:25 -05:00
Ben Liblit b9e712bfa9 Add a second native library and a native executable 2018-04-18 11:29:25 -05:00
Ben Liblit 43a482dfae Add Gradle logic for building a native library
This approach uses no external makefiles; it's pure Gradle.  Nice!
2018-04-18 11:29:25 -05:00
Ben Liblit 6007b11c3f Compile test code, but don't run it for now
The tests are currently broken due to some sort of problem using class
loaders to find supporting resources.  Until I figure this out, better
to have Travis-CI verify only the things we think work.
2018-04-18 11:29:25 -05:00
Ben Liblit 377d7586ef Consistently use simple sorted order for dependencies
This isn't even sorting by library or subproject name.  It's just a
dumb textual sort of the contents of each line.
2018-04-18 11:29:25 -05:00
Ben Liblit db2d34b60d Leave Gradle linter turned on by default, now that it's quieter 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 a56a3616dc Selectively disable some Gradle linter rules
Specifically, we're not really in a position now to deal with
duplicated classes among our dependencies.  Maybe we can try harder to
examine those in the future, but for now they are a distraction from
other issues that we can attack more readily.
2018-04-18 11:29:25 -05:00
Ben Liblit 9cd5d2ba56 Split generic Java setup from OSGi substitution setup 2018-04-18 11:29:25 -05:00
Ben Liblit 1ca17e93be Automated Gradle-driven download of JLex test input 2018-04-18 11:29:25 -05:00
Ben Liblit 9664b1e5b3 Disable Javadoc linter for now
Some of the linter's checks produce failures (errors) when Gradle
builds the Javadoc documentation.  Fixing them isn't really a Gradle
issue, though, so I don't want to deal with them now.
2018-04-18 11:29:24 -05:00
Ben Liblit 18495ab44d Improve documentation for broad sections of top-level build script 2018-04-18 11:29:24 -05:00
Ben Liblit 9e905c7a04 More Gradle dependency clean-ups suggested by linter
Unfortunately the linter does not reach a fixpoint if you keep trying
to apply its suggestions.  If you include "compile
'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214'" in
the dependencies for "com.ibm.wala.ide.jdt", then the linter tells you
that this dependency is unused and can be removed.  If you remove it,
then the linter tells you that it should be added.  Sigh.
2018-04-18 11:29:24 -05:00
Ben Liblit b3dbdd3357 Fix a tricky cross-subproject Javadoc dependency
By default, each subproject's Javadoc task depends on the same
subproject's Java compilation task, and uses the same classpath.
Thus, any classes that some Java code uses will also be visible when
building the same Java code's documentation.

In this case, we need to see one of the "com.ibm.wala.core" classes in
order to build the "com.ibm.wala.util" documentation.  However, we
cannot have Java compilation of "com.ibm.wala.util" depend on Java
compilation of "com.ibm.wala.core", because that would create a
dependency cycle.  So we need to add this as a special dependency just
for the "com.ibm.wala.util" documentation task, and add the
appropriate classpath as well.

I'm quite proud of myself for figuring out how to do this properly.
2018-04-18 11:29:24 -05:00
Ben Liblit ad60605fe8 In Travis-CI, test Maven and Gradle separately and concurrently
This should help identify cases where the Gradle build only works if
it runs before or after a Maven build.  It will also help us recognize
any Maven regressions accidentally introduced by our Gradle work.
2018-04-18 11:29:24 -05:00
Ben Liblit dec3b8f15b Add a Gradle linter to help me write clean build configurations
The linter does not run by default.  To activate it, use "./gradlew
autoLintGradle".
2018-04-18 11:29:24 -05:00
Ben Liblit 2ef04905c2 Additional explicit dependencies suggested by Gradle linter 2018-04-18 11:29:24 -05:00
Ben Liblit eac47334ca Automated Gradle-driven download of AJAXSLT test inputs
I'm not sure that I am doing this in the best way possible.  But it
seems to be working.  Refinements are welcome!
2018-04-18 11:29:24 -05:00
Ben Liblit 2716731357 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 209c1d25c6 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit cd304237ea Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 8e5415e3db Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit 25a52254f5 Add Gradle build script for a subproject that previously had none 2018-04-18 11:29:24 -05:00
Ben Liblit f41baeb0f8 Add a direct dependency that previously we picked up transitively 2018-04-18 11:29:24 -05:00
Ben Liblit cebf14c8c5 Run a Gradle build after the Maven build
Eventually I'll want to swap that order, so that we know that Gradle
builds work even without any help from Maven build setup logic.  For
now, though, I just want to test whether the Gradle build works at
all.
2018-04-18 11:29:24 -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 b4fa7f425b Support the gradlew build 2018-04-18 11:29:24 -05:00