forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
56 lines (48 loc) · 1.76 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
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
import org.opensearch.gradle.precommit.ThirdPartyAuditPrecommitPlugin
import org.opensearch.gradle.precommit.ThirdPartyAuditTask
plugins {
id 'java'
// bring in build-tools onto the classpath
id 'opensearch.global-build-info'
}
plugins.apply(ThirdPartyAuditPrecommitPlugin)
repositories {
/**
* Local test repo contains dummy jars with different group names and versions.
* - broken-log4j creates a log4j logger but has no pom, so the class will be missing
* - dummy-io has a class that creates a new java.io.File ( something which third-party-audit-absurd.txt forbids )
* - version 0.0.2 has the same class and one extra file just to make the jar different
* - used for propagating jar containing jdkjarhell jar from integ test runtime classpath
*/
maven {
name = "local-test"
url = file("sample_jars/build/testrepo")
metadataSources {
artifact()
}
}
mavenCentral()
}
dependencies {
jdkJarHell 'org.opensearch:opensearch-core:2.13.0'
compileOnly "org.${project.properties.compileOnlyGroup}:${project.properties.compileOnlyVersion}"
implementation "org.${project.properties.compileGroup}:${project.properties.compileVersion}"
}
tasks.register("empty", ThirdPartyAuditTask) {
targetCompatibility = JavaVersion.VERSION_11
signatureFile = file('third-party-audit-empty.txt')
}
tasks.register("absurd", ThirdPartyAuditTask) {
targetCompatibility = JavaVersion.VERSION_11
signatureFile = file('third-party-audit-absurd.txt')
}