mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 01:35:59 +02:00
Add test for Java 8 Compatibility of third party jars (#1618)
* Add test for Java 8 Compatibility Add a test to check for Java 8 compatibility of jars deployed to AppEngine. It is not enough to run existing tests with Java 8 VM, since many API jars are not exercised by tests. For example, those for GCP services like the SecretManager. We take the conservative approach and verify that every class in every jar are compiled for Java 8.
This commit is contained in:
parent
5352c06c7b
commit
f1f05c49f8
4 changed files with 162 additions and 1 deletions
41
java8compatibility/build.gradle
Normal file
41
java8compatibility/build.gradle
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Copyright 2022 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
configurations {
|
||||
all_prod_jars
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def deps = rootProject.dependencyMap
|
||||
|
||||
testCompile deps['com.google.guava:guava']
|
||||
testCompile deps['com.google.truth:truth']
|
||||
testCompile deps['org.junit.jupiter:junit-jupiter-api']
|
||||
testCompile deps['org.junit.jupiter:junit-jupiter-engine']
|
||||
testCompile deps['org.junit.jupiter:junit-jupiter-params']
|
||||
testRuntime project(path: ':core', configuration: 'deploy_jar')
|
||||
|
||||
// Collection of jars that get deployed to Appengine. Please refer to
|
||||
// ../appengine_war.gradle for more information.
|
||||
// This includes nomulus production classes and all dependencies.
|
||||
all_prod_jars project(path: ':core', configuration: 'deploy_jar')
|
||||
}
|
||||
|
||||
test {
|
||||
def jarlist = configurations.all_prod_jars.each {
|
||||
it.toURI().toURL()
|
||||
}.join(',')
|
||||
|
||||
systemProperty 'all_prod_jars', jarlist
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue