-
Notifications
You must be signed in to change notification settings - Fork 80
/
build.gradle
165 lines (148 loc) · 4.37 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
plugins {
id 'checkstyle'
id 'groovy'
id 'idea'
id 'jacoco'
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.diffplug.spotless' version '6.25.0'
id 'com.google.protobuf' version '0.8.18'
id 'org.sonarqube' version '3.3'
}
apply from: 'dependencies.gradle'
apply from: 'gradle/quality.gradle'
apply from: 'gradle/protobuf.gradle'
apply from: 'gradle/pyatlas.gradle'
apply from: 'gradle/deployment.gradle'
description = "Atlas Library"
sourceCompatibility=11
targetCompatibility=11
repositories
{
// For geotools
maven {
url "https://repo.osgeo.org/repository/release/"
content {
// osgeo removed the jar and added a -norce version
excludeVersion("log4j", "log4j", "1.2.17")
}
}
mavenCentral()
}
configurations
{
shaded.extendsFrom(implementation)
}
dependencies
{
implementation packages.artifact
implementation packages.checkstyle
api packages.classgraph
implementation packages.commons.cli
implementation packages.commons.compress
implementation packages.commons.csv
implementation packages.commons.io
implementation packages.commons.lang
implementation packages.commons.math
implementation packages.commons.text
implementation packages.diff_utils
api packages.geotools
api packages.groovy
implementation packages.groovy_json
implementation packages.gson
api packages.guava
api packages.http
api packages.jackson.core
api packages.jackson.databind
api packages.jackson.dataformat
api packages.jim_fs
api packages.jsonassert
api packages.jts
// Support JUnit 3/4 tests
api packages.junit.junit4 // only API level due to CoreTestRule
implementation packages.opencsv
api packages.osmosis.core
implementation packages.osmosis.hstore
implementation packages.osmosis.osmbinary
implementation packages.osmosis.pbf
implementation packages.osmosis.xml
implementation packages.protobuf_java
implementation packages.protoc
implementation packages.slf4j.api
implementation packages.spatial4j
testImplementation packages.checkstyle_tests
// Google Truth is needed for checkstyle tests (as of checkstyle 9.2.1)
testImplementation packages.google_truth
testImplementation packages.junit.api
testImplementation packages.junit.engine
testImplementation packages.junit.junit4
testImplementation packages.junit.params
testImplementation packages.junit.vintage
checkstyle files("build/libs/${project.name}-${project.version}.jar")
checkstyle packages.checkstyle
shaded packages.log4j.api
shaded packages.log4j.slf4j
}
task shaded(type: Jar) {
archiveBaseName = project.name
classifier = 'shaded'
from
{
configurations.shaded.collect
{
it.isDirectory() ? it : zipTree(it).matching{
exclude
{
it.path.contains('META-INF') && (it.path.endsWith('.SF') || it.path.endsWith('.DSA') || it.path.endsWith('.RSA'))
}
}
}
}
with jar
zip64 = true
}
/**
* Artifact related items
*/
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts
{
archives javadocJar, sourcesJar
}
/*
* This is to skip the tasks for which there is a skip<TaskName>=true
* environment variable
*/
def skippedTaskNames = System.getenv().findAll { key, value ->
key.startsWith("skip") && value.equalsIgnoreCase("true")
}.keySet().collect { it.substring(4) }
gradle.startParameter.excludedTaskNames += skippedTaskNames
idea {
project {
languageLevel = '1.8'
}
}
/*
* Workaround Gradle not liking duplicate files
* I suspect that it is due to fake duplicates.
* For more information, see https://github.com/gradle/gradle/issues/17236
* (AKA, remove this when that issue is fixed)
*
* Note: It may be useful to disable this from time to time on Gradle update
* to see if either it is fixed or if there is better debugging
* information available.
*/
tasks.each {
task -> if (task.hasProperty("duplicatesStrategy")) {
task.setProperty("duplicatesStrategy", "EXCLUDE")
}
}