Skip to content

Commit

Permalink
Test using JDK 21
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Sep 29, 2023
1 parent e9515ed commit a068c25
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nebula.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
# test against latest update of some major Java version(s), as well as specific LTS version(s)
java: [ 8, 17, 20]
java: [ 8, 17, 21]
name: Gradle Build without Publish
steps:
- uses: actions/checkout@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import spock.lang.Issue

class Gradle8LintReportTaskSpec extends IntegrationTestKitSpec {
def setup() {
gradleVersion = '8.1.1'
gradleVersion = '8.4-rc-2'
debug = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ test.nebula:a:1.2.0\n""")
coreAlignment << [true]
}

@IgnoreIf({ jvm.isJava20() })
@IgnoreIf({ jvm.isJava21() })
def 'handles dependencies and forces defined per project | core alignment #coreAlignment'() {
definePluginOutsideOfPluginBlock = true
//Necessary as 8.x does not have force support
Expand Down Expand Up @@ -868,7 +868,7 @@ test.nebula:a:1.3.0\n""")
}

@Unroll
@IgnoreIf({ jvm.isJava20() })
@IgnoreIf({ jvm.isJava21() })
def 'ignores buildscript dependencies for #type'() {
//Necessary as 8.x does not have force support
gradleVersion = '7.6'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.netflix.nebula.lint.rule.dependency
import nebula.test.IntegrationTestKitSpec
import nebula.test.dependencies.Coordinate
import nebula.test.dependencies.maven.Pom
import spock.lang.IgnoreIf
import spock.lang.Subject
import spock.lang.Unroll

Expand All @@ -26,7 +27,7 @@ class UndeclaredDependencyRuleSpec extends IntegrationTestKitSpec {
private static final def sample = new Coordinate('sample', 'alpha', '1.0')
private static final def commonsLogging = new Coordinate('commons-logging', 'commons-logging', '1.2')
private static final def commonsLang = new Coordinate('commons-lang', 'commons-lang', '2.6')
private static final def lombok = new Coordinate('org.projectlombok', 'lombok', '1.18.22')
private static final def lombok = new Coordinate('org.projectlombok', 'lombok', '1.18.30')
private static final def junit = new Coordinate('junit', 'junit', '4.12')

def main = '''
Expand Down Expand Up @@ -134,6 +135,7 @@ class UndeclaredDependencyRuleSpec extends IntegrationTestKitSpec {
}

@Unroll
@IgnoreIf({ jvm.isJava21() })
def 'adds dependencies alphabetically for #configuration configuration'() {
given:
def repo = new File(projectDir, 'repo')
Expand All @@ -157,7 +159,7 @@ class UndeclaredDependencyRuleSpec extends IntegrationTestKitSpec {
}
}
dependencies {
classpath "io.freefair.gradle:lombok-plugin:6.6.1"
classpath "io.freefair.gradle:lombok-plugin:8.3"
}
}
Expand Down Expand Up @@ -645,6 +647,7 @@ class UndeclaredDependencyRuleSpec extends IntegrationTestKitSpec {
sample | 'compile'
}

@IgnoreIf({ jvm.isJava21() })
def 'when using compileOnly configuration, transitives are resolved before linting so no changes are made'() {
given:
def repo = new File(projectDir, 'repo')
Expand All @@ -665,7 +668,7 @@ class UndeclaredDependencyRuleSpec extends IntegrationTestKitSpec {
}
}
dependencies {
classpath "io.freefair.gradle:lombok-plugin:6.6.1"
classpath "io.freefair.gradle:lombok-plugin:8.3"
}
}
Expand Down

0 comments on commit a068c25

Please sign in to comment.