@@ -4,6 +4,7 @@ plugins {
4
4
id ' maven-publish'
5
5
id(" com.gradleup.shadow" ) version " 8.3.1"
6
6
id(" io.micronaut.application" ) version " 4.4.0"
7
+ id(" io.micronaut.aot" ) version " 4.4.0"
7
8
id " jacoco"
8
9
id(" org.openrewrite.rewrite" ) version " latest.release"
9
10
}
@@ -26,6 +27,20 @@ micronaut {
26
27
incremental(true )
27
28
annotations(" com.objectcomputing.checkins.*" )
28
29
}
30
+ aot {
31
+ // Please review carefully the optimizations enabled below
32
+ // Check https://micronaut-projects.github.io/micronaut-aot/latest/guide/ for more details
33
+ optimizeServiceLoading = false
34
+ convertYamlToJava = false
35
+ precomputeOperations = true
36
+ cacheEnvironment = true
37
+ optimizeClassLoading = true
38
+ deduceEnvironment = true
39
+ optimizeNetty = true
40
+ replaceLogbackXml = true
41
+ configurationProperties. put(" micronaut.security.jwks.enabled" ," false" )
42
+ configurationProperties. put(" micronaut.security.openid-configuration.enabled" ," false" )
43
+ }
29
44
}
30
45
31
46
dockerBuildNative {
@@ -36,6 +51,14 @@ dockerBuildNative {
36
51
images = [" checkins:latest" ] + imageNameFromGithub
37
52
}
38
53
54
+ optimizedDockerBuildNative {
55
+ def imageNameFromGithub = []
56
+ if (System . getenv(' PROJECT_ID' ) != null && System . getenv(' SERVICE_NAME' ) && System . getenv(' GITHUB_SHA' )) {
57
+ imageNameFromGithub = [" gcr.io/${ System.getenv('PROJECT_ID')} /${ System.getenv('SERVICE_NAME')} :${ System.getenv("GITHUB_SHA")} " . toString()]
58
+ }
59
+ images = [" checkins:latest" ] + imageNameFromGithub
60
+ }
61
+
39
62
graalvmNative {
40
63
toolchainDetection = false
41
64
binaries {
0 commit comments