Skip to content

Commit

Permalink
[#1932] - create module picocli-tests-java8plus
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Feb 5, 2023
1 parent 0410688 commit 95d1087
Show file tree
Hide file tree
Showing 8 changed files with 1,950 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ allprojects {
}
}
dependencies {
testImplementation supportDependencies.junit
testImplementation supportDependencies.hamcrestCore
testImplementation supportDependencies.jansi
testImplementation supportDependencies.groovy
testImplementation supportDependencies.systemRules
testImplementation supportDependencies.junitParams

if (!project.name in ['picocli-tests-java8plus']) {
testImplementation supportDependencies.junit
testImplementation supportDependencies.hamcrestCore
testImplementation supportDependencies.systemRules
testImplementation supportDependencies.junitParams
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
Expand Down
5 changes: 5 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ ext {
log4j2Version = "2.19.0"
springBootVersion = "2.7.8" // Spring Boot 3.0 requires Java 17 as a minimum version
systemRulesVersion = "1.19.0"
systemLambdaVersion = '1.2.1'
junit5Version = '5.9.2'

supportDependencies = [
junit : "junit:junit:$junitVersion",
junit5Api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
junit5Engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
systemLambda : "com.github.stefanbirkner:system-lambda:$systemLambdaVersion",
hamcrestCore : "org.hamcrest:hamcrest-core:$hamcrestCoreVersion",
jansi : "org.fusesource.jansi:jansi:$jansiVersion",
groovy : "org.codehaus.groovy:groovy-all:$groovyVersion",
Expand Down
6 changes: 6 additions & 0 deletions picocli-tests-java8plus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Picocli Java 8 Tests

This subproject contains tests that use Java 8, and the JUnit 5 and System Lambda test frameworks.

This module does not publish any artifacts.

33 changes: 33 additions & 0 deletions picocli-tests-java8plus/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
id 'java'
}

group 'info.picocli'
description 'Picocli Tests Requiring Java 8 or greater'
version "$projectVersion"

sourceCompatibility = 1.8
targetCompatibility = 1.8

test {
useJUnitPlatform()
}

dependencies {
api rootProject
testImplementation supportDependencies.junit5Api
testRuntimeOnly supportDependencies.junit5Engine
testImplementation supportDependencies.systemLambda
}

jar {
manifest {
attributes 'Specification-Title': 'Picocli Tests Requiring Java 8 or greater',
'Specification-Vendor' : 'Remko Popma',
'Specification-Version' : archiveVersion.get(),
'Implementation-Title' : 'Picocli Tests Requiring Java 8 or greater',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': archiveVersion.get(),
'Automatic-Module-Name' : 'info.picocli.tests.java8plus'
}
}
Loading

0 comments on commit 95d1087

Please sign in to comment.