forked from google/tsunami-security-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
83 lines (70 loc) · 2.38 KB
/
build.gradle
File metadata and controls
83 lines (70 loc) · 2.38 KB
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
// Current gradle version 6.5.
plugins {
id 'net.ltgt.errorprone' apply false version "4.2.0"
id "com.gradleup.shadow" version "8.3.6"
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'idea'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'com.gradleup.shadow'
group = 'com.google.tsunami'
version = '0.1.1-SNAPSHOT' // Current Tsunami version
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url 'https://maven-central.storage-download.googleapis.com/repos/central/data/'
}
mavenCentral()
mavenLocal()
}
if (rootProject.properties.get('errorProne', true)) {
dependencies {
errorprone "com.google.errorprone:error_prone_core:2.38.0"
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
}
// Disable ErrorProne for all generated codes.
tasks.withType(JavaCompile).configureEach {
options.errorprone.disableWarningsInGeneratedCode = false
options.errorprone.excludedPaths = '.*/build/generated/.*'
}
} else {
// Disable Error Prone
allprojects {
afterEvaluate { project ->
project.tasks.withType(JavaCompile) {
options.errorprone.enabled = false
}
}
}
}
plugins.withId('java') {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
java.withJavadocJar()
java.withSourcesJar()
jar.manifest {
attributes('Implementation-Title': name,
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-JDK': System.getProperty('java.version'),
'Source-Compatibility': sourceCompatibility,
'Target-Compatibility': targetCompatibility)
}
// Log stacktrace to console when test fails.
test {
testLogging {
exceptionFormat = 'full'
showExceptions true
showCauses true
showStackTraces true
}
maxHeapSize = '1500m'
}
}
plugins.withId('maven-publish') {
shadowJar {
archiveClassifier = null
}
}
}