2022-05-19 15:45:26 +00:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2023-03-20 16:11:22 +00:00
|
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
|
2023-09-23 09:01:43 +00:00
|
|
|
id "me.champeau.jmh" version "0.6.6"
|
2024-02-22 13:01:23 +00:00
|
|
|
|
|
|
|
// This is a workaround for a bug in the Jib plugin that causes it to stall randomly
|
|
|
|
// https://github.com/GoogleContainerTools/jib/issues/3347
|
2024-07-31 08:39:50 +00:00
|
|
|
id 'com.google.cloud.tools.jib' version '3.4.3' apply(false)
|
2022-05-19 15:45:26 +00:00
|
|
|
}
|
|
|
|
|
2023-03-04 12:19:01 +00:00
|
|
|
group 'marginalia'
|
2022-05-19 15:45:26 +00:00
|
|
|
version 'SNAPSHOT'
|
2023-03-04 12:19:01 +00:00
|
|
|
|
2022-05-19 15:45:26 +00:00
|
|
|
compileJava.options.encoding = "UTF-8"
|
|
|
|
compileTestJava.options.encoding = "UTF-8"
|
|
|
|
|
2023-09-23 09:01:43 +00:00
|
|
|
subprojects.forEach {it ->
|
2024-01-05 12:19:59 +00:00
|
|
|
// Enable preview features for the entire project
|
2024-02-23 15:13:40 +00:00
|
|
|
|
|
|
|
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')
|
|
|
|
}
|
|
|
|
|
2023-09-23 09:01:43 +00:00
|
|
|
it.tasks.withType(JavaCompile).configureEach {
|
|
|
|
options.compilerArgs += ['--enable-preview']
|
|
|
|
}
|
2023-09-24 09:31:17 +00:00
|
|
|
it.tasks.withType(JavaExec).configureEach {
|
|
|
|
jvmArgs += ['--enable-preview']
|
|
|
|
}
|
2023-09-23 09:01:43 +00:00
|
|
|
it.tasks.withType(Test).configureEach {
|
|
|
|
jvmArgs += ['--enable-preview']
|
|
|
|
}
|
2024-01-05 12:19:59 +00:00
|
|
|
|
|
|
|
// Enable reproducible builds for the entire project
|
|
|
|
it.tasks.withType(AbstractArchiveTask).configureEach {
|
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
}
|
2024-02-23 15:13:40 +00:00
|
|
|
|
2023-09-23 09:01:43 +00:00
|
|
|
}
|
2024-04-24 11:54:04 +00:00
|
|
|
|
2024-02-22 13:01:23 +00:00
|
|
|
ext {
|
2024-11-11 20:14:38 +00:00
|
|
|
jvmVersion=23
|
|
|
|
dockerImageBase='container-registry.oracle.com/graalvm/jdk:23'
|
2024-02-25 10:08:49 +00:00
|
|
|
dockerImageTag='latest'
|
|
|
|
dockerImageRegistry='marginalia'
|
2024-07-31 08:39:50 +00:00
|
|
|
jibVersion = '3.4.3'
|
2024-12-10 18:13:13 +00:00
|
|
|
|
2024-02-22 13:01:23 +00:00
|
|
|
}
|
2023-09-23 09:01:43 +00:00
|
|
|
|
2023-03-20 16:11:22 +00:00
|
|
|
idea {
|
|
|
|
module {
|
2023-08-25 14:40:53 +00: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 15:37:26 +00:00
|
|
|
excludeDirs.add(file("$projectDir/run/node-1"))
|
|
|
|
excludeDirs.add(file("$projectDir/run/node-2"))
|
2023-03-20 16:11:22 +00:00
|
|
|
excludeDirs.add(file("$projectDir/run/model"))
|
2023-07-11 15:08:43 +00:00
|
|
|
excludeDirs.add(file("$projectDir/run/dist"))
|
2023-03-20 16:11:22 +00: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 15:45:26 +00:00
|
|
|
java {
|
|
|
|
toolchain {
|
2024-04-24 11:54:04 +00:00
|
|
|
languageVersion.set(JavaLanguageVersion.of(rootProject.ext.jvmVersion))
|
2022-05-19 15:45:26 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-22 13:01:23 +00:00
|
|
|
|