-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (74 loc) · 2.13 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
wrapper {
gradleVersion = '5.2.1'
}
allprojects {
group = pGroup
version = pVersion
}
ext.libraries = [
project(':xml4jah-core'),
project(':xml4jah-dom'),
project(':xml4jah-stax')
]
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven {
url 'http://mvn.topobyte.de'
}
mavenCentral()
}
}
configure(libraries) {
apply plugin: 'maven'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
def runForArtifactPublication = project.hasProperty("topobyte")
if (runForArtifactPublication) {
apply from: 'file:///' + System.getProperty("user.home") \
+ '/.gradle/topobyte.gradle'
}
artifacts {
archives sourcesJar
}
def global = new File(rootProject.projectDir, 'info.pom');
def local = new File(project.projectDir, 'info.pom');
def pomInfo = new XmlSlurper().parse(global);
def projName = pomInfo.name
def projDesc = pomInfo.description
if (local.exists()) {
def pomInfoL = new XmlSlurper().parse(local);
projName = pomInfoL.name
projDesc = pomInfoL.description
}
afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
pom.project {
name projName
description projDesc
url pomInfo.url
licenses {
license {
name pomInfo.licenseName
url pomInfo.licenseUrl
distribution pomInfo.licenseDistribution
}
}
}
pom.whenConfigured {
p -> p.dependencies = p.dependencies.findAll {
dep -> dep.scope != "test"
}
}
}
}
}
}
}