-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (61 loc) · 2.33 KB
/
build.gradle
File metadata and controls
72 lines (61 loc) · 2.33 KB
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
plugins {
id 'application'
id 'com.diffplug.spotless' version '8.0.0'
}
application {
mainClass = 'dev.openfga.sdk.example.ApiExecutorExample'
}
// Additional run task for the streaming variant
tasks.register('runStreaming', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'dev.openfga.sdk.example.StreamingApiExecutorExample'
}
repositories {
mavenCentral()
}
ext {
jacksonVersion = "2.18.2"
}
dependencies {
// Use local build of SDK
implementation files('../../build/libs/openfga-sdk-0.9.6.jar')
// OpenFGA Language SDK for DSL transformation
implementation("dev.openfga:openfga-language:v0.2.0-beta.1")
// Serialization
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("org.openapitools:jackson-databind-nullable:0.2.7")
// OpenTelemetry (required by SDK)
implementation platform("io.opentelemetry:opentelemetry-bom:1.54.1")
implementation "io.opentelemetry:opentelemetry-api"
// JSR305 (required by SDK)
implementation "com.google.code.findbugs:jsr305:3.0.2"
}
// Use spotless plugin to automatically format code, remove unused import, etc
// To apply changes directly to the file, run `gradlew spotlessApply`
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
spotless {
// comment out below to run spotless as part of the `check` task
enforceCheck false
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces() // Takes an integer argument if you don't like 4
endWithNewline()
}
java {
palantirJavaFormat()
removeUnusedImports()
importOrder()
}
}
// Use spotless plugin to automatically format code, remove unused import, etc
// To apply changes directly to the file, run `gradlew spotlessApply`
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
tasks.register('fmt') {
dependsOn 'spotlessApply'
}