Skip to content

Commit

Permalink
crowdin-cli: Upgrade Gradle to 8.1.1 (#573)
Browse files Browse the repository at this point in the history
* Add and configure [refreshVersions](https://jmfayard.github.io/refreshVersions/) module to update dependencies
* Update dependencies to latest version for Gradle compatibility
* Update Gradle to version 8.1.1

Note: Jacoco can not be automatically updated by the update and its version will need to be updated in the versions.properties manually.
  • Loading branch information
Myself5 authored Apr 28, 2023
1 parent 0b9905f commit 0580a5e
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 51 deletions.
63 changes: 32 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import com.github.spotbugs.snom.SpotBugsReport
import static de.fayard.refreshVersions.core.Versions.versionFor

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.github.johnrengelman.shadow'
id 'jacoco'
id "com.github.spotbugs" version "4.7.1"
id 'org.asciidoctor.jvm.convert' version '3.1.0'
id 'com.github.spotbugs'
id 'org.asciidoctor.jvm.convert'
}

apply plugin: 'checkstyle'
Expand All @@ -30,43 +31,43 @@ repositories {
}

dependencies {
implementation 'org.json:json:20210307'
implementation 'commons-cli:commons-cli:1.4'
implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
implementation 'org.yaml:snakeyaml:1.29'
implementation 'commons-io:commons-io:2.10.0'
implementation 'org.json:json:_'
implementation 'commons-cli:commons-cli:_'
implementation 'org.apache.logging.log4j:log4j-api:_'
implementation 'org.apache.logging.log4j:log4j-core:_'
implementation 'org.yaml:snakeyaml:_'
implementation 'commons-io:commons-io:_'

implementation 'org.glassfish.jersey.core:jersey-client:3.0.2'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.2'
implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.0.2'
implementation 'javax.activation:activation:1.1.1'
implementation 'org.glassfish.jersey.core:jersey-client:_'
implementation 'org.glassfish.jersey.inject:jersey-hk2:_'
implementation 'org.glassfish.jersey.media:jersey-media-multipart:_'
implementation 'javax.activation:activation:_'

implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'net.lingala.zip4j:zip4j:2.8.0'
implementation 'net.ricecode:string-similarity:1.0.0'
implementation 'com.github.fge:json-patch:1.9'
implementation 'io.github.cdimascio:dotenv-java:2.2.0'
implementation 'org.apache.commons:commons-lang3:_'
implementation 'net.lingala.zip4j:zip4j:_'
implementation 'net.ricecode:string-similarity:_'
implementation 'com.github.fge:json-patch:_'
implementation 'io.github.cdimascio:dotenv-java:_'

implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation 'org.apache.httpcomponents:httpclient:_'

compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
testCompileOnly 'org.projectlombok:lombok:1.18.20'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
compileOnly 'org.projectlombok:lombok:_'
annotationProcessor 'org.projectlombok:lombok:_'
testCompileOnly 'org.projectlombok:lombok:_'
testAnnotationProcessor 'org.projectlombok:lombok:_'

implementation 'com.github.crowdin:crowdin-api-client-java:1.6.2'
implementation 'com.github.crowdin:crowdin-api-client-java:_'

testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation Testing.junit.jupiter
testImplementation Testing.hamcrest
testImplementation Testing.mockito.core

spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:_'
}

dependencies {
implementation "info.picocli:picocli:4.7.1"
annotationProcessor "info.picocli:picocli-codegen:4.7.1"
implementation "info.picocli:picocli:_"
annotationProcessor "info.picocli:picocli-codegen:_"
}

jar {
Expand All @@ -93,7 +94,7 @@ test {
}

jacoco {
toolVersion = "0.8.7"
toolVersion = versionFor(project, "version.jacoco")
reportsDirectory = file("$buildDir/reports")
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 23 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright ? 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?,
# ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?;
# * compound commands having a testable exit status, especially ?case?;
# * various built-in commands including ?command?, ?set?, and ?ulimit?.
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand All @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${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='"-Xmx64m" "-Xms64m"'
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand All @@ -205,6 +210,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
7 changes: 6 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
rootProject.name = 'cli'

plugins {
// See https://jmfayard.github.io/refreshVersions
id 'de.fayard.refreshVersions' version '0.51.0'
}

rootProject.name = 'cli'
65 changes: 65 additions & 0 deletions versions.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#### Dependencies and Plugin versions with their available updates.
#### Generated by `./gradlew refreshVersions` version 0.51.0
####
#### Don't manually edit or split the comments that start with four hashtags (####),
#### they will be overwritten by refreshVersions.
####
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file

version.org.yaml..snakeyaml=1.33

version.org.projectlombok..lombok=1.18.26

version.org.json..json=20230227

version.org.glassfish.jersey.media..jersey-media-multipart=3.1.1

version.org.glassfish.jersey.inject..jersey-hk2=3.1.1

version.org.glassfish.jersey.core..jersey-client=3.1.1

version.org.apache.logging.log4j..log4j-core=2.20.0

version.org.apache.logging.log4j..log4j-api=2.20.0

version.org.apache.httpcomponents..httpclient=4.5.14

version.org.apache.commons..commons-lang3=3.12.0

version.net.ricecode..string-similarity=1.0.0

version.net.lingala.zip4j..zip4j=2.11.5

version.mockito=3.12.4

version.junit.jupiter=5.9.3

version.javax.activation..activation=1.1.1

version.io.github.cdimascio..dotenv-java=2.3.2

version.info.picocli..picocli-codegen=4.7.3

version.info.picocli..picocli=4.7.3

version.hamcrest=2.2

version.commons-io..commons-io=2.11.0

version.commons-cli..commons-cli=1.5.0

version.com.h3xstream.findsecbugs..findsecbugs-plugin=1.12.0

version.com.github.fge..json-patch=1.13

version.com.github.crowdin..crowdin-api-client-java=1.6.2

plugin.org.asciidoctor.jvm.convert=3.3.2

plugin.com.github.spotbugs=4.8.0

plugin.com.github.johnrengelman.shadow=7.1.2

## Jacoco Version needs manual update
version.jacoco=0.8.10

0 comments on commit 0580a5e

Please sign in to comment.