forked from otto-de/jlineup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (91 loc) · 3.05 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
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
springVersion = '5.0.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:3.3.1'
}
}
plugins {
id 'io.codearte.nexus-staging' version '0.11.0'
}
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: 'io.codearte.nexus-staging'
apply plugin: 'org.owasp.dependencycheck'
nexusStaging {
username = sonatypeUsername
password = sonatypePassword
packageGroup = 'de.otto'
}
apply plugin: 'idea'
idea {
project {
languageLevel = '1.8'
ipr.withXml { provider ->
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
}
}
workspace {
iws {
withXml { xmlFile ->
def runManager = xmlFile.asNode().component.find { it.@name == 'RunManager' }
// setup JUnit's default run configuration
def junitDefaults = runManager.configuration.find { it.@default == 'true' && it.@type == 'JUnit' }
junitDefaults.option.find { it.@name == 'WORKING_DIRECTORY' }.replaceNode {
option(name: 'WORKING_DIRECTORY', value: '$MODULE_DIR$')
}
}
}
}
}
subprojects {
version = '3.0.0-rc7'
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: 'java'
apply plugin: 'application'
apply plugin: 'project-report'
apply plugin: 'signing'
apply plugin: 'idea'
apply plugin: 'maven'
jar {
manifest.attributes provider: 'gradle'
}
idea {
module {
iml {
withXml {
def moduleRoot = it.asNode()
def facetManager = moduleRoot.component.find { component -> component.'@name' == 'FacetManager' }
if (!facetManager) {
facetManager = moduleRoot.appendNode('component', [name: 'FacetManager'])
}
def springFacet = facetManager.facet.find { facet -> facet.'@type' == 'Spring' && facet.'@name' == 'Spring' }
if (!springFacet) {
springFacet = facetManager.appendNode('facet', [type: 'Spring', name: 'Spring'])
springFacet.appendNode('configuration')
}
}
}
}
}
}