2021-04-17 19:55:00 -04:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2021-03-23 18:32:21 -04:00
|
|
|
group = "dev.fyloz.colorrecipesexplorer"
|
2020-10-08 23:14:43 -04:00
|
|
|
|
2022-04-15 14:03:41 -04:00
|
|
|
val kotlinVersion = "1.6.20"
|
2021-12-22 15:42:48 -05:00
|
|
|
val springBootVersion = "2.6.1"
|
2021-05-06 21:36:25 -04:00
|
|
|
|
2020-10-08 23:14:43 -04:00
|
|
|
plugins {
|
2021-05-06 21:36:25 -04:00
|
|
|
// Outer scope variables can't be accessed in the plugins section, so we have to redefine them here
|
2022-04-15 14:03:41 -04:00
|
|
|
val kotlinVersion = "1.6.20"
|
2021-12-22 15:42:48 -05:00
|
|
|
val springBootVersion = "2.6.1"
|
2021-05-06 21:36:25 -04:00
|
|
|
|
2020-10-08 23:14:43 -04:00
|
|
|
id("java")
|
2021-05-06 21:36:25 -04:00
|
|
|
id("org.jetbrains.kotlin.jvm") version kotlinVersion
|
2022-04-15 14:03:41 -04:00
|
|
|
id("org.jetbrains.dokka") version "1.6.10"
|
2021-05-06 21:36:25 -04:00
|
|
|
id("org.springframework.boot") version springBootVersion
|
|
|
|
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion
|
|
|
|
id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2021-03-04 17:26:26 -05:00
|
|
|
|
|
|
|
maven {
|
2021-10-12 21:45:21 -04:00
|
|
|
url = uri("https://archiva.fyloz.dev/repository/internal")
|
2021-03-04 17:26:26 -05:00
|
|
|
}
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-05-06 21:36:25 -04:00
|
|
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom:${kotlinVersion}"))
|
2021-12-22 15:42:48 -05:00
|
|
|
|
|
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1")
|
2022-04-15 14:03:41 -04:00
|
|
|
implementation("dev.fyloz.colorrecipesexplorer:database-manager:6.2")
|
2022-02-12 14:48:58 -05:00
|
|
|
implementation("dev.fyloz:memorycache:1.0")
|
2021-12-22 15:42:48 -05:00
|
|
|
implementation("io.github.microutils:kotlin-logging-jvm:2.1.21")
|
2021-08-23 19:05:50 -04:00
|
|
|
implementation("io.jsonwebtoken:jjwt-api:0.11.2")
|
2021-08-28 14:16:28 -04:00
|
|
|
implementation("io.jsonwebtoken:jjwt-impl:0.11.2")
|
|
|
|
implementation("io.jsonwebtoken:jjwt-jackson:0.11.2")
|
2021-12-22 15:42:48 -05:00
|
|
|
implementation("javax.xml.bind:jaxb-api:2.3.0")
|
2020-11-17 14:53:02 -05:00
|
|
|
implementation("org.apache.poi:poi-ooxml:4.1.0")
|
|
|
|
implementation("org.apache.pdfbox:pdfbox:2.0.4")
|
2021-12-22 15:42:48 -05:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
2020-10-08 23:14:43 -04:00
|
|
|
|
2021-05-06 21:36:25 -04:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-validation:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}")
|
|
|
|
implementation("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
|
2020-10-15 23:38:13 -04:00
|
|
|
|
2020-11-17 14:53:02 -05:00
|
|
|
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
|
2021-12-31 14:56:38 -05:00
|
|
|
testImplementation("io.mockk:mockk:1.12.1")
|
2021-12-22 15:42:48 -05:00
|
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test:${kotlinVersion}")
|
|
|
|
testImplementation("org.mockito:mockito-inline:3.11.2")
|
|
|
|
testImplementation("org.springframework:spring-test:5.3.13")
|
2021-05-06 21:36:25 -04:00
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
|
|
|
|
testImplementation("org.springframework.boot:spring-boot-test-autoconfigure:${springBootVersion}")
|
2020-10-08 23:14:43 -04:00
|
|
|
|
|
|
|
runtimeOnly("com.h2database:h2:1.4.199")
|
2020-12-23 14:45:21 -05:00
|
|
|
runtimeOnly("mysql:mysql-connector-java:8.0.22")
|
2021-03-04 17:26:26 -05:00
|
|
|
runtimeOnly("org.postgresql:postgresql:42.2.16")
|
|
|
|
runtimeOnly("com.microsoft.sqlserver:mssql-jdbc:9.2.1.jre11")
|
2022-02-12 14:48:58 -05:00
|
|
|
|
|
|
|
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}")
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
|
2021-05-28 18:18:01 -04:00
|
|
|
springBoot {
|
|
|
|
buildInfo()
|
|
|
|
}
|
|
|
|
|
2020-10-08 23:14:43 -04:00
|
|
|
java {
|
2021-12-31 14:56:38 -05:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2020-11-17 14:53:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java
|
|
|
|
kotlin
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
kotlin
|
|
|
|
}
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
2021-12-31 14:56:38 -05:00
|
|
|
|
|
|
|
jvmArgs("-XX:+ShowCodeDetailsInExceptionMessages")
|
2020-10-08 23:14:43 -04:00
|
|
|
testLogging {
|
2021-03-08 13:56:59 -05:00
|
|
|
events("skipped", "failed")
|
2021-12-31 14:56:38 -05:00
|
|
|
setExceptionFormat("full")
|
|
|
|
}
|
|
|
|
|
|
|
|
reports {
|
|
|
|
junitXml.required.set(true)
|
|
|
|
html.required.set(false)
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-17 19:55:00 -04:00
|
|
|
tasks.withType<JavaCompile>() {
|
2021-12-31 16:04:09 -05:00
|
|
|
options.compilerArgs.addAll(arrayOf("--release", "17"))
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
2021-04-17 19:55:00 -04:00
|
|
|
tasks.withType<KotlinCompile>().all {
|
2021-03-09 14:08:57 -05:00
|
|
|
kotlinOptions {
|
2022-01-01 18:01:59 -05:00
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
2021-04-17 19:55:00 -04:00
|
|
|
freeCompilerArgs = listOf(
|
2021-05-06 21:36:25 -04:00
|
|
|
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
|
|
|
"-Xinline-classes"
|
2021-04-17 19:55:00 -04:00
|
|
|
)
|
2021-03-09 14:08:57 -05:00
|
|
|
}
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.dokkaHtml {
|
2020-11-17 14:53:02 -05:00
|
|
|
outputDirectory.set(rootDir.resolve("dokka"))
|
2020-10-08 23:14:43 -04:00
|
|
|
}
|