mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 16:01:52 +08:00
build: simplify dependencies move
This commit is contained in:
@@ -10,53 +10,43 @@ java {
|
|||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
val dependencyCoordinates = listOf(
|
||||||
create("cb110")
|
"commons-beanutils:commons-beanutils:1.10.0",
|
||||||
create("cb194")
|
"commons-beanutils:commons-beanutils:1.9.4",
|
||||||
create("cb183")
|
"commons-beanutils:commons-beanutils:1.8.3",
|
||||||
create("cb170")
|
"commons-beanutils:commons-beanutils:1.7.0",
|
||||||
create("cb161")
|
"commons-beanutils:commons-beanutils:1.6.1",
|
||||||
create("cc321")
|
"commons-collections:commons-collections:3.2.1",
|
||||||
create("cc40")
|
"org.apache.commons:commons-collections4:4.0"
|
||||||
}
|
)
|
||||||
|
|
||||||
|
val filesToCopy = objects.fileCollection().from(
|
||||||
|
dependencyCoordinates.map { coordinate ->
|
||||||
|
configurations.detachedConfiguration(dependencies.create(coordinate)).apply {}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"cb110"("commons-beanutils:commons-beanutils:1.10.0")
|
|
||||||
"cb194"("commons-beanutils:commons-beanutils:1.9.4")
|
|
||||||
"cb183"("commons-beanutils:commons-beanutils:1.8.3")
|
|
||||||
"cb170"("commons-beanutils:commons-beanutils:1.7.0")
|
|
||||||
"cb161"("commons-beanutils:commons-beanutils:1.6.1")
|
|
||||||
"cc321"("commons-collections:commons-collections:3.2.1")
|
|
||||||
"cc40"("org.apache.commons:commons-collections4:4.0")
|
|
||||||
|
|
||||||
implementation("com.caucho:hessian:4.0.66")
|
implementation("com.caucho:hessian:4.0.66")
|
||||||
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
|
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
|
||||||
testImplementation(libs.junit.jupiter)
|
testImplementation(libs.junit.jupiter)
|
||||||
testRuntimeOnly(libs.junit.platform.launcher)
|
testRuntimeOnly(libs.junit.platform.launcher)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val depDir = file("src/main/webapp/WEB-INF/dep")
|
||||||
|
|
||||||
tasks.war {
|
tasks.war {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
delete("src/main/webapp/WEB-INF/dep")
|
|
||||||
copy {
|
copy {
|
||||||
from(
|
from(filesToCopy)
|
||||||
configurations["cb110"],
|
into(depDir)
|
||||||
configurations["cb194"],
|
|
||||||
configurations["cb183"],
|
|
||||||
configurations["cb170"],
|
|
||||||
configurations["cb161"],
|
|
||||||
configurations["cc321"],
|
|
||||||
configurations["cc40"]
|
|
||||||
)
|
|
||||||
into("src/main/webapp/WEB-INF/dep")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.clean {
|
tasks.clean {
|
||||||
delete("src/main/webapp/WEB-INF/dep")
|
delete(depDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
|
|||||||
Reference in New Issue
Block a user