add 'bundle' configuration to gradle to bundle dependency in jar
This commit is contained in:
parent
aa52d8439f
commit
b7f4aea38d
13
build.gradle
13
build.gradle
@ -14,12 +14,25 @@ jar{
|
|||||||
'Main-Class': mainClassName
|
'Main-Class': mainClassName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
from {
|
||||||
|
configurations.bundle.filter{
|
||||||
|
it.exists()
|
||||||
|
}.collect {
|
||||||
|
it.isDirectory() ? it : zipTree(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
bundle
|
||||||
|
implementation.extendsFrom(bundle)
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.json:json:20220924'
|
implementation 'org.json:json:20220924'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||||
|
Loading…
Reference in New Issue
Block a user