Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Excluding decompiler related features from spoon-core #2766

Merged
merged 23 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ env:
global:
- M2_HOME="/usr/local/maven"
matrix:
- SCRIPT=travis-jdk9.sh
- SCRIPT=travis-jdk8.sh
- SCRIPT=travis-jdk9.sh
- SCRIPT=travis-jdk10.sh
- SCRIPT=travis-coverage.sh
- SCRIPT=travis-verify.sh
- SCRIPT=travis-maven339-jdk8.sh
- SCRIPT=travis-jdk10.sh
- SCRIPT=travis-spoon-decompiler.sh

install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -B -V
script: ./chore/travis/$SCRIPT

cache:
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,6 @@ CtClass l = Launcher.parseClass("class A { void m() { System.out.println(\"yeah\

Some examples about the usage of Spoon can be found on [spoon-examples](https://github.com/SpoonLabs/spoon-examples).

:warning: We introduced in Spoon 7.1.0 an external dependency that is not available on Maven Central.
nharrand marked this conversation as resolved.
Show resolved Hide resolved
In order to use it properly, please add also the following repository in your pom:

```
<repositories>
<repository>
<id>inria</id>
<name>triskell-public-release</name>
<url>http://maven.inria.fr/artifactory/triskell-public-release</url>
</repository>
</repositories>
```


## Contributing in 2 seconds

Create your first pull-request to improve the documentation, see [doc](https://github.com/INRIA/spoon/tree/master/doc)! Proceed with your first bug fix! The community is open-minded, respectful and patient. All external contributions are welcome.
Expand Down
4 changes: 2 additions & 2 deletions chore/travis/travis-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

# This script computes and publish (through coveralls) the coverage of Spoon
# It is meant to berun on TravisCI
# It is meant to be run on TravisCI
#
# Note thet Coveralls/Jacoco does not work on JDK9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112

source /opt/jdk_switcher/jdk_switcher.sh

jdk_switcher use oraclejdk8 && mvn test jacoco:report && mvn coveralls:report -Pcoveralls --fail-never
jdk_switcher use oraclejdk8 && mvn -Pcoveralls test jacoco:report coveralls:report --fail-never
19 changes: 19 additions & 0 deletions chore/travis/travis-spoon-decompiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# CI for the spoon-decompiler module

# fails if anything fails
set -e

source /opt/jdk_switcher/jdk_switcher.sh

jdk_switcher use oraclejdk9

cd spoon-decompiler

mvn test

mvn verify license:check site javadoc:jar install -DskipTests -DadditionalJOption=-Xdoclint:none

# checkstyle in src/tests
mvn checkstyle:checkstyle -Pcheckstyle-test
1 change: 1 addition & 0 deletions doc/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ public class InsertPrintTransformer implements TypeTransformer {
}
}
```
:warning: The `SpoonClassFileTransformer` feature (and all features relying on decompilation) are not included in `spoon-core` but in `spoon-bytecode`. If you want to use them you should declare a dependency to `spoon-bytecode`.
2 changes: 2 additions & 0 deletions doc/launcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Spoon provides two out of the shelf decompilers, CFR by default, and Fernflower.
JarLauncher launcher = new JarLauncher("<path_to_jar>", "<path_to_output_src_dir>", "<path_to_pom>", new FernflowerDecompiler(new File("<path_to_output_src_dir>/src/main/java")));
```

:warning: The `JarLauncher` feature (and all features relying on decompilation) are not included in `spoon-core` but in `spoon-bytecode`. If you want to use them you should declare a dependency to `spoon-bytecode`.

## About the classpath

Spoon analyzes source code. However, this source code may refer to libraries (as a field, parameter, or method return type). There are two cases:
Expand Down
Loading