-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
75 lines (67 loc) · 2.2 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Microsoft Corporation - initial implementation
*
*/
plugins {
java
`java-library`
}
val swagger: String by project
val rsApi : String by project
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://maven.iais.fraunhofer.de/artifactory/eis-ids-public/")
}
}
pluginManager.withPlugin("io.swagger.core.v3.swagger-gradle-plugin") {
dependencies {
// this is used to scan the classpath and generate an openapi yaml file
implementation("io.swagger.core.v3:swagger-jaxrs2-jakarta:${swagger}")
implementation("jakarta.ws.rs:jakarta.ws.rs-api:${rsApi}")
}
// this is used to scan the classpath and generate an openapi yaml file
tasks.withType<io.swagger.v3.plugins.gradle.tasks.ResolveTask> {
outputFileName = project.name
outputFormat = io.swagger.v3.plugins.gradle.tasks.ResolveTask.Format.YAML
prettyPrint = true
classpath = java.sourceSets["main"].runtimeClasspath
buildClasspath = classpath
resourcePackages = setOf("org.eclipse.dataspaceconnector")
outputDir = file("${rootProject.projectDir.path}/resources/openapi/yaml")
}
configurations {
all {
exclude(group = "com.fasterxml.jackson.jaxrs", module = "jackson-jaxrs-json-provider")
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
// EdcRuntimeExtension uses this to determine the runtime classpath of the module to run.
tasks.register("printClasspath") {
doLast {
println(sourceSets["main"].runtimeClasspath.asPath)
}
}
}
buildscript {
dependencies {
classpath("io.swagger.core.v3:swagger-gradle-plugin:2.1.13")
}
}