/
build.gradle.kts
72 lines (57 loc) · 1.87 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
version = "0.1"
group = "systemofadownload"
plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.micronaut.library") version "4.1.2" apply false
id("io.micronaut.application") version "4.1.2" apply false
id("io.micronaut.docker") version "4.1.2" apply false
id("io.micronaut.aot") version "4.2.0" apply false
id("io.micronaut.test-resources") version "4.1.2" apply false
}
repositories {
mavenCentral()
}
tasks {
register("runLiquibase", Exec::class) {
executable("docker")
args(
"run",
"--rm",
"--mount", "type=bind,source=${project.projectDir.absolutePath}/liquibase/changelog,target=/liquibase/changelog,readonly",
"--network=host",
"liquibase/liquibase:4.23-alpine",
"--logLevel=info",
"--url=jdbc:postgresql://localhost:5432/default",
"--defaultsFile=/liquibase/changelog/liquibase.properties",
"--changeLogFile=changelog.xml",
"--classpath=/liquibase/changelog",
"--username=admin",
"--password=password",
"update")
}
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
allprojects {
apply(plugin = "java-library")
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
if (JavaVersion.current() < JavaVersion.VERSION_21) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
}
tasks {
withType<JavaCompile> {
options.compilerArgs.add("--enable-preview")
}
withType<Test> {
jvmArgs("--enable-preview")
}
}
}