plugins {
	id 'org.springframework.boot' version '3.2.1'
	id "io.spring.dependency-management" version "1.1.4"
	id 'java'
	id 'war'
	id 'eclipse'
	id 'application'
}

group = 'de.jottyfan.camporganizer'
version = '0.7.5'

description = """CampOrganizer2"""

sourceCompatibility = 17
targetCompatibility = 17

mainClassName = "de.jottyfan.camporganizer.Main"

repositories {
	mavenCentral()
	maven {
		url "https://www.jottyfan.de/libs/"
	}
  maven {
    url "https://repo.maven.apache.org/maven2"
  }
}

war {
  doFirst {
    manifest {
      attributes("Implementation-Title": project.name,
		             "Implementation-Version": version,
		             "Implementation-Timestamp": new Date())
    }
  }
  baseName = project.name
  version = version
  archiveName = 'CampOrganizer2.war'
}

dependencies {
  implementation 'org.jooq:jooq:3.19.1'
	implementation 'de.jottyfan:COJooq:2024.02.23'

	implementation 'org.apache.logging.log4j:log4j-api:2.22.0'
	implementation 'org.apache.logging.log4j:log4j-core:2.22.0'
	implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.22.0'

	implementation 'org.webjars:bootstrap:5.3.2'
	implementation 'org.webjars:font-awesome:6.5.1'
	implementation 'org.webjars:jquery:3.7.1'
	implementation 'org.webjars:popper.js:2.11.7'
  implementation 'org.webjars:datatables:1.13.5'
  implementation 'org.webjars:select2:4.0.13'

  implementation 'net.sf.biweekly:biweekly:0.6.7'

	// for using the keycloak rest interface
	implementation 'org.keycloak:keycloak-server-spi:23.0.3'
	implementation 'org.keycloak:keycloak-admin-client:23.0.3'
	implementation 'org.jboss.resteasy:resteasy-client:6.2.6.Final'

	// backward compatibility until the complete registration is converted to keycloak
	implementation 'org.jasypt:jasypt:1.9.3'

	// rss support
	implementation 'com.rometools:rome:2.1.0'

	// mail support
	implementation 'commons-validator:commons-validator:1.8.0'
	implementation 'org.springframework.boot:spring-boot-starter-mail'

	implementation 'org.springframework.boot:spring-boot-starter-jooq'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
	implementation 'org.springframework.security:spring-security-oauth2-authorization-server:1.2.1'
	implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
	implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.3.0'

	implementation 'commons-io:commons-io:2.15.1'

	runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testImplementation 'org.springframework.security:spring-security-test'
}

test {
	useJUnitPlatform()
}

// add version to manifest
springBoot {
  buildInfo()
}
