Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Upgrade build to Gradle 7.5.1 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi authored Sep 17, 2022
1 parent 737f6e9 commit bcb26fe
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 deletions.
52 changes: 25 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ plugins {
id 'application'
id 'idea'
id 'jacoco'
id 'org.inferred.processors' version '1.2.10'
id "net.ltgt.apt" version "0.21"
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'org.inferred.processors' version '3.7.0'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

apply plugin: 'net.ltgt.apt-idea'

group 'com.devshawn'

mainClassName = 'com.devshawn.kafka.gitops.MainCommand'
Expand All @@ -22,59 +19,60 @@ repositories {
}

dependencies {
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '2.4.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.1'
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.8"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2"
compile 'info.picocli:picocli:4.1.4'
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '2.4.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.1'
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.8"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2"
implementation 'info.picocli:picocli:4.1.4'

compile 'org.slf4j:slf4j-api:1.7.30'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'

processor 'org.inferred:freebuilder:2.5.0'
annotationProcessor 'org.inferred:freebuilder:2.7.0'
compileOnly 'org.inferred:freebuilder:2.7.0'

testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
testCompile group: 'cglib', name: 'cglib-nodep', version: '2.2'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testCompile group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
testImplementation group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
testImplementation group: 'cglib', name: 'cglib-nodep', version: '2.2'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
}

jacocoTestReport {
dependsOn test
reports {
xml.enabled = true
html.enabled = true
xml.destination "${buildDir}/reports/jacoco/report.xml"
xml.outputLocation.set(file("${buildDir}/reports/jacoco/report.xml"))
}

afterEvaluate {
classDirectories = files(classDirectories.files.collect {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
excludes: [
'**/*_Builder*/**',
])
})
}))
}
}

jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'com.devshawn.kafka.gitops.MainCommand'
)
}
}

task buildExecutableJar(type: Exec) {
dependsOn shadowJar
commandLine "sh", "build.sh"
}

task buildRelease(type: Zip, group: "build") {
dependsOn buildExecutableJar
from("$buildDir/output")
}

buildRelease.dependsOn buildExecutableJar
buildExecutableJar.dependsOn shadowJar
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java cli to use to start the JVM.
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
Expand All @@ -82,7 +82,7 @@ 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' cli could be found in your PATH.
which java >/dev/null 2>&1 || 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."
Expand Down Expand Up @@ -161,7 +161,7 @@ save () {
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java cli, following the shell quoting and substitution rules
# 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
Expand Down

0 comments on commit bcb26fe

Please sign in to comment.