mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 11:37:51 +02:00
This is an 'easy' upgrade that requires a minor change in common/build.gradle and the removal of an unnecessary import in buildSrc. Gradle 7.4 and above has breaking changes that break the latest nebula lint plugin. We may have to wait a while.
68 lines
2.1 KiB
Groovy
68 lines
2.1 KiB
Groovy
// Copyright 2019 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.
|
|
|
|
sourceSets {
|
|
testing {
|
|
java {
|
|
compileClasspath += main.output
|
|
runtimeClasspath += main.output
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
compileClasspath += testing.output
|
|
runtimeClasspath += testing.output
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
// For reasons I don't understand, testingCompileOnly is the configuration
|
|
// used for compiling the classes in the "testing" jar.
|
|
testingCompileOnly.extendsFrom implementation
|
|
testingRuntimeOnly.extendsFrom runtimeOnly
|
|
|
|
testImplementation.extendsFrom testingCompile
|
|
testRuntimeOnly.extendsFrom testingRuntime
|
|
|
|
// All testing util classes. Other projects may declare dependency as:
|
|
// testImplementation project(path: 'common', configuration: 'testing')
|
|
create("testing")
|
|
testing.extendsFrom testingCompileOnly
|
|
}
|
|
|
|
task testingJar(type: Jar) {
|
|
archiveBaseName = 'testing'
|
|
from sourceSets.testing.output
|
|
}
|
|
|
|
artifacts {
|
|
testing testingJar
|
|
}
|
|
|
|
dependencies {
|
|
def deps = rootProject.dependencyMap
|
|
|
|
implementation deps['com.github.ben-manes.caffeine:caffeine']
|
|
implementation deps['com.google.code.findbugs:jsr305']
|
|
implementation deps['com.google.guava:guava']
|
|
implementation deps['javax.inject:javax.inject']
|
|
implementation deps['joda-time:joda-time']
|
|
implementation deps['com.google.flogger:flogger']
|
|
implementation deps['io.github.java-diff-utils:java-diff-utils']
|
|
implementation deps['com.google.truth:truth']
|
|
|
|
testImplementation deps['org.junit.jupiter:junit-jupiter-api']
|
|
testImplementation deps['org.junit.jupiter:junit-jupiter-engine']
|
|
}
|