forked from openfga/spring-boot-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (68 loc) · 2 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
plugins {
id 'java-library'
id 'org.springframework.boot' version "${springBootVersion}" apply false
id 'io.spring.dependency-management' version "${springDependencyManagementVersion}"
// quality
id 'com.diffplug.spotless' version '6.25.0'
id 'jacoco'
// Publishing
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
apply from: 'publish.gradle'
group = 'dev.openfga'
version = '0.0.1'
java {
sourceCompatibility = 17
targetCompatibility = 17
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
implementation 'org.springframework.boot:spring-boot'
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-starter-security'
api 'dev.openfga:openfga-sdk:0.4.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-core:5.11.0'
}
test {
useJUnitPlatform()
}
spotless {
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore', '*.gradle'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
java {
palantirJavaFormat()
removeUnusedImports()
importOrder()
}
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
// tests are required to run before generating a JaCoCo coverage report.
dependsOn test
}
tasks.register('fmt') {
dependsOn 'spotlessApply'
}