-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
87 lines (76 loc) · 2.32 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
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.20.0'
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
apply plugin: org.sonarqube.gradle.SonarQubePlugin
sourceCompatibility = '1.8'
version = project.hasProperty('projVersion') ? project['projVersion'] : '0.0.1-SNAPSHOT'
ext {
artifactoryUrl = 'https://artifactory-ehv.ta.philips.com:443/artifactory/dl-innersource-mvn'
set('githubRunId', System.getenv()['GITHUB_RUN_ID'])
set('githubServerUrl', System.getenv()['GITHUB_SERVER_URL'])
set('githubRepository', System.getenv()['GITHUB_REPOSITORY'])
}
repositories {
mavenLocal()
mavenCentral()
maven { url artifactoryUrl }
}
dependencies {
implementation 'com.google.guava:guava:27.0.1-jre'
testImplementation 'junit:junit:4.12'
}
checkstyle {
config = resources.text.fromFile("${rootDir}/.cci-common/checkstyle.xml")
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Werror" << "-Xlint:all,-processing"
}
jacoco {
toolVersion = "0.8.5"
reportsDir = file("${buildDir}/reports")
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled true
html.destination file("${buildDir}/jacocoHtml")
}
}
artifactory {
contextUrl = System.getenv()['ARTIFACTORY_REGISTRY']
publish {
repository {
repoKey = project.getProperties()['release'] == 'true' ? 'dl-innersource-mvn-release' : 'dl-innersource-mvn-snapshot'
maven = true
username = System.getenv()['ARTIFACTORY_USERNAME']
password = System.getenv()['ARTIFACTORY_PASSWORD']
}
defaults {
publications('mavenJava')
publishArtifacts = true
publishPom = true
}
}
}
sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.projectKey", "${rootProject.name}"
property "sonar.projectName", "CCI Platform - ${rootProject.name}"
property "sonar.scm.provider", "git"
}
}