This commit is contained in:
2026-04-10 15:26:51 +03:00
parent a8a2239d37
commit 5821006bf2
68 changed files with 3292 additions and 19 deletions

View File

@@ -16,7 +16,7 @@ repositories {
val vertxVersion = "5.0.10"
val mainVerticleName = "com.example.starter.MainVerticle"
val mainVerticleName = "su.xserver.iikocon.MainVerticle"
val launcherClassName = "io.vertx.launcher.application.VertxApplication"
application {
@@ -32,7 +32,21 @@ dependencies {
implementation("io.vertx:vertx-health-check")
implementation("io.vertx:vertx-web")
implementation("io.vertx:vertx-mysql-client")
implementation("io.vertx:vertx-redis-client")
implementation("io.vertx:vertx-web-sstore-redis")
implementation("io.vertx:vertx-mail-client")
// https://mvnrepository.com/artifact/org.mindrot/jbcrypt
implementation("org.mindrot:jbcrypt:0.4")
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation("org.slf4j:slf4j-api:2.0.17")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j2-impl
implementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.25.3")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementation("org.apache.logging.log4j:log4j-core:2.25.3")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
implementation("org.apache.logging.log4j:log4j-api:2.25.3")
}
java {
@@ -58,3 +72,40 @@ tasks.withType<Test> {
tasks.withType<JavaExec> {
args = listOf(mainVerticleName)
}
tasks.register("collectAllDependencies") {
group = "project"
description = "Сбор всех зависимостей для офлайн работы"
doLast {
val outDir = File("${rootDir}/libs")
outDir.mkdirs()
val allArtifacts = configurations
.filter { it.isCanBeResolved }
.flatMap { config ->
config.resolvedConfiguration.lenientConfiguration.allModuleDependencies.flatMap { dep ->
dep.allModuleArtifacts
}
}
// ❗ Исключаем артефакты локальных проектов (например, :library)
.filterNot { artifact ->
artifact.id.componentIdentifier.displayName.startsWith("project ")
}
.distinctBy { it.file.name }
allArtifacts.forEach { artifact ->
val outFile = outDir.resolve(artifact.file.name)
if (!outFile.exists() && artifact.file.exists()) {
println("⬇️ Copying ${artifact.moduleVersion.id.group}:${artifact.name}:${artifact.moduleVersion.id.version} ...")
artifact.file.inputStream().use { input ->
outFile.outputStream().use { output ->
input.copyTo(output)
}
}
}
}
println("✅ All dependencies are collected in \"libs\"")
}
}