-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
103 lines (89 loc) · 3.02 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.6/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.4'
id 'maven-publish'
id 'org.hidetake.swagger.generator' version '2.18.1'
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dmi3coder/behaiv-java")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
groupId = 'tech.donau.behaiv'
artifactId = 'behaiv-java'
version = '0.4.10-alpha'
from(components.java)
}
}
}
repositories {
mavenLocal()
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
}
dependencies {
// Protobuf
compile group: 'com.google.protobuf', name: 'protobuf-javalite', version: '3.11.4'
// Swagger codegen dependencies
swaggerCodegen 'io.swagger:swagger-codegen-cli:2.4.2' // Swagger Codegen V2
// This dependency is exported to consumers, that is to say found on their compile classpath.
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.google.guava:guava:28.0-jre'
implementation 'io.reactivex.rxjava3:rxjava:3.0.0-RC2'
implementation 'javax.annotation:jsr250-api:1.0'
implementation files('./jars/kernel-api-1.0.0.jar')
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.9'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.9'
//ejml (replacement of dl4j)
compile 'org.ejml:ejml-all:0.38'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.0.0'
}
swaggerSources {
behaivRemote {
inputFile = file("./docs/swagger.json")
code {
language = 'java'
outputDir = file('./kernel-api')
}
}
}
jacocoTestReport {
dependsOn test
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: 'tech/donau/behaiv/proto**')
}))
}
}
task proto(type: Exec) {
commandLine './proto.sh'
}