Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflow_scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ then
if [ "$MANUAL_RELEASE_TRIGGERED" = "true" ];
then
echo "Sign, Upload archives to local repo, Upload archives to Sonatype, Close and release repository."
./gradlew uploadArchives publishToNexusAndClose
./gradlew publishAllPublicationsToMavenRepository publishAllPublicationsToSnapshotRepository
#python -m pip install --user --upgrade twine
#twine upload ./pyatlas/dist/*
else
Expand Down
122 changes: 71 additions & 51 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id 'java'
id 'checkstyle'
id 'groovy'
id 'maven'
id 'maven-publish'
id 'idea'
id 'signing'
id 'checkstyle'
id 'jacoco'
id "com.diffplug.gradle.spotless" version "3.27.0"
id 'org.sonarqube' version '2.8'
id 'com.google.protobuf' version '0.8.8'
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.diffplug.spotless' version '6.3.0'
id 'com.google.protobuf' version '0.8.18'
id 'org.sonarqube' version '3.3'
}

apply from: 'dependencies.gradle'
Expand Down Expand Up @@ -38,62 +38,66 @@ repositories

configurations
{
shaded
shaded.extendsFrom(implementation)
}

dependencies
{
compile packages.slf4j.api
compile packages.opencsv
compile packages.gson
compile packages.http
compile packages.jts
compile packages.spatial4j
compile packages.geotools
compile packages.osmosis.core
compile packages.osmosis.pbf
compile packages.osmosis.xml
compile packages.osmosis.hstore
compile packages.commons.cli
compile packages.commons.csv
compile packages.commons.io
compile packages.commons.lang
compile packages.commons.math
compile packages.commons.text
compile packages.classgraph
compile packages.guava
compile packages.jsonassert
compile packages.jackson.core
compile packages.jackson.databind
compile packages.jackson.dataformat
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
implementation 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
implementation packages.jsonassert
api packages.jts
// Support JUnit 3/4 tests
compile packages.junit.junit4
compile packages.protobuf_java
compile packages.protoc
compile packages.artifact
compile packages.groovy
compile packages.checkstyle
compile packages.diff_utils
compile packages.groovy_json
compile packages.jim_fs

testCompile packages.checkstyle_tests
testCompile packages.junit.api
testCompile packages.junit.engine
testCompile packages.junit.params
testCompile packages.junit.vintage

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
checkstyle packages.atlas_checkstyle

shaded project.configurations.getByName('compile')
shaded packages.log4j.api
shaded packages.log4j.slf4j

}

