Skip to content

Commit

Permalink
Bump up dependencies (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinGroscheTT committed Jul 31, 2024
1 parent 70fd2d7 commit 03c3213
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 44 deletions.
103 changes: 67 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,39 @@ jenkinsPlugin {
displayName = 'ecu.test execution plugin'

url = 'https://plugins.jenkins.io/ecu-test-execution/'
gitHubUrl = 'https://github.com/jenkinsci/ecu-test-execution-plugin'
gitHub = new URI('https://github.com/jenkinsci/ecu-test-execution-plugin')

generateTests = false
configurePublishing = false
fileExtension = 'hpi'
extension = 'hpi'
}

repositories {
mavenCentral()
}

/* org.jenkins-ci.main:jenkins-core:2.414.3 use com.google.guava:guava:32.1.1-jre
* which has dependency issues https://github.com/google/guava/issues/6657
*/
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.google.guava' && details.requested.name == 'guava') {
details.useVersion '33.2.0-jre'
}
}
}


// remove at runtime, as it provides a not fully functional SAXParser which makes integration tests fail
dependencies {
implementation 'org.jenkins-ci.plugins:credentials:1087.v16065d268466'
implementation 'org.jenkins-ci.plugins:script-security:1158.v7c1b_73a_69a_08'
implementation 'org.jenkins-ci.plugins:structs:318.va_f3ccb_729b_71'
implementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:625.vd896b_f445a_f8'
implementation 'org.jenkins-ci.plugins:credentials:1337.v60b_d7b_c7b_c9f'
implementation 'org.jenkins-ci.plugins:script-security:1336.vf33a_a_9863911'
implementation 'org.jenkins-ci.plugins:structs:337.v1b_04ea_4df7c8'
implementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:657.v03b_e8115821b_'

// codenarc
codenarc('org.codenarc:CodeNarc:3.4.0')
codenarc('org.codehaus.groovy:groovy-all:3.0.9')

// ecu.test-java-rest-client
api 'io.swagger:swagger-annotations:1.6.6'
Expand All @@ -66,27 +83,32 @@ dependencies {
// test
testImplementation 'io.swagger:swagger-parser:1.0.61'
testImplementation "com.github.spotbugs:spotbugs:${project.properties['spotBugsVersion']}"
testImplementation 'org.cyclonedx:cyclonedx-gradle-plugin:1.4.0'
testImplementation('org.cyclonedx:cyclonedx-gradle-plugin:1.4.0') {
exclude group: 'com.google.inject', module: 'guice' // uses old 4.0.0 version, jenkins core uses min 6.0.0
}
testImplementation('com.google.inject:guice') {
version {
strictly '4.0'
strictly '6.0.0'
}
}
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:941.vdfe1b_a_132c64'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:2689.v434009a_31b_f1'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:2689.v434009a_31b_f1:tests'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:1130.v8fd69d0b_8857'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-job:1180.v04c4e75dce43'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:625.vd896b_f445a_f8:tests'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:1058.vcb_fc1e3a_21a_9'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:3894.3896.vca_2c931e7935'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:3894.3896.vca_2c931e7935:tests'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:1331.vc8c2fed35334'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-job:1385.vb_58b_86ea_fff1'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:657.v03b_e8115821b_:tests'
testImplementation "org.jenkins-ci.main:jenkins-war:${jenkinsVersion}"
testImplementation('org.testcontainers:spock:1.17.6') {
testImplementation('org.testcontainers:spock:1.19.8') {
exclude group: 'org.spockframework', module: 'spock-core'
}
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
testImplementation 'org.spockframework:spock-junit4:2.3-groovy-3.0'
testImplementation 'cglib:cglib-nodep:3.3.0'
testImplementation 'org.objenesis:objenesis:3.3'
testImplementation 'com.google.guava:guava:31.1-jre'
testImplementation 'org.spockframework:spock-guice:2.3-groovy-3.0'
//testImplementation 'cglib:cglib-nodep:3.3.0'
//testImplementation 'org.objenesis:objenesis:3.3'
testImplementation 'org.codehaus.groovy:groovy-all:3.0.9'

// testImplementation 'org.jenkins-ci.plugins:bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9'
}

// remove at runtime, as it provides a not fully functional SAXParser which makes integration tests fail
Expand Down Expand Up @@ -127,11 +149,6 @@ publishing {
name = 'Martin Grosche'
email = 'martin.grosche@tracetronic.de'
}
developer {
id = 'cwellmtt'
name = 'Christoph Wellm'
email = 'christoph.wellm@tracetronic.de'
}
developer {
id = 'ErikRehmTT'
name = 'Erik Rehm'
Expand Down Expand Up @@ -181,11 +198,11 @@ publishing {
}
}

task cleanJenkins(type: Delete) {
tasks.register('cleanJenkins', Delete) {
delete 'work'
}

task cleanApi(type: Delete) {
tasks.register('cleanApi', Delete) {
delete 'generated'
}
clean.dependsOn cleanApi
Expand All @@ -201,7 +218,7 @@ test {
dependsOn 'integrationTest'
}

task unitTest(type: Test) {
tasks.register('unitTest', Test) {
filter {
excludeTestsMatching '*ContainerTest'
excludeTestsMatching '*IT'
Expand All @@ -212,10 +229,17 @@ task unitTest(type: Test) {
systemProperties('spock.skip.sandbox': System.getProperty('spock.skip.sandbox', 'true'))
}

task integrationTest(type: Test) {
jacoco {
toolVersion = "0.8.11" // Java 17 and 21
}

tasks.register('integrationTest', Test) {
// exclude code, which can not be instrumented correctly
jacoco {
excludes = ["com/gargoylesoftware/**"]
excludes = [
"com/gargoylesoftware/**",
"org/htmlunit/**"
]
}

filter {
Expand All @@ -227,14 +251,15 @@ task integrationTest(type: Test) {
systemProperties('spock.skip.sandbox': System.getProperty('spock.skip.sandbox', 'true'))
}

task containerTest(type: Test) {
tasks.register('containerTest', Test) {
doFirst {
def propFile = "src/test/resources/containerTest.properties"
assert file(propFile).exists() : "No property file '$propFile' for container test found"
assert file(propFile).exists(): "No property file '$propFile' for container test found"

def containerProps = new Properties()
file(propFile).withInputStream {
containerProps.load(it) }
containerProps.load(it)
}
containerProps.each {
environment it.key, it.value
}
Expand Down Expand Up @@ -280,7 +305,7 @@ codenarcTest {
ignoreFailures = true
}

task openApiGenerateV1(type: GenerateTask){
tasks.register('openApiGenerateV1', GenerateTask) {
inputSpec = "$rootDir/specs/openapi_v1.yml".toString()
generatorName = "java"
id = 'ecu-test-rest-java-client_v1'
Expand All @@ -296,12 +321,12 @@ task openApiGenerateV1(type: GenerateTask){
generateApiTests = false
configOptions = [
licenseName: "MIT License",
licenseUrl: "https://spdx.org/licenses/MIT.html",
licenseUrl : "https://spdx.org/licenses/MIT.html",
dateLibrary: "java${project.properties['javaVersion']}"
]
}

task openApiGenerateV2(type: GenerateTask){
tasks.register('openApiGenerateV2', GenerateTask) {
inputSpec = "$rootDir/specs/openapi_v2.yml".toString()
generatorName = "java"
id = 'ecu-test-rest-java-client_v2'
Expand All @@ -317,7 +342,7 @@ task openApiGenerateV2(type: GenerateTask){
generateApiTests = false
configOptions = [
licenseName: "MIT License",
licenseUrl: "https://spdx.org/licenses/MIT.html",
licenseUrl : "https://spdx.org/licenses/MIT.html",
dateLibrary: "java${project.properties['javaVersion']}"
]
}
Expand Down Expand Up @@ -364,7 +389,7 @@ sourceSets {
}
}

task generateApi {dependsOn openApiGenerateV1, openApiGenerateV2}
tasks.register('generateApi') { dependsOn openApiGenerateV1, openApiGenerateV2 }
tasks.compileJava.dependsOn generateApi

idea {
Expand All @@ -380,6 +405,12 @@ idea {
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(project.properties['javaVersion'] as Integer)
}
}

wrapper {
gradleVersion = "$gradleVersion"
}
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

# ---versions--- #
version=3.5-SNAPSHOT
jpiVersion=0.45.0
jenkinsVersion=2.332.3
jpiVersion=0.50.0
jenkinsVersion=2.426.3
gradleVersion=7.3
openapiVersion=7.0.0
spotBugsPlugin=5.1.3
spotBugsVersion=4.7.3
cyclonedxVersion=1.7.2
openapiVersion=7.0.1
spotBugsPlugin=6.0.10
spotBugsVersion=4.8.4
cyclonedxVersion=1.7.4
depCheckVersion=7.4.1
failBuildOnCVSS=9.0
javaVersion=11
javaVersion=17
# --- Disabling SHA256 and SHA512 checksums when releasing a plugin ---#
# --- see https://github.com/jenkinsci/gradle-jpi-plugin/blob/master/README.md#disabling-sha256-and-sha512-checksums-when-releasing-a-plugin ---#
systemProp.org.gradle.internal.publish.checksums.insecure=true
Binary file removed 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-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 03c3213

Please sign in to comment.