Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Issue #1078 Gradle Task to create executable fatJar #1080

Merged
merged 1 commit into from
May 22, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ git clone https://github.com/ethereum/ethereumj
cd ethereumj
cp ethereumj-core/src/main/resources/ethereumj.conf ethereumj-core/src/main/resources/user.conf
vim ethereumj-core/src/main/resources/user.conf # adjust user.conf to your needs
./gradlew clean shadowJar
./gradlew clean fatJar
java -jar ethereumj-core/build/libs/ethereumj-core-*-all.jar
```

Expand Down
10 changes: 10 additions & 0 deletions ethereumj-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ javadoc {
)
}

//create a single Jar with all dependencies
task fatJar(type: Jar) {
classifier = 'all'
manifest {
attributes 'Main-Class' : mainClassName
attributes 'Class-Path' : configurations.compile.collect { 'lib/' + it.getName() }.join(' ')
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
Expand Down