forked from jpos/jPOS-EE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
141 lines (126 loc) · 3.76 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
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
137
138
139
140
apply from: 'libraries.gradle'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:5.2.1'
}
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'org.owasp.dependencycheck'
group = 'org.jpos.ee'
version = '2.2.7-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
[ compileJava, compileTestJava, javadoc ]*.options*.encoding = 'UTF-8'
def isSnapshot = version.contains("SNAPSHOT")
def mavenCentralRepo = isSnapshot ?
'https://oss.sonatype.org/content/repositories/snapshots/' :
'https://oss.sonatype.org/service/local/staging/deploy/maven2';
project.archivesBaseName="jposee-${project.name}"
javadoc.failOnError = false
def pomConfig = {
name 'jPOS-EE Project'
description """
jPOS Extended Edition
"""
url 'http://jpos.org'
inceptionYear '1998'
organization {
name 'jPOS.org'
url 'http://jpos.org'
}
issueManagement {
system 'YouTrack'
url 'https://jpos.org/issues'
}
scm {
url "http://github.com/jpos/jPOS"
connection "scm:git:https://github.com/jpos/jPOS-EE.git"
developerConnection "scm:git:[email protected]:jpos/jPOS-EE.git"
}
licenses {
license {
name 'GNU AFFERO GENERAL PUBLIC LICENSE'
url 'http://www.gnu.org/licenses/agpl-v3.html'
comments 'See http://jpos.org/license for more details.'
distribution 'repo'
}
}
developers {
developer {
id 'jpos-team'
name 'jPOS Development Team'
email '[email protected]'
}
}
}
configure(install.repositories.mavenInstaller) {
pom.project pomConfig
}
signing {
required { !isSnapshot }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
pom.project pomConfig
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'file:///opt/local/maven')
/*
repository(url: mavenCentralRepo) {
authentication(userName: mavenCentralUsername, password: mavenCentralPassword)
}
*/
}
}
}
test {
useJUnitPlatform()
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives sourceJar
}
repositories {
mavenCentral()
maven { url 'http://jpos.org/maven' }
maven { url 'http://download.oracle.com/maven' }
maven { url 'http://maven.vaadin.com/vaadin-addons' }
maven { url 'https://maven.vaadin.com/vaadin-prereleases' }
jcenter()
mavenLocal()
}
dependencies {
testImplementation libraries.junit
//Java 10 support
testCompile('com.sun.xml.bind:jaxb-impl:2.1.2')
testCompile('com.sun.activation:javax.activation:1.2.0')
testCompile('javax.xml.bind:jaxb-api:2.3.0')
}
task allDeps(type: DependencyReportTask) {}
}
task allSources(type: Jar,dependsOn: subprojects.assemble) {
baseName = 'jposee-sources'
from subprojects.collect { project ->
project.sourceSets.main.allSource
}
}
// Configure IDEA to use Git
idea.project.ipr {
withXml { provider ->
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
}
}