-
Notifications
You must be signed in to change notification settings - Fork 48
/
build.gradle
89 lines (75 loc) · 2.67 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
plugins {
id 'java-library'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'com.diffplug.spotless' version '5.14.0'
}
group 'io.getstream.client'
version = '3.15.0'
description = 'Stream Feeds official Java SDK'
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url uri('https://repo.maven.apache.org/maven2/') }
}
var jackson_version = '2.14.2'
dependencies {
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
testImplementation 'junit:junit:4.13.1'
testImplementation 'com.pholser:junit-quickcheck-core:0.8.1'
testImplementation 'com.pholser:junit-quickcheck-generators:0.8.1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.2.0'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
implementation 'com.auth0:java-jwt:4.2.2'
api 'net.sourceforge.streamsupport:streamsupport:1.7.0'
api 'net.sourceforge.streamsupport:streamsupport-cfuture:1.7.0'
}
def localProperties = new Properties()
def localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
FileInputStream stream = new FileInputStream(localPropertiesFile)
localProperties.load(stream)
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
events 'standard_out', 'standard_error', "passed", "skipped", "failed"
}
doFirst {
// Inject local properties into tests runtime system properties
for (String key : localProperties.stringPropertyNames) {
systemProperty key, localProperties.getProperty(key).toString()
}
}
}
def generatedVersionDir = "${buildDir}/generated-version"
sourceSets {
main {
output.dir(generatedVersionDir, builtBy: 'generateVersionProperties')
}
}
/*spotless {
java {
googleJavaFormat()
}
}*/
task generateVersionProperties {
doLast {
def propertiesFile = file "$generatedVersionDir/version.properties"
propertiesFile.parentFile.mkdirs()
def properties = new Properties()
properties.setProperty("version", rootProject.version.toString())
propertiesFile.withWriter { properties.store(it, null) }
}
}
processResources.dependsOn generateVersionProperties
apply from: "publish.gradle"