2022-05-19 17:45:26 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2023-03-20 17:11:22 +01:00
|
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
|
2023-09-23 11:01:43 +02:00
|
|
|
id "io.freefair.lombok" version "8.3"
|
|
|
|
id "me.champeau.jmh" version "0.6.6"
|
2022-05-19 17:45:26 +02:00
|
|
|
}
|
|
|
|
|
2023-03-04 13:19:01 +01:00
|
|
|
group 'marginalia'
|
2022-05-19 17:45:26 +02:00
|
|
|
version 'SNAPSHOT'
|
2023-03-04 13:19:01 +01:00
|
|
|
|
2022-05-19 17:45:26 +02:00
|
|
|
compileJava.options.encoding = "UTF-8"
|
|
|
|
compileTestJava.options.encoding = "UTF-8"
|
|
|
|
|
2023-09-23 11:01:43 +02:00
|
|
|
subprojects.forEach {it ->
|
2024-01-05 13:19:59 +01:00
|
|
|
// Enable preview features for the entire project
|
2023-09-23 11:01:43 +02:00
|
|
|
it.tasks.withType(JavaCompile).configureEach {
|
|
|
|
options.compilerArgs += ['--enable-preview']
|
|
|
|
}
|
2023-09-24 11:31:17 +02:00
|
|
|
it.tasks.withType(JavaExec).configureEach {
|
|
|
|
jvmArgs += ['--enable-preview']
|
|
|
|
}
|
2023-09-23 11:01:43 +02:00
|
|
|
it.tasks.withType(Test).configureEach {
|
|
|
|
jvmArgs += ['--enable-preview']
|
|
|
|
}
|
2024-01-05 13:19:59 +01:00
|
|
|
|
|
|
|
// Enable reproducible builds for the entire project
|
|
|
|
it.tasks.withType(AbstractArchiveTask).configureEach {
|
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
}
|
2023-09-23 11:01:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'io.freefair.lombok'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation libs.lombok
|
|
|
|
testImplementation libs.lombok
|
|
|
|
annotationProcessor libs.lombok
|
|
|
|
|
|
|
|
lombok libs.lombok // prevent plugin from downgrading the version to something incompatible with '19
|
|
|
|
}
|
|
|
|
|
2023-10-04 12:46:22 +02:00
|
|
|
test {
|
|
|
|
maxHeapSize = "8G"
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register('fastTests', Test) {
|
|
|
|
maxHeapSize = "8G"
|
|
|
|
useJUnitPlatform {
|
|
|
|
excludeTags "slow"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-23 11:01:43 +02:00
|
|
|
}
|
|
|
|
|
2023-03-20 17:11:22 +01:00
|
|
|
idea {
|
|
|
|
module {
|
2023-08-25 16:40:53 +02:00
|
|
|
// Exclude these directories from being indexed by IntelliJ
|
|
|
|
// as they tend to bring the IDE to its knees and use up all
|
|
|
|
// Inotify spots in a hurry
|
2023-10-16 17:37:26 +02:00
|
|
|
excludeDirs.add(file("$projectDir/run/node-1"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/node-2"))
|
2023-03-20 17:11:22 +01:00
|
|
|
excludeDirs.add(file("$projectDir/run/model"))
|
2023-07-11 17:08:43 +02:00
|
|
|
excludeDirs.add(file("$projectDir/run/dist"))
|
2023-03-20 17:11:22 +01:00
|
|
|
excludeDirs.add(file("$projectDir/run/db"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/logs"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/data"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/conf"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/test-data"))
|
|
|
|
}
|
|
|
|
}
|
2022-05-19 17:45:26 +02:00
|
|
|
java {
|
|
|
|
toolchain {
|
2023-09-23 11:01:43 +02:00
|
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
2022-05-19 17:45:26 +02:00
|
|
|
}
|
|
|
|
}
|