-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
75 lines (64 loc) · 2.34 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
import java.text.SimpleDateFormat
plugins {
id 'net.nemerosa.versioning' version '2.6.1'
id 'com.jfrog.bintray' version '1.8.1'
id 'com.github.hierynomus.license' version '0.14.0'
}
Date buildDateTime = new Date()
ext {
bintrayUser = System.getenv('BINTRAY_USER')
bintrayApiKey = System.getenv('BINTRAY_API_KEY')
sonatypeUser = System.getenv('SONATYPE_USER')
sonatypePass = System.getenv('SONATYPE_PASS')
builtBy = System.properties['user.name']
buildRevision = versioning.info.commit
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildDateTime)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildDateTime)
createdBy = "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString()
}
subprojects { subproject ->
buildscript {
repositories {
mavenCentral()
jcenter()
}
}
apply plugin: 'java'
apply plugin: 'java-library'
apply from: rootProject.file('gradle/code-coverage.gradle')
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
task cleanTestWithJacoco() {
group 'verification'
description 'Clear test > Junit Tests > Generate Jacoco Reports'
dependsOn 'clean'
dependsOn 'test'
dependsOn 'jacocoTestReport'
tasks.findByName('classes').mustRunAfter 'clean'
tasks.findByName('jacocoTestReport').mustRunAfter 'test'
}
}
task envriontmentInfo {
group 'help'
description 'Prints envriontment information'
doLast {
println "========================================================="
println "JAVA_OPTS: ${System.env.JAVA_OPTS ?: "[]"}"
println "JAVA_HOME: ${System.env.JAVA_HOME}"
println "Java version: ${System.properties['java.version']}"
println "Gradle version: ${gradle.gradleVersion}"
println "Subprojects: ${rootProject.childProjects.keySet()}"
println "========================================================="
println "Project Properties:"
rootProject.ext.properties.each {key, value ->
println "${key} : ${value}"
}
println "========================================================="
}
}