-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (70 loc) · 2.95 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
plugins {
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id 'groovy'
}
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
// read environment variables
def repoUrl = System.getenv("REPO_URL")
def repoUsername = System.getenv("REPO_USERNAME")
def repoPassword = System.getenv("REPO_PASSWORD")
// read local.properties file
Properties properties = new Properties()
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
properties.load(propertiesFile.newDataInputStream())
}
// environment variables overwrite local properties
if (repoUrl == null) repoUrl = properties.getProperty('repo.url')
if (repoUsername == null) repoUsername = properties.getProperty('repo.username')
if (repoPassword == null) repoPassword = properties.getProperty('repo.password')
repositories {
mavenCentral()
// mavenLocal()
maven {
url = repoUrl
credentials {
username = repoUsername
password = repoPassword
}
content {
includeGroup 'org.sharesquare.commons'
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springdoc:springdoc-openapi-ui:1.4.3'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
//implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.sharesquare.commons:share-square-commons:0.0.5-SNAPSHOT'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
//testCompile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.4.1'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.codehaus.groovy:groovy:3.0.4'
testImplementation 'org.codehaus.groovy:groovy-all:3.0.4'
testImplementation 'org.spockframework:spock-spring:2.0-M3-groovy-3.0'
testImplementation 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
//testImplementation 'com.athaydes:spock-reports:2.0-RC2'
}
test {
useJUnitPlatform()
//systemProperty 'com.athaydes.spockframework.report.showCodeBlocks', true
}