task shaded(type: Jar) {
baseName = project.name
archiveBaseName = project.name
classifier = 'shaded'
from
{
Expand Down Expand Up @@ -143,3 +147,19 @@ idea {
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")
}
}
18 changes: 13 additions & 5 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
<module name="TreeWalker">
<!-- Checks for Javadoc comments. -->
<module name="JavadocMethod">
<property name="scope" value="protected" />
<property name="excludeScope" value="private" />
<property name="allowMissingJavadoc" value="true" />
<property name="allowUndeclaredRTE" value="true" />
<property name="accessModifiers" value="public, protected, package" />
</module>
<module name="JavadocType">
<property name="authorFormat" value="\S" />
Expand Down Expand Up @@ -43,7 +40,18 @@

<!-- Checks for imports -->
<module name="AvoidStarImport" />
<module name="CustomImportOrder" />
<!-- Spotless allows for more groups than CustomImportOrder.
Spotless: importOrder 'static java', 'static javax', 'static org', 'static com', 'static scala', 'java', 'javax', 'org', 'com', 'scala'
This enforces blank lines between `import java.*`, `import javax.*`, `import org*`, etc. CustomImportOrder only enforces spaces between groups,
and expects no spaces between packages of the same group.
<module name="CustomImportOrder">
<property name="customImportOrderRules" value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE"/>
<property name="separateLineBetweenGroups" value="true"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="specialImportsRegExp" value="^org\."/>
<property name="thirdPartyPackageRegExp" value="^com\."/>
</module>
-->
<module name="IllegalImport" />
<module name="ImportOrder">
<property name="groups" value="java,javax,org,com,*"/>
Expand Down
65 changes: 35 additions & 30 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
project.ext.versions = [
checkstyle: '8.18',
junit4: '4.13.1',
junit5: '5.8.1',
jacoco: '0.8.3',
checkstyle: '9.3',
junit4: '4.13.2',
junit5: '5.8.2',
jacoco: '0.8.7',
slf4j: '1.7.32',
log4j: '2.17.1',
opencsv: '2.3',
gson: '2.2.4',
http: '4.5.1',
gson: '2.9.0',
http: '4.5.13',
jts: '1.18.2',
spatial4j: '0.7',
geotools: '24.0',
osmosis: '0.44.1',
commons_cli: '1.3.1',
commons_csv: '1.2',
commons_io: '2.5',
commons_lang: '3.9',
commons_math: '3.3',
commons_text: '1.8',
classgraph: '4.6.32',
guava: '27.0.1-jre',
jsonassert:'1.3.0',
jackson_core:'2.10.5',
jackson_databind:'2.10.5',
jackson_dataformat_yaml:'2.10.5',
protobuf_java:'2.6.1',
protoc:'2.6.1',
artifact:'3.5.4',
groovy: '2.5.4',
atlas_checkstyle: '5.6.9',
spatial4j: '0.8',
geotools: '26.2',
osmosis: '0.48.3',
commons_cli: '1.5.0',
commons_compress: '1.21',
commons_csv: '1.9.0',
commons_io: '2.11.0',
commons_lang: '3.12.0',
commons_math: '3.6.1',
commons_text: '1.9',
classgraph: '4.8.139',
guava: '31.0.1-jre',
google_truth: '1.1.3',
jsonassert:'1.5.0',
jackson_core:'2.13.1',
jackson_databind:'2.13.1',
jackson_dataformat_yaml:'2.13.1',
protobuf_java:'3.19.1',
protoc:'3.19.1',
artifact:'3.8.4',
groovy: '3.0.9',
atlas_checkstyle: '6.6.1',
diff_utils: '4.0',
groovy_json: '2.5.4',
jim_fs: '1.1'
groovy_json: '3.0.9',
jim_fs: '1.2'
]

project.ext.packages = [
Expand All @@ -50,20 +52,23 @@ project.ext.packages = [
slf4j: "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}",
],
opencsv: "net.sf.opencsv:opencsv:${versions.opencsv}",
google_truth: "com.google.truth:truth:${versions.google_truth}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can thank the testing for Checkstyle for that, as I noted in a comment, "Google Truth is needed for checkstyle tests (as of checkstyle 9.2.1)".

gson: "com.google.code.gson:gson:${versions.gson}",
http: "org.apache.httpcomponents:httpclient:${versions.http}",
jts: "org.locationtech.jts:jts-core:${versions.jts}",
spatial4j: "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}",
geotools: "org.geotools:gt-shapefile:${versions.geotools}",
osmosis: [
core: "org.openstreetmap.osmosis:osmosis-core:${versions.osmosis}",
pbf: "org.openstreetmap.osmosis:osmosis-pbf:${versions.osmosis}",
xml: "org.openstreetmap.osmosis:osmosis-xml:${versions.osmosis}",
hstore:"org.openstreetmap.osmosis:osmosis-hstore-jdbc:${versions.osmosis}",
osmbinary: "org.openstreetmap.osmosis:osmosis-osm-binary:${versions.osmosis}",
pbf: "org.openstreetmap.osmosis:osmosis-pbf:${versions.osmosis}",
pg:"org.openstreetmap.osmosis:osmosis-pgsnapshot:${versions.osmosis}",
xml: "org.openstreetmap.osmosis:osmosis-xml:${versions.osmosis}",
],
commons:[
cli: "commons-cli:commons-cli:${versions.commons_cli}",
compress: "org.apache.commons:commons-compress:${versions.commons_compress}",
csv : "org.apache.commons:commons-csv:${versions.commons_csv}",
io: "commons-io:commons-io:${versions.commons_io}",
lang: "org.apache.commons:commons-lang3:${versions.commons_lang}",
Expand Down
Loading