2019-08-31 20:51:14 -07:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'pegasus'
|
|
|
|
|
2020-12-02 20:49:34 -08:00
|
|
|
sourceSets {
|
|
|
|
integTest {
|
|
|
|
compileClasspath += sourceSets.main.output
|
|
|
|
runtimeClasspath += sourceSets.main.output
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-03 13:24:33 -07:00
|
|
|
idea {
|
2020-12-02 20:49:34 -08:00
|
|
|
module {
|
|
|
|
testSourceDirs += file('src/integTest/java')
|
|
|
|
scopes.TEST.plus += [ configurations.integTestCompile ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-03 13:24:33 -07:00
|
|
|
|
2020-12-02 20:49:34 -08:00
|
|
|
configurations {
|
|
|
|
integTestImplementation.extendsFrom implementation
|
|
|
|
integTestRuntimeOnly.extendsFrom runtimeOnly
|
2021-06-03 13:24:33 -07:00
|
|
|
modelValidation
|
2020-12-02 20:49:34 -08:00
|
|
|
}
|
|
|
|
|
2019-08-31 20:51:14 -07:00
|
|
|
dependencies {
|
2021-12-10 20:07:55 +02:00
|
|
|
constraints {
|
2022-11-30 17:05:01 -06:00
|
|
|
implementation(externalDependency.log4jCore) {
|
|
|
|
because("previous versions are vulnerable to CVE-2021-45105")
|
2021-12-10 20:07:55 +02:00
|
|
|
}
|
2022-11-30 17:05:01 -06:00
|
|
|
implementation(externalDependency.log4jApi) {
|
2021-12-20 22:55:22 +08:00
|
|
|
because("previous versions are vulnerable to CVE-2021-45105")
|
2021-12-10 20:07:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-20 10:58:07 -07:00
|
|
|
compile project(':metadata-service:restli-api')
|
2022-12-06 23:52:41 +05:30
|
|
|
compile project(':metadata-auth:auth-api')
|
2021-08-20 10:58:07 -07:00
|
|
|
compile project(path: ':metadata-service:restli-api', configuration: 'dataTemplate')
|
2019-08-31 20:51:14 -07:00
|
|
|
compile project(':li-utils')
|
|
|
|
compile project(':metadata-models')
|
2021-04-13 07:56:31 -07:00
|
|
|
compile project(':metadata-utils')
|
2021-06-03 13:24:33 -07:00
|
|
|
compile project(':metadata-io')
|
2019-08-31 20:51:14 -07:00
|
|
|
compile spec.product.pegasus.restliServer
|
2022-12-04 21:57:47 -06:00
|
|
|
implementation externalDependency.slf4jApi
|
|
|
|
// This is compile and not compileOnly because of restli
|
2021-06-25 10:56:45 -07:00
|
|
|
compile externalDependency.lombok
|
2021-03-01 21:55:46 +01:00
|
|
|
compile externalDependency.neo4jJavaDriver
|
2021-09-07 23:06:15 -07:00
|
|
|
compile externalDependency.opentelemetryAnnotations
|
2019-08-31 20:51:14 -07:00
|
|
|
|
2022-11-30 17:05:01 -06:00
|
|
|
runtimeOnly externalDependency.logbackClassic
|
|
|
|
|
2021-06-25 10:56:45 -07:00
|
|
|
annotationProcessor externalDependency.lombok
|
2019-08-31 20:51:14 -07:00
|
|
|
|
2022-01-05 19:32:31 -06:00
|
|
|
testCompile project(':test-models')
|
2019-08-31 20:51:14 -07:00
|
|
|
testCompile externalDependency.mockito
|
2020-03-26 21:53:29 -07:00
|
|
|
testCompile externalDependency.testng
|
2020-12-02 20:49:34 -08:00
|
|
|
|
|
|
|
integTestImplementation externalDependency.junitJupiterApi
|
|
|
|
integTestRuntimeOnly externalDependency.junitJupiterEngine
|
|
|
|
|
|
|
|
integTestCompile externalDependency.junitJupiterApi
|
|
|
|
integTestCompile externalDependency.junitJupiterParams
|
2021-06-03 13:24:33 -07:00
|
|
|
|
|
|
|
modelValidation project(path: ':metadata-models-validator')
|
|
|
|
dataModel project(path: ':metadata-models', configuration: 'dataTemplate')
|
|
|
|
dataModel project(path: ':li-utils', configuration: 'dataTemplate')
|
2020-12-02 20:49:34 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
task integrationTest(type: Test) {
|
|
|
|
description = 'Runs integration tests.'
|
|
|
|
group = 'verification'
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
|
|
|
testClassesDirs = sourceSets.integTest.output.classesDirs
|
|
|
|
classpath = sourceSets.integTest.runtimeClasspath
|
|
|
|
shouldRunAfter test
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
2021-06-03 13:24:33 -07:00
|
|
|
task validateModels(type: JavaExec) {
|
|
|
|
main = 'com.linkedin.metadata.model.validation.ModelValidationTask'
|
|
|
|
args '../../metadata-models/src/main/pegasus/:' + '../../li-utils/src/main/pegasus/:' + configurations.dataModel.asPath, project.getProjectDir().getAbsolutePath() + "/../../metadata-models/src/main/pegasus",
|
|
|
|
classpath = project.configurations.modelValidation
|
|
|
|
debugOptions {
|
|
|
|
enabled = false
|
|
|
|
port = 5005
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileJava.dependsOn validateModels
|
2020-12-02 20:49:34 -08:00
|
|
|
check.dependsOn integrationTest
|
2021-06-03 13:24:33 -07:00
|
|
|
integrationTest.enabled = false
|
2020-12-02 20:49:34 -08:00
|
|
|
|
2019-08-31 20:51:14 -07:00
|
|
|
// Generate IDLs
|
|
|
|
pegasus.main.idlOptions.addIdlItem([
|
2020-04-02 20:53:22 -07:00
|
|
|
'com.linkedin.metadata.resources',
|
2019-08-31 20:51:14 -07:00
|
|
|
])
|
|
|
|
|
2021-08-20 10:58:07 -07:00
|
|
|
ext.apiProject = project(':metadata-service:restli-api')
|