-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
126 lines (108 loc) · 3.66 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
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'io.freefair.gradle:aspectj-plugin:3.8.4'
}
}
plugins {
id 'java'
id 'org.springframework.boot' version '2.5.6'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'io.freefair.aspectj.post-compile-weaving' version '6.2.0'
id 'io.freefair.lombok' version '6.2.0'
id 'nebula.lint' version '17.2.3'
id 'ru.vyarus.quality' version '4.2.2'
id 'maven-publish'
}
group 'com.github.sgov'
def revision = 'git rev-list --count HEAD'.execute().text.trim()
def hash = 'git rev-parse --short HEAD'.execute().text.trim()
version = getDate() + "-r${revision}.${hash}"
static def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMddHHmmss')
return formattedDate
}
gradleLint {
rules = ['unused-dependency']
}
quality {
checkstyleVersion = '9.2'
checkstyle = true
spotbugs = false
pmd = false
configDir = 'config'
}
processResources {
filesMatching('application.yml') {
expand(['version': project.version])
}
}
compileJava {
sourceCompatibility = '11'
targetCompatibility = '11'
}
test {
useJUnitPlatform()
}
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'com.github.sgov:sgov-validator:1.6.6'
implementation 'cz.cvut.kbss.jopa:jopa-impl:0.17.2'
implementation 'cz.cvut.kbss.jopa:ontodriver-sesame:0.17.2'
implementation 'cz.cvut.kbss.jsonld:jb4jsonld-jackson:0.8.8'
implementation 'com.github.ledsoft:jopa-spring-transaction:0.1.1'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.6.2'
implementation 'org.springframework.boot:spring-boot-starter-validation:2.6.2'
implementation 'org.springframework.boot:spring-boot-starter-websocket:2.6.2'
implementation 'org.springframework.boot:spring-boot-starter-security:2.6.2'
implementation 'org.springframework.data:spring-data-commons:2.6.0'
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'com.konghq:unirest-java:3.13.3'
implementation 'org.topbraid:shacl:1.3.2'
runtimeOnly 'org.mitre.dsmiley.httpproxy:smiley-http-proxy-servlet:1.12'
implementation 'org.keycloak:keycloak-spring-boot-starter:15.0.2'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r'
aspect 'cz.cvut.kbss.jopa:jopa-impl:0.17.2'
testImplementation 'org.apache.jena:jena-shacl:3.17.0'
testImplementation 'org.apache.jena:jena-fuseki-server:3.17.0'
testImplementation('org.springframework.boot:spring-boot-starter-test:2.5.6') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
bootJar {
archiveFileName = "sgov-server-${project.version}.jar"
}
bootRun {
systemProperties = System.properties
}
repositories {
mavenCentral()
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/datagov-cz/sgov-validator')
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('TOKEN')
}
}
}
publishing {
repositories {
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/datagov-cz/sgov')
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('TOKEN')
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}