Update Gradle from 4.10 to 6.9.2

Jump to 7.x was not done due to usage of `maven` plugin. This needs to
be migrated to `maven-publish`. `maven` was deprecated in Gradle 5.6,
along with `uploadArchives`.

Signed-off-by: Taylor Smock <tsmock@fb.com>
This commit is contained in:
Taylor Smock
2021-12-27 11:52:17 -07:00
parent 1c26099278
commit b1bad7762c
25 changed files with 143 additions and 112 deletions

View File

@ -28,6 +28,11 @@
<property name="fileExtensions" value="java"/>
</module>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="TreeWalker">
<!-- Override the default tab width of 8 so it aligns with standard eclipse formatting. -->
@ -72,12 +77,6 @@
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="120"/>
</module>
<!--<module name="MethodLength"/>-->
<!--<module name="ParameterNumber"/>-->

View File

@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
@ -62,7 +62,7 @@ configure(javaProjects) {
}
dependencies {
testCompile group: 'junit', name: 'junit', version: dependencyVersionJunit
testImplementation group: 'junit', name: 'junit', version: dependencyVersionJunit
}
checkstyle {
@ -87,7 +87,7 @@ configure(javaProjects) {
}
shadowJar {
baseName = project.name
archiveBaseName = project.name
mergeServiceFiles()
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
resource = 'reference.conf'

View File

@ -9,6 +9,7 @@ org.gradle.configureondemand = true
dependencyVersionClassworlds=2.5.2
dependencyVersionCommonsCodec=1.11
dependencyVersionCommonsCompress=1.18
dependencyVersionCommonsCsv=1.9.0
dependencyVersionCommonsIo=2.6
# Should we be using Dbcp2?
dependencyVersionCommonsDbcp=1.4

Binary file not shown.

View File

@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
distributionSha256Sum=8b356fd8702d5ffa2e066ed0be45a023a779bba4dd1a68fd11bc2a6bdc981e8f
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

51
gradlew vendored
View File

@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
@ -138,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@ -159,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

18
gradlew.bat vendored
View File

@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

View File

@ -1,10 +1,10 @@
dependencies {
compile project(':osmosis-core')
compile project(':osmosis-replication')
compile project(':osmosis-xml')
compile group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
compile group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
runtime group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
runtime group: 'mysql', name: 'mysql-connector-java', version: dependencyVersionMySql
testCompile project(':osmosis-testutil')
implementation project(':osmosis-core')
implementation project(':osmosis-replication')
implementation project(':osmosis-xml')
implementation group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
implementation group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
runtimeOnly group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
runtimeOnly group: 'mysql', name: 'mysql-connector-java', version: dependencyVersionMySql
testImplementation project(':osmosis-testutil')
}

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
testCompile project(':osmosis-xml')
testCompile project(':osmosis-testutil')
implementation project(':osmosis-core')
testImplementation project(':osmosis-xml')
testImplementation project(':osmosis-testutil')
}

View File

@ -1,15 +1,18 @@
plugins {
id 'java-library'
}
configurations {
// Exclude because Stax is included in the JDK from java 1.6 onwards.
all*.exclude group: 'javax.xml.stream', module: 'stax-api'
}
dependencies {
compile group: 'net.sf.jpf', name: 'jpf', version: dependencyVersionJpf
compile group: 'com.fasterxml.woodstox', name: 'woodstox-core', version: dependencyVersionWoodstoxCore
compile group: 'org.codehaus.woodstox', name: 'stax2-api', version: dependencyVersionWoodstoxStax2
compile group: 'org.apache.commons', name: 'commons-compress', version: dependencyVersionCommonsCompress
compile group: 'xerces', name: 'xercesImpl', version: dependencyVersionXerces
compile group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
implementation group: 'net.sf.jpf', name: 'jpf', version: dependencyVersionJpf
implementation group: 'com.fasterxml.woodstox', name: 'woodstox-core', version: dependencyVersionWoodstoxCore
implementation group: 'org.codehaus.woodstox', name: 'stax2-api', version: dependencyVersionWoodstoxStax2
api group: 'org.apache.commons', name: 'commons-compress', version: dependencyVersionCommonsCompress
implementation group: 'xerces', name: 'xercesImpl', version: dependencyVersionXerces
implementation group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
}
/*

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
testCompile project(':osmosis-xml')
testCompile project(':osmosis-testutil')
implementation project(':osmosis-core')
testImplementation project(':osmosis-xml')
testImplementation project(':osmosis-testutil')
}

View File

@ -1,7 +1,7 @@
dependencies {
compile project(':osmosis-apidb')
compile project(':osmosis-core')
compile project(':osmosis-replication')
compile project(':osmosis-xml')
testCompile project(':osmosis-testutil')
implementation project(':osmosis-apidb')
implementation project(':osmosis-core')
implementation project(':osmosis-replication')
implementation project(':osmosis-xml')
testImplementation project(':osmosis-testutil')
}

View File

@ -1,5 +1,5 @@
dependencies {
compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
implementation group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
}
// Disable checkstyle because this is external code.

View File

@ -1,7 +1,7 @@
dependencies {
compile project(':osmosis-core')
compile group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
compile group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
implementation group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -1,10 +1,10 @@
dependencies {
compile project(':osmosis-core')
compile group: 'com.google.guava', name: 'guava', version: dependencyVersionGuava
compile group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
compile group: 'commons-io', name: 'commons-io', version: dependencyVersionCommonsIo
compile group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
testCompile project(':osmosis-pbf')
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
implementation group: 'com.google.guava', name: 'guava', version: dependencyVersionGuava
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: dependencyVersionProtobuf
implementation group: 'commons-io', name: 'commons-io', version: dependencyVersionCommonsIo
implementation group: 'org.openstreetmap.pbf', name: 'osmpbf', version: dependencyVersionOsmPbf
testImplementation project(':osmosis-pbf')
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -4,10 +4,10 @@ configurations {
}
dependencies {
compile project(':osmosis-core')
compile group: 'net.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
testCompile project(':osmosis-dataset')
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
implementation group: 'net.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
implementation group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
testImplementation project(':osmosis-dataset')
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -4,13 +4,13 @@ configurations {
}
dependencies {
compile project(':osmosis-core')
compile project(':osmosis-hstore-jdbc')
compile group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
compile group: 'net.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
compile group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
testCompile project(':osmosis-dataset')
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
implementation project(':osmosis-hstore-jdbc')
implementation group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
implementation group: 'net.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
implementation group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
implementation group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
testImplementation project(':osmosis-dataset')
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -1,7 +1,7 @@
dependencies {
compile project(':osmosis-core')
compile project(':osmosis-replication')
compile project(':osmosis-xml')
compile group: 'io.netty', name: 'netty', version: dependencyVersionNetty
testCompile project(':osmosis-testutil')
implementation project(':osmosis-core')
implementation project(':osmosis-replication')
implementation project(':osmosis-xml')
implementation group: 'io.netty', name: 'netty', version: dependencyVersionNetty
testImplementation project(':osmosis-testutil')
}

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
compile project(':osmosis-set')
compile project(':osmosis-xml')
implementation project(':osmosis-core')
implementation project(':osmosis-set')
implementation project(':osmosis-xml')
}

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
testCompile project(':osmosis-testutil')
testCompile project(':osmosis-xml')
implementation project(':osmosis-core')
testImplementation project(':osmosis-testutil')
testImplementation project(':osmosis-xml')
}

View File

@ -1,9 +1,9 @@
dependencies {
compile project(':osmosis-core')
compile project(':osmosis-xml')
compile group: 'org.apache.commons', name: 'commons-csv', version: 1.7
implementation project(':osmosis-core')
implementation project(':osmosis-xml')
implementation group: 'org.apache.commons', name: 'commons-csv', version: dependencyVersionCommonsCsv
testCompile project(':osmosis-testutil')
testImplementation project(':osmosis-testutil')
}
/*

View File

@ -1,4 +1,4 @@
dependencies {
compile project(':osmosis-core')
compile group: 'junit', name: 'junit', version: dependencyVersionJunit
implementation project(':osmosis-core')
implementation group: 'junit', name: 'junit', version: dependencyVersionJunit
}

View File

@ -1,5 +1,5 @@
dependencies {
compile project(':osmosis-core')
compile group: 'commons-codec', name: 'commons-codec', version: dependencyVersionCommonsCodec
testCompile project(':osmosis-testutil')
implementation project(':osmosis-core')
implementation group: 'commons-codec', name: 'commons-codec', version: dependencyVersionCommonsCodec
testImplementation project(':osmosis-testutil')
}

View File

@ -31,8 +31,8 @@ def artefactPrefix = 'osmosis-' + version
task distZip(type: Zip) {
description = 'Builds a zip file containing a self-contained distribution of the application.'
archiveName = artefactPrefix + '.zip'
destinationDir = new File(projectDir, 'build/distribution')
archiveFileName = artefactPrefix + '.zip'
destinationDirectory = new File(projectDir, 'build/distribution')
from('.') {
exclude 'build*'
exclude 'ivy.xml'
@ -43,8 +43,8 @@ distZip.dependsOn syncLibs
task distTgz(type: Tar) {
description = 'Builds a tgz file containing a self-contained distribution of the application.'
archiveName = artefactPrefix + '.tgz'
destinationDir = new File(projectDir, 'build/distribution')
archiveFileName = artefactPrefix + '.tgz'
destinationDirectory = new File(projectDir, 'build/distribution')
compression = Compression.GZIP
from('.') {
exclude 'build*'