plugins {
	id 'java'
	id 'org.springframework.boot' version '3.1.5'
	id 'io.spring.dependency-management' version '1.1.3'
	id "com.github.node-gradle.node" version "7.0.1"
}

group = 'Team.5'
version = '0.0.1-SNAPSHOT'

java {
	sourceCompatibility = '17'
}

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-jdbc'
	implementation 'org.mariadb.jdbc:mariadb-java-client:2.1.2'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	testImplementation 'junit:junit:4.13.1'
    compileOnly 'org.projectlombok:lombok'
    testImplementation 'org.projectlombok:lombok:1.18.28'
    compileOnly 'org.projectlombok:lombok'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.1.RELEASE'
	// https://mvnrepository.com/artifact/org.webjars/openlayers
	implementation group: 'org.webjars', name: 'openlayers', version: '5.2.0'
}

tasks.named('bootBuildImage') {
	builder = 'paketobuildpacks/builder-jammy-base:latest'
}
test {
	useJUnitPlatform()
}

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

task myScript(type: NodeTask) {
	script = file('src/main/resources/static/scripts/mapAPI.js')
}