forked from eclipse/openvsx
/
build.gradle
171 lines (158 loc) · 6.35 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.hibernate:hibernate-gradle-plugin:5.4.22.Final"
}
}
plugins {
id 'nu.studer.jooq' version '6.0.1'
id 'de.undercouch.download' version '4.1.1'
id 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'io.gatling.gradle' version '3.6.1'
id 'java'
}
apply plugin: 'org.hibernate.orm'
def jooqSrcDir = 'src/main/jooq-gen'
def versions = [
java: '11',
flyway: '7.3.1',
springdoc: '1.6.9',
spdx: '2.2.4',
gcloud: '1.113.4',
azure: '12.9.0',
guava: '28.2-jre',
junit: '5.7.1',
testcontainers: '1.15.2',
jackson: '2.12.5',
woodstox: '6.2.4',
jobrunr: '5.1.2',
bucket4j: '0.4.0',
ehcache: '3.10.0'
]
ext['junit-jupiter.version'] = versions.junit
sourceCompatibility = versions.java
repositories {
mavenCentral()
}
// The 'dev' source set contains the development setup. These files are not included in the jar.
sourceSets {
main {
java.srcDirs += jooqSrcDir
}
dev {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
configurations {
devImplementation.extendsFrom implementation
devRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-starter-jooq"
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "org.springframework.boot:spring-boot-starter-data-elasticsearch"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-cache"
implementation "org.springframework.boot:spring-boot-starter-aop"
implementation "org.springframework.security:spring-security-oauth2-client"
implementation "org.springframework.security:spring-security-oauth2-jose"
implementation "org.springframework.session:spring-session-jdbc"
implementation "org.springframework.retry:spring-retry"
implementation "org.ehcache:ehcache:${versions.ehcache}"
implementation "com.giffing.bucket4j.spring.boot.starter:bucket4j-spring-boot-starter:${versions.bucket4j}"
implementation "org.jobrunr:jobrunr-spring-boot-starter:${versions.jobrunr}"
implementation "org.flywaydb:flyway-core:${versions.flyway}"
implementation "com.google.cloud:google-cloud-storage:${versions.gcloud}"
implementation "com.azure:azure-storage-blob:${versions.azure}"
implementation "org.springdoc:springdoc-openapi-ui:${versions.springdoc}"
implementation "com.google.guava:guava:${versions.guava}"
implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
implementation "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}"
implementation "com.fasterxml.woodstox:woodstox-core:${versions.woodstox}"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}"
implementation("org.spdx:spdx-tools:${versions.spdx}") {
exclude group: 'net.sf.saxon'
exclude group: 'org.antlr', module: 'antlr'
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
}
runtimeOnly "io.micrometer:micrometer-registry-prometheus"
runtimeOnly "org.postgresql:postgresql"
jooqGenerator "org.postgresql:postgresql"
devRuntimeOnly "org.springframework.boot:spring-boot-devtools"
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation "org.springframework.security:spring-security-test"
testImplementation "org.testcontainers:elasticsearch:${versions.testcontainers}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${versions.junit}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${versions.junit}"
testRuntimeOnly "org.testcontainers:postgresql:${versions.testcontainers}"
implementation 'com.google.cloud:spring-cloud-gcp-starter-logging:3.3.0'
implementation 'com.configcat:configcat-java-client:7.+'
}
hibernate {
enhance {
enableLazyInitialization = true
enableDirtyTracking = true
}
}
jooq {
// use jOOQ version defined in Spring Boot
version = dependencyManagement.importedProperties['jooq.version']
edition = nu.studer.gradle.jooq.JooqEdition.OSS
configurations {
main {
generateSchemaSourceOnCompilation = false
generationTool {
logging = org.jooq.meta.jaxb.Logging.WARN
jdbc {
driver = 'org.postgresql.Driver'
url = 'jdbc:postgresql://localhost:5432/postgres'
user = 'gitpod'
password = 'gitpod'
}
generator {
name = 'org.jooq.codegen.DefaultGenerator'
database {
name = 'org.jooq.meta.postgres.PostgresDatabase'
inputSchema = 'public'
includes = '.*'
excludes = ''
}
target {
packageName = 'org.eclipse.openvsx.jooq'
directory = jooqSrcDir
}
}
}
}
}
}
task runServer(type: JavaExec) {
// jvmArgs = ['-Xverify:none']
classpath = sourceSets.dev.runtimeClasspath
main = 'org.eclipse.openvsx.RegistryApplication'
}
test {
useJUnitPlatform()
}
task unitTests(type: Test) {
description = 'Runs unit tests (excluding integration tests).'
group = 'verification'
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
useJUnitPlatform()
exclude 'org/eclipse/openvsx/IntegrationTest.class'
exclude 'org/eclipse/openvsx/cache/CacheServiceTest.class'
}
apply from: 'dependencies.gradle'
apply from: 'test-extensions.gradle'