plugins {
	id 'java'
	id 'org.springframework.boot' version '3.2.7-SNAPSHOT'
	id 'io.spring.dependency-management' version '1.1.5'
}

group = 'com.onion'
version = '0.0.1-SNAPSHOT'

java {
	sourceCompatibility = '21'
}

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
	maven { url 'https://repo.spring.io/snapshot' }
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
	runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
	runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
	implementation 'mysql:mysql-connector-java:8.0.32'
	implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
	implementation 'com.zaxxer:HikariCP:5.0.1'
	// elastic search
	implementation 'org.springframework.boot:spring-boot-starter-webflux'

	// Add Redis support
	implementation 'org.springframework.boot:spring-boot-starter-data-redis'

	// mongodb
	implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'

	// Spring Batch
	implementation 'org.springframework.boot:spring-boot-starter-batch'

	// rabbitMQ
	implementation 'org.springframework.boot:spring-boot-starter-amqp'

	compileOnly 'org.projectlombok:lombok'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

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