plugins {
	id 'java'
	id 'org.springframework.boot' version '3.5.6'
	id 'io.spring.dependency-management' version '1.1.7'
}

group = 'ru.soune'
version = '0.0.1-SNAPSHOT'

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(21)
	}
}

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
	flatDir {
		dirs 'libs'
	}
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.security:spring-security-crypto:6.5.3'
	implementation 'org.mapstruct:mapstruct:1.5.5.Final'
	implementation 'commons-validator:commons-validator:1.7'
	implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '4.0.1'
	implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.17.2'
	implementation group: 'com.google.cloud', name: 'google-cloud-vision', version: '3.55.0'
	implementation group: 'com.google.api-client', name: 'google-api-client', version: '2.7.2'

	implementation 'org.flywaydb:flyway-core:9.22.0'

	implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.0'
	implementation 'tools.jackson.core:jackson-core:3.0.3'
	implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'

	annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
	annotationProcessor 'org.projectlombok:lombok'

	compileOnly 'org.projectlombok:lombok'

	developmentOnly 'org.springframework.boot:spring-boot-devtools'

	runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc'
	runtimeOnly 'com.mysql:mysql-connector-j'
	runtimeOnly 'org.postgresql:postgresql'

	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testImplementation 'org.mockito:mockito-core:5.3.1'
	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

	implementation name: 'testlib-fat-0.3.1-all'

	implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.12.0'

	implementation project(':referral')

}

tasks.named('test') {
	useJUnitPlatform()
}
