Commit Graph

70 Commits

Author SHA1 Message Date
Chris Beams 2165bd506e
Avoid transitive dependency on various logging libs
Use Spring's `propdeps` plugin to introduce optional/provided scopes for
gradle dependencies. Mark libraries such as slf4j-log4j12 as optional.
These libraries are required to run a local ethereumj node, but they are
not required in order to compile against ethereumj in a downstream
appliaction. These libraries easily can cause conflicts, for example if
another slf4j-* library (such as slf4j-logback) is on the classpath.
2015-01-05 18:52:34 +01:00
Chris Beams b977605771
Declare concrete slf4j logging deps as runtime-scoped 2015-01-05 15:12:51 +01:00
Chris Beams aa7191d4a6
Re-enable publication of coverage reports
Prior to this commit, jacoco coverage report XML files were not actually
being written to disk, meaning that the Gradle coveralls plugin had
nothing to publish to https://coveralls.io/r/ethereum/ethereumj. HTML
reports are now being written as well, for convenient local browsing.
2014-12-30 20:52:25 +01:00
Chris Beams addbcdeb09
Publish core artifacts continuously via Travis CI
The Travis CI build now publishes ethereumj-core artifacts (classes,
sources and javadoc jars) on every push to master. See updated
ethereumj-core/README.md for details. Note that the `gradle release`
task has been renamed to `gradle publish`.
2014-12-30 20:49:18 +01:00
Chris Beams 936de35cff
Restore JDK 8 source compatibility in ethereumj-studio
This partially reverts commit c95f5ea, restoring use of Java 8 language
features and APIs to ethereumj-studio, while leaving etherumj-core
pinned to the Java 7 language level for Dalvik compatibility reasons.
For further details, see the prior commit and
https://github.com/ethereum/ethereumj/commit/c95f5ea#commitcomment-9119435.
2014-12-30 20:09:20 +01:00
Chris Beams a155518b41
Polish whitespace and imports
As part of pull request #179, commits 0d922e1, 003249c and d099100
introduced use of Java 8 language features and APIs. Commit c95f5ea
manually reverted these changes (see #184 as to why), but in the process
re-introduced formatting issues originally cleaned up by other commits
in #179. This change fixes those formatting issues.

 - Replace leading tabs with spaces (for reasons detailed in 0827fb5)
 - Add space before opening curly brace
 - Optimize imports using shared .idea/codeStyleSettings.xml (note
   especially expansion of wildcard imports. See rationale in 780393d)
 - Do not align assignments on equals sign
 - Remove unnecessary additional newlines
 - Remove braces from single-line loops and conditionals
2014-12-30 19:28:19 +01:00
Roman Mandeleil c95f5ea75f reverting for java7 2014-12-30 13:45:16 +02:00
Chris Beams be51e4d958
Publish artifacts to oss.jfrog.org and Bintray
See updates to ethereumj-core/README.md for details.
2014-12-29 16:43:37 +01:00
Chris Beams 8089f6e57c Polish whitespace and imports
- Replace leading tabs with spaces
 - Add space before opening curly brace
 - Optimize imports using shared .idea/codeStyleSettings.xml
 - Do not align assignments on equals sign
 - Remove unnecessary extra newlines
2014-12-29 10:34:50 +01:00
Roman Mandeleil 364e774d4e + unicode for javadoc 2014-12-28 23:28:16 +02:00
Chris Beams 90592dc267
Build -sources and -javadoc jars
Running `gradle build` within ethereumj-core will now produce -sources
and -javadoc jars in `build/libs`, alongside the already existing
classes jar. Run `gradle install` to install these artifacts to the
local `~/.m2` repository.
2014-12-27 14:50:22 +01:00
Chris Beams 687c27e54b
Configure javadoc to ignore 'missing' warnings
This change ensures that all Javadoc syntax, reference, html errors, etc
are reported at the commandline during the gradle build, but warnings
for missing Javadoc elements (e.g. no @return tag, @param tags, etc) are
suppressed. `man javadoc` for details.
2014-12-27 14:50:21 +01:00
Chris Beams 4845f2bd00
Configure Gradle javadoc task
Run with `gradle javadoc` and see output in `build/docs/javadoc'.
2014-12-27 14:50:21 +01:00
Chris Beams 75443aaa13
Support running ethereumj-studio as executable jar
See updated ethereumj-studio/README.md for details. Note that this
commit removes the `build-post-package.xml` ant file (for now) to
simplify the Gradle arrangement. This functionality can be re-introduced
later and more simply using Gradle's native DSL. In the meantime, both
the -core and -studio projects can be run using `gradle run` or run as
executable jars by running `gradle shadowJar` followed by the usual
`java -jar` execution of the resulting `-all` jar file found in each
project's respective `build/libs` directory.
2014-12-27 01:44:25 +01:00
Chris Beams 0900039bdd
Introduce top-level Gradle build
- Convert ethereumj-studio build from Maven to Gradle as well
 - Extract common build elements to top-level build.gradle
 - Update top-level README accordingly
2014-12-27 01:44:24 +01:00
Chris Beams e4ff767f45
Support installation of artifacts to local maven repo
Apply Gradle's 'maven' plugin in order to support `./gradlew install`
task, similar to `mvn install` for building and copying artifacts to the
users local ~/.m2 repository.
2014-12-26 21:50:15 +01:00
Chris Beams f845a3b751
Eliminate dependency on antlr4 Maven plugin
After porting the build from Maven to Gradle (see prior commits), the
org.ethereum.serpent.ParserGenerator class is no longer necessary as the
configuration of the antlr compiler that happened in this class now
happens directly in build.gradle. This class is thus removed in this
commit.

The plexus FileUtils class introduced by the antlr4 Maven plugin had
also been used in several locations in the codebase, probably just for
reasons of convenience. These uses have been replaced with Spring's
FileSystemUtils in order to allow for dropping the dependency on the
antlr4 Maven plugin entirely.
2014-12-26 21:49:01 +01:00
Chris Beams f9bcd2abad
Resolve JUnit 4.10 vs. 4.11 classpath conflict
ethereumj-core depends on elements specific to the JUnit 4.11 API, but (for
reasons that can only be assumed dubious) json-simple:1.1.1 transitively
includes JUnit 4.10. At the command line, Gradle handles this cleanly,
and gives ethereumj-core's direct dependence on 4.11 the precedence it
deserves. However, IDEA gets confused and gives 4.10 precedence. This
change explicitly excludes the transitive dependency from
json-simple->junit:4.10, eliminating the issue completely.
2014-12-26 21:49:00 +01:00
Chris Beams 2a8ecab299
Introduce src/gen/java for generated sources
Previously, sources generated from the serpent antlr grammar in
ethereumj-core/src/main/antlr4 were output into the build/generated-src
directory by default. This worked from the command line without issue,
but caused issues within IDEA, because the entirety of the 'build'
directory is excluded from compilation by default when working with a
Gradle-based project in IDEA.

This change simplifies the arrangement by writing these antlr-generated
sources to the src/gen/java. A .gitignore file has been added to ensure
that transient source files don't accidentally get checked in. A readme
file has been added to explain the situation to the uninitiated.
2014-12-26 21:49:00 +01:00
Chris Beams 996e98d5cc
Port build from Maven to Gradle 2014-12-26 21:48:59 +01:00