/
build.gradle
131 lines (115 loc) · 4.76 KB
/
build.gradle
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.3.8"
id("io.micronaut.aot") version "4.3.8"
id("org.openrewrite.rewrite") version "6.12.0"
id("com.github.ben-manes.versions") version "0.51.0"
id("org.sonarqube") version "5.0.0.4638"
}
version = "0.1"
group = "com.github.dkorotych.phone.formatter"
repositories {
mavenCentral()
}
dependencies {
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("io.micronaut:micronaut-http-validation")
annotationProcessor("io.micronaut.openapi:micronaut-openapi")
annotationProcessor("io.micronaut.security:micronaut-security-annotations")
annotationProcessor("io.micronaut.serde:micronaut-serde-processor")
implementation("io.micronaut.security:micronaut-security-jwt")
implementation("io.micronaut.serde:micronaut-serde-jackson")
implementation "io.micronaut.validation:micronaut-validation"
compileOnly("io.micronaut:micronaut-http-client")
compileOnly("io.micronaut.openapi:micronaut-openapi-annotations")
compileOnly("org.projectlombok:lombok")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("org.yaml:snakeyaml")
implementation("com.googlecode.libphonenumber:libphonenumber:8.13.36")
implementation("io.sentry:sentry-logback:7.8.0")
testImplementation("io.micronaut:micronaut-http-client")
testImplementation("org.skyscreamer:jsonassert:1.5.1")
testImplementation("org.assertj:assertj-core:3.25.3")
testImplementation "org.glassfish.jaxb:jaxb-runtime:4.0.5"
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.2")
testImplementation "com.sun.xml.ws:jaxws-rt:4.0.2"
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.10.0"))
rewrite("org.openrewrite.recipe:rewrite-github-actions")
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
rewrite("org.openrewrite.recipe:rewrite-java-security")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
rewrite("org.openrewrite.recipe:rewrite-migrate-java")
rewrite("org.openrewrite.recipe:rewrite-micronaut")
rewrite("org.openrewrite:rewrite-gradle")
aotPlugins platform("io.micronaut.platform:micronaut-platform:${micronautVersion}")
aotPlugins("io.micronaut.security:micronaut-security-aot")
}
application {
mainClass.set("com.github.dkorotych.phone.micronaut.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion("${javaVersion}")
targetCompatibility = JavaVersion.toVersion("${javaVersion}")
}
graalvmNative.toolchainDetection = false
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("com.github.dkorotych.phone.formatter.*")
}
aot {
// Please review carefully the optimizations enabled below
// Check https://micronaut-projects.github.io/micronaut-aot/latest/guide/ for more details
optimizeServiceLoading = false
convertYamlToJava = false
precomputeOperations = true
cacheEnvironment = true
optimizeClassLoading = true
deduceEnvironment = true
optimizeNetty = true
configurationProperties.put("micronaut.security.jwks.enabled", "false")
}
}
tasks.named("dockerfile") {
baseImage("eclipse-temurin:${javaVersion}-jre-jammy")
}
tasks.named("dockerfileNative") {
jdkVersion = "${javaVersion}"
}
rewrite {
activeRecipe("com.github.dkorotych.phone.formatter.CustomRecipes")
}
dependencyUpdates {
checkForGradleUpdate = true
revision = "release"
gradleReleaseChannel = "current"
resolutionStrategy {
componentSelection {
all { ComponentSelection selection ->
def candidate = selection.candidate
if (candidate.version.contains("alpha")) {
selection.reject("Plugin ${candidate.displayName} reject because is a alpha release")
}
if (candidate.version.contains("beta")) {
selection.reject("Plugin ${candidate.displayName} reject because is a beta release")
}
if (candidate.version.matches('.+-M\\d+$')) {
selection.reject("Dependency ${candidate.displayName} reject because is a milestone release")
}
if (candidate.version.matches('.+-RC\\d+$')) {
selection.reject("Dependency ${candidate.displayName} reject because is a release candidate")
}
}
}
}
}
sonar {
properties {
property "sonar.projectKey", "dkorotych_phone-formatter"
property "sonar.organization", "dkorotych"
property "sonar.host.url", "https://sonarcloud.io"
}
}