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

group = 'com.psg.ldsysinfo'
version = '0.0.1-SNAPSHOT'

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

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
}

dependencies {
	// Spring Boot web dependency
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	implementation("org.springframework.boot:spring-boot-starter-logging")

	//InMemory stuff relies on this "part of the Java EE (Jakarta EE) specification, which was removed from the Java SE platform starting from Java 11."
	// For JAXB
	implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1' // Updated for Jakarta EE 9+
	implementation 'javax.xml.bind:jaxb-api:2.3.1'
	implementation 'jakarta.validation:jakarta.validation-api:3.0.0'

	implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
	implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
	implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'

	// Provides JWT decoding and signature validation for streamlining UserPrincipal related things
	implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'

	// Console streaming logfiles to frontend via webflux
	implementation 'org.springframework.boot:spring-boot-starter-webflux'

	// Spring Boot JPA with Hibernate
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

	// MySQL or other database driver
	implementation 'mysql:mysql-connector-java:8.0.29'  // or 'org.postgresql:postgresql' for PostgreSQL

	// Dependancy required for semantic version checking
	implementation 'org.apache.maven:maven-artifact:3.9.6'

	// Add support for Jackson to serialize the LocalDateTime for Device entity
	implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'

	// Email dependancy for SMTP
	implementation 'org.springframework.boot:spring-boot-starter-mail'

	// Caching with Caffeine
	implementation 'org.springframework.boot:spring-boot-starter-cache'
	implementation 'com.github.ben-manes.caffeine:caffeine'

	// Lombok (optional for reducing boilerplate)
	compileOnly 'org.projectlombok:lombok'
	annotationProcessor 'org.projectlombok:lombok'

	// Test dependencies
	testImplementation 'org.springframework.boot:spring-boot-starter-test'



}

