plugins { id 'java' id 'org.springframework.boot' version '3.4.1' id 'io.spring.dependency-management' version '1.1.7' } group = 'com.mailserver' version = '0.0.1-SNAPSHOT' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenCentral() } dependencies { // WebFlux — реактивный HTTP сервер на Netty implementation 'org.springframework.boot:spring-boot-starter-webflux' // R2DBC — реактивный доступ к PostgreSQL (вместо JPA/Hibernate) implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' implementation 'org.springframework.boot:spring-boot-starter-validation' // health для проверки контейнера (только /actuator/health) implementation 'org.springframework.boot:spring-boot-starter-actuator' // SMTP сервер на Spring — встроенный, без внешних зависимостей implementation 'org.eclipse.angus:angus-mail:2.0.3' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.security:spring-security-crypto' implementation 'io.jsonwebtoken:jjwt-api:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6' // Bouncy Castle — криптография для DKIM подписи и верификации implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1' implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1' // DKIM: подпись исходящих (simple-java-mail) и проверка входящих (Apache James jDKIM) implementation 'org.simplejavamail:utils-mail-dkim:3.4.0' implementation 'org.apache.james.jdkim:apache-jdkim-library:0.5' // DNS: MX-записи для доставки implementation 'dnsjava:dnsjava:3.6.3' // R2DBC PostgreSQL драйвер runtimeOnly 'org.postgresql:r2dbc-postgresql:1.0.4.RELEASE' // Flyway — миграции базы данных (требует JDBC драйвер) implementation 'org.flywaydb:flyway-database-postgresql' runtimeOnly 'org.postgresql:postgresql' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'com.icegreen:greenmail:2.1.15' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } // only the executable jar (the plain jar would make two files in build/libs) tasks.named('jar') { enabled = false } tasks.named('test') { useJUnitPlatform() }