73 lines
2.3 KiB
Groovy
73 lines
2.3 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
|
|
id "io.freefair.lombok" version "8.3"
|
|
id "me.champeau.jmh" version "0.6.6"
|
|
|
|
// This is a workaround for a bug in the Jib plugin that causes it to stall randomly
|
|
// https://github.com/GoogleContainerTools/jib/issues/3347
|
|
id 'com.google.cloud.tools.jib' version '3.4.0' apply(false)
|
|
}
|
|
|
|
group 'marginalia'
|
|
version 'SNAPSHOT'
|
|
|
|
compileJava.options.encoding = "UTF-8"
|
|
compileTestJava.options.encoding = "UTF-8"
|
|
|
|
subprojects.forEach {it ->
|
|
// Enable preview features for the entire project
|
|
|
|
if (it.path.contains(':code:')) {
|
|
sourceSets.main.java.srcDirs += file('java')
|
|
sourceSets.main.resources.srcDirs += file('resources')
|
|
sourceSets.test.java.srcDirs += file('test')
|
|
sourceSets.test.resources.srcDirs += file('test-resources')
|
|
}
|
|
|
|
it.tasks.withType(JavaCompile).configureEach {
|
|
options.compilerArgs += ['--enable-preview']
|
|
}
|
|
it.tasks.withType(JavaExec).configureEach {
|
|
jvmArgs += ['--enable-preview']
|
|
}
|
|
it.tasks.withType(Test).configureEach {
|
|
jvmArgs += ['--enable-preview']
|
|
}
|
|
|
|
// Enable reproducible builds for the entire project
|
|
it.tasks.withType(AbstractArchiveTask).configureEach {
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
}
|
|
|
|
}
|
|
ext {
|
|
dockerImageBase='container-registry.oracle.com/graalvm/jdk:21@sha256:1fd33d4d4eba3a9e1a41a728e39ea217178d257694eea1214fec68d2ed4d3d9b'
|
|
dockerImageTag='latest'
|
|
dockerImageRegistry='marginalia'
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
// 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
|
|
excludeDirs.add(file("$projectDir/run/node-1"))
|
|
excludeDirs.add(file("$projectDir/run/node-2"))
|
|
excludeDirs.add(file("$projectDir/run/model"))
|
|
excludeDirs.add(file("$projectDir/run/dist"))
|
|
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"))
|
|
}
|
|
}
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
|
}
|
|
}
|
|
|