mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Add fatJar gradle task to create a single executable jar file
This commit is contained in:
parent
1fae09433d
commit
f884175748
2 changed files with 21 additions and 3 deletions
10
README.md
10
README.md
|
@ -81,15 +81,19 @@ dependencies. If you have a recent gradle version installed, you can replace `./
|
||||||
|
|
||||||
./gradlew build
|
./gradlew build
|
||||||
|
|
||||||
3a. Create shell wrapper in *build/install/signal-cli/bin*:
|
2a. Create shell wrapper in *build/install/signal-cli/bin*:
|
||||||
|
|
||||||
./gradlew installDist
|
./gradlew installDist
|
||||||
|
|
||||||
3b. Create tar file in *build/distributions*:
|
2b. Create tar file in *build/distributions*:
|
||||||
|
|
||||||
./gradlew distTar
|
./gradlew distTar
|
||||||
|
|
||||||
3c. Compile and run signal-cli:
|
2c. Create a fat tar file in *build/libs/signal-cli-fat*:
|
||||||
|
|
||||||
|
./gradlew fatJar
|
||||||
|
|
||||||
|
2d. Compile and run signal-cli:
|
||||||
|
|
||||||
./gradlew run --args="--help"
|
./gradlew run --args="--help"
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,17 @@ tasks.withType<Jar> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task("fatJar", type = Jar::class) {
|
||||||
|
archiveBaseName.set("${project.name}-fat")
|
||||||
|
exclude(
|
||||||
|
"META-INF/*.SF",
|
||||||
|
"META-INF/*.DSA",
|
||||||
|
"META-INF/*.RSA",
|
||||||
|
"META-INF/NOTICE",
|
||||||
|
"META-INF/LICENSE",
|
||||||
|
"**/module-info.class"
|
||||||
|
)
|
||||||
|
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
||||||
|
with(tasks.jar.get() as CopySpec)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue