-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
123 lines (105 loc) · 3.64 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id "org.sonarqube" version "2.5"
id 'org.hidetake.swagger.generator' version '2.9.0'
}
apply plugin: 'java'
apply plugin: 'maven'
ext {
swagger_annotations_version = "1.5.13"
jackson_version = "2.7.5"
spring_version = "4.1.4.RELEASE"
springboot_version = "2.0.1.RELEASE"
junit_version = "4.12"
oltu_version = "1.0.1"
orika_version = "1.5.1"
querydsl_version = "4.2.1"
}
repositories {
mavenCentral()
}
dependencies {
swaggerCodegen 'io.swagger:swagger-codegen-cli:2.3.0'
}
// Task to generate sources in build output directory
swaggerSources {
crestdb {
inputFile = file('swagger_schemas/swagger/json/crestdb.json')
code {
language = 'jaxrs'
templateDir = file('./templates/java/JavaJaxRs')
configFile = file('swagger_schemas/swagger/json/crestdb-config.json')
}
}
}
configurations.compile.each {
println "compile: $it"
}
allprojects {
apply plugin: 'maven'
group = 'hep.crest'
version = '2.0-SNAPSHOT'
}
// Define a project specific method
// Load properties for later filtering
// Functions to get project properties from local file
Properties getProjectProperties() {
String propertiesfile = "${project.rootDir}/crest-filter-values.properties"
File generalPropertiesFile = file(propertiesfile)
println 'Loaded properties file: '+generalPropertiesFile.name
Properties mprops = new Properties()
mprops.load(generalPropertiesFile.newDataInputStream())
println 'Getting properties from main gradle script...'+mprops
return mprops
}
subprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
swagger_annotations_version = "1.5.13"
jackson_version = "2.9.4"
springboot_version = "2.0.1.RELEASE"
junit_version = "4.12"
oltu_version = "1.0.1"
orika_version = "1.5.1"
jersey2_version = "2.22.2"
swagger_core_version = "1.5.13"
querydsl_version = "4.2.1"
server= "undertow"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url "http://repo.spring.io/milestone" }
maven { url "https://jcenter.bintray.com/" }
maven { url "https://hibernate-sqlite.googlecode.com/svn/trunk/mavenrepo" }
maven { url "http://repo.maven.apache.org/maven2" }
}
configurations {
compile.exclude module: "tomcat-jdbc"
}
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "io.swagger:swagger-core:$swagger_core_version"
compile "io.swagger:swagger-jersey2-jaxrs:$swagger_core_version"
compile group: 'ma.glasnost.orika', name: 'orika-core', version: orika_version
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
// DATABASES
//compile group: 'com.oracle', name: 'ojdbc7', version:'12.1.0.2'
compile files("${project.rootDir}/jarlib/ojdbc7-12.1.0.2.jar")
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.8.11.2'
compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
compile("com.h2database:h2")
//compile group: 'com.impossibl.pgjdbc-ng', name: 'pgjdbc-ng', version: '0.7.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.0.2' //version required
}
}