-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.gradle
141 lines (119 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
* Copyright (c) 2016 Schibsted Products & Technology AS. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
*/
import static java.lang.System.getenv
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
//Check for the latest version here: https://plugins.gradle.org/plugin/com.jfrog.artifactory
classpath "com.netflix.nebula:gradle-lint-plugin:18.0.3"
classpath "org.owasp:dependency-check-gradle:8.1.0"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
}
group = projectGroup
version = getenv('TRAVIS_TAG') ? getenv('TRAVIS_TAG') : "0.0.1";
apply plugin: 'io.github.gradle-nexus.publish-plugin'
allprojects {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'nebula.lint'
apply plugin: "org.owasp.dependencycheck"
repositories {
mavenCentral()
}
archivesBaseName = 'strongbox-' + project.name
sourceCompatibility = 1.8
targetCompatibility = 1.8
gradleLint.rules = ['unused-dependency']
compileJava {
sourceCompatibility = '1.8'
}
ext {
airlineVersion = '0.8'
apacheCommonsVersion = '1.2'
archaiusVersion = '0.7.5'
awsEncryptionVersion = '2.4.0'
awsVersion = '1.12.395'
// can't update guava to latest version until airline is fixed, see https://github.com/airlift/airline/pull/53
guavaVersion = '31.1-jre'
hamcrestVersion = '1.3'
jacksonVersion = '2.14.2'
jaxbVersion = '2.3.1'
mockitoVersion = '3.7.0'
slf4jVersion = '1.7.25'
springVersion = "4.2.6.RELEASE"
springBootVersion = "1.3.5.RELEASE"
springCloudVersion = "1.1.0.RELEASE"
testngVersion = '6.11'
}
jacoco {
// Broken in newer versions. Need this version for now.
toolVersion = '0.8.6+'
}
dependencyCheck {
cve {
startYear = 2021
}
}
}
subprojects {
dependencies {
implementation("javax.xml.bind:jaxb-api:$jaxbVersion")
}
test {
// enable TestNG support (default is JUnit)
useTestNG()
}
}
task install(dependsOn: 'cli:installDist') {
doLast {
// If user has overridden the install directory, use the override, else default to the build directory
// so that it will be cleaned up by the gradlew clean command.
def installRoot = "$buildDir"
if (project.hasProperty("installDir")) {
installRoot = project.installDir
assert installRoot != ""
}
def cliInstallRoot = 'cli/build/install/cli'
def cliBin = cliInstallRoot + '/bin/'
def cliLib = cliInstallRoot + '/lib/'
// The copy won't fail if the directories don't exist, so check that they were actually generated before
// continuing. It will make debugging problems faster.
assert file(cliBin).exists()
assert file(cliLib).exists()
copy {
from cliBin
into installRoot + '/bin'
}
copy {
from cliLib
into installRoot + '/lib'
}
println 'Finished installing to ' + installRoot + '/bin'
}
}
idea {
project {
jdkName = sourceCompatibility
languageLevel = sourceCompatibility
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
nexusPublishing {
repositories {
sonatype {
username.set(ossrhUsername)
password.set(ossrhPassword)
}
}
}