-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
134 lines (112 loc) · 3.38 KB
/
build.gradle
File metadata and controls
134 lines (112 loc) · 3.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
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
/*
* Copyright (c) Haulmont 2025. All Rights Reserved.
* Use is subject to license terms.
*/
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath "io.jmix.gradle:jmix-gradle-plugin:2.4.1"
}
}
plugins {
id 'com.github.spotbugs' version '6.1.7' apply false
}
group = 'io.flowset.ui'
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'io.jmix'
if (project.hasProperty('spotbugsEnabled')) {
apply plugin: "com.github.spotbugs"
}
repositories {
mavenCentral()
maven {
url = 'https://nexus.flowset.io/repository/public'
}
maven {
url 'https://global.repo.jmix.io/repository/public'
}
}
jmix {
bomVersion = '2.4.1'
projectId = 'flowset-ui-kit'
}
group = this.group
version = this.version
def props = new Properties()
buildFile.withInputStream { props.load(it) }
def subArchivesBaseName = props.getProperty('archivesBaseName')
def archName = subArchivesBaseName.substring(1, subArchivesBaseName.length() - 1)
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives sourcesJar
}
publishing {
if (rootProject.hasProperty('flowsetUploadUrl')) {
repositories {
maven {
url = rootProject['flowsetUploadUrl']
credentials {
username rootProject['flowsetUploadUser']
password rootProject['flowsetUploadPassword']
}
allowInsecureProtocol = true
}
}
}
publications {
javaMaven(MavenPublication) {
artifactId = archName
from components.java
}
}
}
if (project.hasProperty('spotbugsEnabled')) {
spotbugs {
ignoreFailures = false
omitVisitors = ['FindDoubleCheck']
excludeFilter = project.file('../etc/spotbugs/spotbugs-exclude-filter.xml')
effort = Effort.valueOf('MAX')
reportLevel = Confidence.valueOf('MEDIUM')
}
spotbugsMain {
jvmArgs = ['-Xmx1024m']
reports {
xml.enabled = false
html {
enabled = true
stylesheet = 'fancy-hist.xsl'
destination layout.buildDirectory.file("reports/spotbugs/${project.name}.html").get().asFile
}
}
}
spotbugsTest {
jvmArgs = ['-Xmx1024m']
reports {
xml.enabled = false
html {
enabled = true
stylesheet = 'fancy-hist.xsl'
destination layout.buildDirectory.file("reports/spotbugs/test-${project.name}.html").get().asFile
}
}
}
}
// remove after https://youtrack.jetbrains.com/issue/IDEA-227215 is fixed
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
tasks.withType(Javadoc) {
options.addStringOption("sourcepath", "")
options.encoding = 'UTF-8'
options.memberLevel = JavadocMemberLevel.PROTECTED
}
}