Files
mtusi2026lab3/build.gradle
T
2026-11-12 21:23:41 +03:00

34 lines
1.7 KiB
Groovy

plugins {
id 'java'
id 'org.springframework.boot' version '3.5.16'
}
group = 'ru.mtusi'
version = '2.0.0'
description = 'Lab 2 persistent messenger'
java { toolchain { languageVersion = JavaLanguageVersion.of(21) } }
repositories { mavenCentral() }
dependencies {
implementation platform('org.springframework.boot:spring-boot-dependencies:3.5.16')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
implementation 'org.postgresql:postgresql'
implementation 'org.springframework.security:spring-security-crypto'
implementation 'org.bouncycastle:bcprov-jdk18on:1.80'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
dependencyLocking { lockAllConfigurations(); lockMode = LockMode.STRICT }
tasks.withType(JavaCompile).configureEach { options.release = 21; options.encoding = 'UTF-8'; options.compilerArgs.add('-parameters') }
tasks.withType(AbstractArchiveTask).configureEach { preserveFileTimestamps = false; reproducibleFileOrder = true }
tasks.named('bootJar') { archiveFileName = 'messenger.jar' }
tasks.named('jar') { enabled = false }
tasks.named('test') { useJUnitPlatform(); maxHeapSize = '256m'; testLogging { events 'passed','skipped','failed'; exceptionFormat = 'full' } }
tasks.register('resolveDependencies') { doLast { configurations.findAll { it.canBeResolved }.each { it.resolve() } } }