mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 02:36:03 +02:00
* Break circular dependency between core and util Created a new :common project and moved a minimum number of classes to break the circular dependency between the two projects. This gets rid of the gradle lint dependency warnings. Also separated api classes and testing helpers into separate source sets in :common so that testing classes may be restricted to test configurations.
52 lines
1.4 KiB
Groovy
52 lines
1.4 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
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
testingCompile.extendsFrom compile
|
|
testingRuntime.extendsFrom runtime
|
|
|
|
// All testing util classes. Other projects may declare dependency as:
|
|
// testCompile project(path: 'common', configuration: 'testing')
|
|
testing
|
|
}
|
|
|
|
task testingJar(type: Jar) {
|
|
archiveBaseName = 'testing'
|
|
from sourceSets.testing.output
|
|
}
|
|
|
|
artifacts {
|
|
testing testingJar
|
|
}
|
|
|
|
dependencies {
|
|
def deps = rootProject.dependencyMap
|
|
|
|
compile deps['com.google.code.findbugs:jsr305']
|
|
compile deps['com.google.guava:guava']
|
|
compile deps['javax.inject:javax.inject']
|
|
compile deps['joda-time:joda-time']
|
|
|
|
testingCompile deps['com.google.flogger:flogger']
|
|
testingRuntime deps['com.google.flogger:flogger-system-backend']
|
|
}
|