-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
102 lines (87 loc) · 2.41 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
buildscript {
ext {
springBootVersion = '2.5.4'
springVersion = '5.3.9.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'org.owasp:dependency-check-gradle:6.2.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
plugins {
id 'io.codearte.nexus-staging' version '0.30.0'
}
//
//\
///\
////\
def jlineup_version = "4.3.4"
/////
////
///
//
project.ext.set("debugUpload", false)
repositories {
mavenCentral()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
//maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
apply plugin: 'java'
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'org.owasp.dependencycheck'
nexusStaging {
username = sonatypeUsername
password = sonatypePassword
packageGroup = 'de.otto'
}
dependencyCheck {
failBuildOnCVSS = 4
suppressionFiles = ["${rootDir}/dependency-check-suppressions.xml"]
}
subprojects {
version = jlineup_version
group = 'de.otto'
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
task allDeps(type: DependencyReportTask) {}
apply plugin: 'application'
apply plugin: 'maven-publish'
apply plugin: 'project-report'
apply plugin: 'signing'
apply plugin: 'idea'
jar {
manifest.attributes provider: 'gradle'
}
}
// This function converts 1.8 -> 8
static String compat(String src) {
if (src.contains('.')) {
src.substring(src.lastIndexOf('.')+1)
} else {
src
}
}
static String runCommand(command) {
Process proc = command.execute()
def out = new StringBuffer()
proc.consumeProcessOutputStream(out)
proc.consumeProcessErrorStream(out)
proc.waitFor()
def errorlevel = proc.exitValue()
if (errorlevel != 0) {
throw new RuntimeException("exec failed on command: '${command}' with errorlevel ${errorlevel}".toString())
}
//System.err.println("Git Hash: " + out.toString().trim())
out.toString().trim()
}