mirror of
https://github.com/google/nomulus
synced 2025-12-23 14:25:44 +00:00
Note that Dagger currently doesn't work with the Jakarta namespace and we have to cap the jakarta inject package version below 2.0 so that it sill provides classes in the old namespace.
69 lines
2.1 KiB
Groovy
69 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['jakarta.inject:jakarta.inject-api']
|
|
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']
|
|
}
|