-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
136 lines (124 loc) · 3.66 KB
/
build.gradle
File metadata and controls
136 lines (124 loc) · 3.66 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.9.22'
id 'net.researchgate.release' version '2.8.1'
id 'ds2.base' version '1.0.1'
id "com.github.hierynomus.license" version "0.16.1"
id "com.github.hierynomus.license-base" version "0.16.1"
id("com.github.spotbugs") version "5.2.5"
id "ds2.gitinfo" version "0.0.1"
}
description = "DS/2 OSS Core Project"
ext.scmBranchName = ""
ext.revisionId = ""
ext.date = ""
allprojects {
apply plugin: 'ds2.base'
apply plugin: "com.github.hierynomus.license"
apply plugin: 'ds2.gitinfo'
group = 'ds2.oss.core'
ext.log4j2Version = '2.22.0'
ext.logbackVersion = '1.2.4'
ext.jacksonVersion = '2.16.0'
baseConfig {
javaVersion = JavaVersion.VERSION_1_8
//useToolchain = false
}
gitInfo() {
countCommitId = 10
generatePropertiesIn = "" + project.buildDir + "/hello.properties"
branchPropertyName = "scmBranchName"
revisionPropertyName = "revisionId"
builddatePropertyName = 'date'
}
repositories {
mavenLocal()
if (project.hasProperty('ds2RepoUrl')) {
println 'Can use DS2 Repo :)'
maven {
url ds2RepoUrl
credentials {
username ds2RepoUser
password ds2RepoPw
}
}
}
maven { url "https://maven.java.net/content/groups/promoted/" }
maven { url "https://ds2mavenrepos.blob.core.windows.net/releases/" }
mavenCentral()
}
release {
git {
requireBranch = 'release/0.1'
}
}
license {
ext.year = '2020'
ext.name = 'DS/2'
ext.email = 'dstrauss@ds-2.de'
header rootProject.file('aslv2_header.txt')
ignoreFailures = true
strictCheck false
includes(["**/*.java", "**/*.properties"])
excludes(["**/*Test.java"])
mapping {
java = 'SLASHSTAR_STYLE'
}
}
tasks.withType(org.gradle.jvm.tasks.Jar) {
it.duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
publishing {
repositories {
maven {
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
publications {
core(MavenPublication) {
from components.java
artifact srcJar {
classifier "sources"
}
artifact docJar {
classifier "javadoc"
}
}
}
}
spotbugs {
//toolVersion = "3.1.9"
//sourceSets = [sourceSets.main]
ignoreFailures = false
reportsDir = file("$project.buildDir/findbugsReports")
effort = "max"
showProgress = true
reportLevel = "low"
}
// checkstyle {
// ignoreFailures = true
// }
spotbugsMain {
reports {
xml {
enabled true
// destination "build/findbugs.xml"
}
html.enabled true
//html.stylesheet resources.text.fromFile('config/xsl/findbugs-custom.xsl')
}
}
// tasks.withType(Checkstyle) {
// reports {
// xml.enabled false
// html.enabled true
// //html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
// }
// }
}
beforeReleaseBuild.dependsOn project.tasks.getByName('license')