-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
113 lines (99 loc) · 3.01 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
wrapper {
gradleVersion = '7.6.1'
}
allprojects {
group = 'de.topobyte'
version = '1.3.0'
}
// leaving this here for reference on how to modify
// a single module version
configure(project(':osm4j-core')) {
version = '1.3.0'
}
ext.libraries = [
project(':osm4j-core'),
project(':osm4j-edit'),
project(':osm4j-extra'),
project(':osm4j-geometry'),
project(':osm4j-utils'),
project(':osm4j-incubating'),
project(':osm4j-pbf'),
project(':osm4j-pbf-full-runtime'),
project(':osm4j-replication'),
project(':osm4j-tbo'),
project(':osm4j-testing'),
project(':osm4j-xml')
]
configure(libraries) {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
}
configure(subprojects.findAll {it !in libraries}) {
apply plugin: 'java'
}
subprojects {
task allDeps(type: DependencyReportTask) {}
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
repositories {
maven {
url 'https://mvn.topobyte.de'
}
maven {
url 'https://mvn.slimjars.com'
}
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
withSourcesJar()
}
def global = new File('info.pom');
def local = new File(project.projectDir, 'info.pom');
def pomInfo = new XmlSlurper().parse(global);
def publish = !project.hasProperty('dontPublish')
if (publish) {
def pomInfoL = new XmlSlurper().parse(local);
pomInfo.name = pomInfoL.name
pomInfo.description = pomInfoL.description
}
if (publish) {
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = "$pomInfo.name"
description = "$pomInfo.description"
url = "$pomInfo.url"
licenses {
license {
name = "$pomInfo.licenseName"
url = "$pomInfo.licenseUrl"
distribution = "$pomInfo.licenseDistribution"
}
}
}
}
}
}
}
}
subprojects {
task showInterModuleDependencies {
doLast {
println "module '$project.name'"
project.configurations.compile.resolvedConfiguration.resolvedArtifacts.each {
if (it.id instanceof org.gradle.internal.component.local.model.PublishArtifactLocalArtifactMetadata) {
def component = it.id.componentIdentifier
if (component instanceof org.gradle.api.internal.artifacts.DefaultProjectComponentIdentifier) {
def path = component.projectPath
def name = path.substring(path.lastIndexOf(':') + 1)
println " → '$name'"
}
}
}
}
}
}