This repository has been archived by the owner on Jun 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
100 lines (83 loc) · 2.7 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.10.1"
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
}
}
group 'net.ossindex'
version '0.4.11'
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'java-gradle-plugin'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
// The code depends on a specially shadowed copy of mapdb
tasks.compileJava.dependsOn(':ossi-mapdb:shadowJar')
dependencies {
shadow localGroovy()
shadow gradleApi()
implementation 'org.sonatype.goodies:package-url-java:1.0.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.7'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'org.apache.httpcomponents:httpcore:4.4.11'
implementation 'commons-codec:commons-codec:1.10'
implementation 'net.ossindex:heuristic-version:2.0.0'
implementation 'org.mockito:mockito-core:2.18.0'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation 'org.apache.commons:commons-lang3:3.8.1'
// Use our shadow copy of mapdb
compile files ('ossi-mapdb/build/libs/ossi-mapdb-3.0.7.jar')
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.7.13'
testImplementation gradleTestKit()
testImplementation('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude module: 'groovy-all'
}
}
pluginBundle {
website = 'https://ossindex.sonatype.org/'
vcsUrl = 'https://github.com/ossindex/ossindex-gradle-plugin'
description = 'Checks dependencies for known vulnerabilities'
tags = ['cve', 'audit', 'security', 'dependencies']
plugins {
greetingsPlugin {
id = 'net.ossindex.audit'
displayName = 'OSSIndex Gradle Audit'
}
}
}
task showMeCache {
doLast {
configurations.compile.each { println it }
}
}
// Ensure we package our shadow jar
jar {
from {
zipTree('ossi-mapdb/build/libs/ossi-mapdb-3.0.7.jar')
}
}
wrapper {
gradleVersion = "5.2"
distributionType = Wrapper.DistributionType.ALL
}