Skip to content

Commit

Permalink
build: Removed use of spring boot plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Mar 12, 2024
1 parent 2f3236a commit 6799f01
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 77 deletions.
25 changes: 7 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ config {
}
}
}

docs {
javadoc {
enabled = false
Expand Down Expand Up @@ -95,29 +95,18 @@ subprojects { subproj ->

dependencies {
compileOnly group: 'com.google.code.findbugs', name: 'jsr305', version: jsr305Version
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.junit.platform:junit-platform-launcher'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junitVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: junitVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: junitPlatformVersion
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: testcontainersVersion
testImplementation(group: 'com.redis.testcontainers', name: 'testcontainers-redis', version: testcontainersRedisVersion) {
exclude group: 'com.redis', module: 'lettucemod'
}
testImplementation group: 'com.redis', name: 'testcontainers-redis', version: testcontainersRedisVersion
}

test {
useJUnitPlatform()
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}


configurations {
all*.exclude module: 'spring-boot-starter-logging'
}
Expand Down
11 changes: 9 additions & 2 deletions connectors/riot-db/riot-db.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ dependencies {
implementation 'org.postgresql:postgresql'
implementation group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: mssqlVersion
implementation group: 'com.oracle.ojdbc', name: 'ojdbc8', version: oracleVersion
// implementation group: 'com.ibm.db2', name: 'jcc', version: db2Version
// implementation group: 'org.xerial', name: 'sqlite-jdbc', version: sqliteVersion
}

compileJava {
Expand All @@ -44,3 +42,12 @@ if (!(project.findProperty('automatic.module.name.skip') ?: false).toBoolean())
}
}
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}
9 changes: 9 additions & 0 deletions connectors/riot-faker/riot-faker.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ if (!(project.findProperty('automatic.module.name.skip') ?: false).toBoolean())
}
}
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}
14 changes: 12 additions & 2 deletions connectors/riot-file/riot-file.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies {
implementation 'org.springframework:spring-oxm'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-aws-context', version: awsVersion
implementation group: 'org.springframework.cloud', name: 'spring-cloud-aws-autoconfigure', version: awsVersion
implementation (group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-storage', version: gcpVersion) {
implementation(group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-storage', version: gcpVersion) {
exclude group: 'javax.annotation', module: 'javax.annotation-api'
}
testImplementation group: 'com.redis', name: 'spring-batch-redis', version: springBatchRedisVersion, classifier: 'tests'
testImplementation 'commons-io:commons-io:2.13.0'
testImplementation group: 'commons-io', name: 'commons-io', version: commonsIoVersion
}

compileJava {
Expand All @@ -44,3 +44,13 @@ if (!(project.findProperty('automatic.module.name.skip') ?: false).toBoolean())
}
}
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}

14 changes: 12 additions & 2 deletions core/riot-core/riot-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ config {

dependencies {
api 'org.slf4j:slf4j-api'
api 'org.slf4j:jcl-over-slf4j'
api group: 'com.redis', name: 'lettucemod', version: lettucemodVersion
api group: 'com.redis', name: 'spring-batch-redis', version: springBatchRedisVersion
api 'org.springframework.batch:spring-batch-core'
api 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
implementation group: 'org.latencyutils', name: 'LatencyUtils', version: latencyutilsVersion
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.hsqldb:hsqldb'
implementation group: 'org.latencyutils', name: 'LatencyUtils', version: latencyutilsVersion
implementation 'org.apache.commons:commons-pool2'
testImplementation 'org.slf4j:slf4j-simple'
testImplementation group: 'com.redis', name: 'spring-batch-redis', version: springBatchRedisVersion, classifier: 'tests'
Expand All @@ -46,3 +47,12 @@ if (!(project.findProperty('automatic.module.name.skip') ?: false).toBoolean())
}
}
}

bootJar {
enabled = false
}

jar {
enabled = true
archiveClassifier = ''
}
5 changes: 5 additions & 0 deletions docs/guide/guide.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id 'org.kordamp.gradle.guide'
id 'org.ajoberstar.git-publish'
}

configurations {
asciidoctorExtensions
}
Expand Down
45 changes: 32 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,58 @@
# limitations under the License.
#
group = com.redis
sourceCompatibility = 1.8
targetCompatibility = 1.8
testSourceCompatibility = 11
testTargetCompatibility = 11
sourceCompatibility = 17
targetCompatibility = 17
testSourceCompatibility = 17
testTargetCompatibility = 17
reproducibleBuild = true

bootPluginVersion = 2.7.17
bootPluginVersion = 3.2.3
dependencyPluginVersion = 1.1.4
gitPluginVersion = 3.0.0
kordampBuildVersion = 3.1.0
kordampPluginVersion = 0.51.0
kordampBuildVersion = 3.4.0
kordampPluginVersion = 0.54.0

awaitilityVersion = 4.2.0
awsVersion = 2.2.6.RELEASE
commonsIoVersion = 2.11.0
commonsIoVersion = 2.14.0
commonsPoolVersion = 2.12.0
db2Version = 11.5.8.0
datafakerVersion = 2.0.2
errorproneVersion = 2.4.0
gcpVersion = 1.2.8.RELEASE
guavaVersion = 30.0-android
hdrVersion = 2.1.12
hsqldbVersion = 2.7.2
jacksonVersion = 2.15.3
jacocoVersion = 0.8.11
jdksPluginVersion = 1.5.0
jsr305Version = 3.0.2
junitVersion = 5.10.1
junitPlatformVersion = 1.10.1
latencyutilsVersion = 2.0.3
lettucemodVersion = 3.7.3
lettuceVersion = 6.2.6.RELEASE
mssqlVersion = 12.4.2.jre8
mysqlVersion = 8.1.0
oracleVersion = 19.3.0.0
picocliVersion = 4.7.5
plexusVersion = 4.0.0
postgresqlVersion = 42.7.1
progressbarVersion = 0.10.0
springBatchRedisVersion = 3.7.5
protobufVersion = 3.21.9
slf4jVersion = 2.0.9
snakeyamlVersion = 2.2
springBatchRedisVersion = 4.0.1
springBatchVersion = 5.1.0
springBootVersion = 3.2.2
springVersion = 6.1.1
sqliteVersion = 3.43.0.0
testcontainersRedisVersion = 1.6.4
testcontainersVersion = 1.19.1
testcontainersRedisVersion = 2.2.0
testcontainersVersion = 1.19.5

org.gradle.daemon = true
org.gradle.caching = true
org.gradle.daemon = false
org.gradle.caching = false
org.gradle.parallel = false
systemProp.file.encoding = utf-8
org.gradle.jvmargs = -Dfile.encoding=UTF-8
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,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# 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, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
4 changes: 2 additions & 2 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ project:
height: 256
java:
groupId: com.redis
version: '8'
version: '21'
multiProject: true
mainClass: com.redis.riot.cli.Main
tags:
Expand Down Expand Up @@ -127,7 +127,7 @@ assemble:
riot-standalone:
active: ALWAYS
java:
version: '11'
version: '21'
imageName: '{{distributionName}}-{{projectEffectiveVersion}}'
executable: riot
fileSets:
Expand Down
Loading

0 comments on commit 6799f01

Please sign in to comment.