forked from sitewhere/sitewhere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (89 loc) · 3.48 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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE")
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
classpath 'io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE'
classpath 'com.bmuschko:gradle-docker-plugin:4.3.0'
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
classpath "org.ajoberstar:grgit:2.2.1"
}
}
ext {
git = org.ajoberstar.grgit.Grgit.open(currentDir: file('.'))
}
ext['git.revision'] = ext.git.head().id
ext['git.revision.abbrev'] = ext.git.head().abbreviatedId
ext['docker.base.image'] = 'openjdk:8-jre-alpine'
ext['docker.maintainer'] = '[email protected]'
ext['sitewhere.grpc.api.version'] = '2.0.2'
ext['kafka.version'] = '2.0.0'
ext['zookeeper.version'] = '3.4.8'
ext['curator.version'] = '2.12.0'
ext['hazelcast.version'] = '3.9.3'
ext['protobuf.version'] = '3.5.1'
ext['grpc.version'] = '1.16.1'
ext['guava.version'] = '20.0'
ext['netty.version'] = '4.1.27.Final'
ext['groovy.version'] = '2.4.12'
ext['mongodb.version'] = '3.4.2'
ext['solr.version'] = '6.4.0'
ext['siddhi.version'] = '3.1.2'
apply plugin: 'distribution'
allprojects {
group = 'com.sitewhere'
version = '2.0.6'
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url 'http://maven.restlet.org' }
maven { url "https://jitpack.io" }
maven { url "http://oss.jfrog.org/artifactory/oss-release-local/" }
maven { url "https://oss.sonatype.org/content/repositories/ksoap2-android-releases/" }
maven { url "https://repo.spring.io/libs-milestone" }
maven { url "http://maven.wso2.org/nexus/content/repositories/releases/" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
}
subprojects {
apply plugin: 'eclipse'
apply plugin: "com.github.hierynomus.license"
license {
header rootProject.file('HEADER')
include "**/*.java"
}
// Use Spring dependency management.
apply plugin: 'io.spring.dependency-management'
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:Cairo-SR1'
}
}
// Use Docker plugin to allow for creating/pushing an image.
apply plugin: 'com.bmuschko.docker-remote-api'
// Allow Docker settings to be overridden by build environment.
if (System.getenv("DOCKER_REGISTRY_URL") != null) registryUrl = System.getenv("DOCKER_REGISTRY_URL")
if (System.getenv("DOCKER_REGISTRY_USERNAME") != null) registryUsername = System.getenv("DOCKER_REGISTRY_USERNAME")
if (System.getenv("DOCKER_REGISTRY_PASSWORD") != null) registryPassword = System.getenv("DOCKER_REGISTRY_PASSWORD")
if (System.getenv("DOCKER_REGISTRY_EMAIL") != null) registryEmail = System.getenv("DOCKER_REGISTRY_EMAIL")
docker {
url = (System.getenv("DOCKER_HOST") != null) ? System.getenv("DOCKER_HOST") : dockerProtocol + '://' + dockerHostname + ':' + dockerPort
registryCredentials {
url = registryUrl
username = registryUsername
password = registryPassword
email = registryEmail
}
}
// Choose Java settings.
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Common dependencies used for all projects.
dependencies {
testCompile group: 'junit', name: 'junit'
}
}