plugins {
	id 'java'
	id 'org.springframework.boot' version '3.1.1'
	id 'io.spring.dependency-management' version '1.1.0'
	id 'org.jetbrains.kotlin.jvm'
	id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0'
	
}

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

java {
}

repositories {
	mavenCentral()
	maven {
		url 'https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/'
	}
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-data-ldap'
	implementation 'org.springframework.boot:spring-boot-starter-mail'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-log4j2'	
	implementation 'org.springframework.security:spring-security-ldap'
	implementation 'org.liquibase:liquibase-core'
	implementation 'com.google.code.gson:gson:2.8.5'
    implementation("org.apache.pdfbox:pdfbox:2.0.29")
    implementation("org.apache.pdfbox:fontbox:2.0.34")

//	// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
//	implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8")

	implementation group: 'org.springframework.cloud', name: 'spring-cloud-context', version: '4.2.1'

	implementation group: 'com.google.zxing', name: 'core', version: '3.5.2'
	implementation group: 'com.google.zxing', name: 'javase', version: '3.5.2'

	implementation("net.sf.jasperreports:jasperreports:6.21.0") {
		exclude group: "com.fasterxml.jackson.dataformat", module: "jackson-dataformat-xml"
	}
	implementation group: 'net.sf.jasperreports', name: 'jasperreports-fonts', version: '6.21.0'
	implementation group: 'org.mozilla', name: 'rhino', version: '1.7.14'

	implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
	implementation group: 'org.apache.poi', name: 'poi', version: '5.2.3'
	implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.3'

	implementation group: 'jakarta.persistence', name: 'jakarta.persistence-api', version: '3.1.0'
	implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '2.1.1'
	implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: '3.0.2'
	implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.15.2'
	implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.2'
	implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: '2.15.2'

	implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'
	implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5'
	implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5'

	implementation group: 'org.freemarker', name: 'freemarker', version: '2.3.32'

//	implementation("org.mapstruct:mapstruct:1.6.3")
//	implementation("org.mapstruct:mapstruct-processor:1.6.3")

	implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
	implementation "org.jetbrains.kotlin:kotlin-reflect"

	implementation("org.springframework.boot:spring-boot-starter-webflux")
	implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
	compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '6.0.0'

	implementation("org.jsoup:jsoup:1.20.1")
	implementation("com.itextpdf:html2pdf:6.2.0")

	runtimeOnly 'com.mysql:mysql-connector-j'

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

configurations {
	configureEach {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
    }
}
kotlin {
	jvmToolchain(17)
}

bootRun {
	// Use db-local profile by default so datasource is loaded (application-db-local.yml).
	// Override with: ./gradlew bootRun --args='--spring.profiles.active=prod'
	if (!project.hasProperty('spring.profiles.active')) {
		args '--spring.profiles.active=db-local'
	}
}
