@@ -55,26 +55,32 @@ val edcScmUrl: String by project
55
55
val groupId: String by project
56
56
val defaultVersion: String by project
57
57
val metaModelVersion: String by project
58
+ val annotationProcessorVersion: String by project
59
+ // where our SNAPSHOT versions are published to and resolved from
60
+ val snapshotUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
61
+ // where our release versions are published to (staging)
62
+ val releaseUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
58
63
59
- // required by the nexus publishing plugin
60
- val projectVersion: String = (project.findProperty(" edcVersion" ) ? : defaultVersion) as String
61
64
62
- var deployUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/ "
65
+ // required by the nexus publishing plugin
63
66
67
+ val projectVersion: String = (project.findProperty(" edcVersion" ) ? : defaultVersion) as String
68
+ var deployUrl = releaseUrl
64
69
if (projectVersion.contains(" SNAPSHOT" )) {
65
- deployUrl = " https://oss.sonatype.org/content/repositories/snapshots/ "
70
+ deployUrl = snapshotUrl
66
71
}
67
72
68
73
subprojects {
69
74
70
75
repositories {
71
76
maven {
72
- url = uri(" https://oss.sonatype.org/content/repositories/snapshots/ " )
77
+ url = uri(snapshotUrl )
73
78
}
74
79
mavenCentral()
75
80
maven {
76
81
url = uri(" https://maven.iais.fraunhofer.de/artifactory/eis-ids-public/" )
77
82
}
83
+ mavenLocal()
78
84
}
79
85
tasks.register<DependencyReportTask >(" allDependencies" ) {}
80
86
@@ -117,20 +123,37 @@ subprojects {
117
123
}
118
124
119
125
buildscript {
126
+ repositories {
127
+ maven {
128
+ // can't use the snapshotUrl variable here, because buildscript has a different scope
129
+ url = uri(" https://oss.sonatype.org/content/repositories/snapshots/" )
130
+ }
131
+ mavenLocal()
132
+ }
120
133
dependencies {
121
134
val swagger: String by project
135
+ val autodocPluginVersion: String by project
136
+
122
137
classpath(" io.swagger.core.v3:swagger-gradle-plugin:${swagger} " )
138
+ classpath(" org.eclipse.dataspaceconnector.autodoc:org.eclipse.dataspaceconnector.autodoc.gradle.plugin:${autodocPluginVersion} " )
123
139
}
124
140
}
125
141
126
142
allprojects {
127
143
repositories {
128
- mavenLocal()
144
+ maven {
145
+ url = uri(snapshotUrl)
146
+ }
129
147
}
130
148
apply (plugin = " maven-publish" )
131
149
apply (plugin = " checkstyle" )
132
150
apply (plugin = " java" )
151
+ apply (plugin = " ${groupId} .autodoc" )
133
152
153
+ // configure which version of the annotation processor to use. defaults to the same version as the plugin
154
+ configure< org.eclipse.dataspaceconnector.plugins.autodoc.AutodocExtension > {
155
+ processorVersion.set(annotationProcessorVersion)
156
+ }
134
157
135
158
apply (plugin = " org.eclipse.dataspaceconnector.test-summary" )
136
159
@@ -371,7 +394,7 @@ nexusPublishing {
371
394
repositories {
372
395
sonatype {
373
396
nexusUrl.set(uri(" https://oss.sonatype.org/service/local/" ))
374
- snapshotRepositoryUrl.set(uri(" https://oss.sonatype.org/content/repositories/snapshots/ " ))
397
+ snapshotRepositoryUrl.set(uri(snapshotUrl ))
375
398
username.set(System .getenv(" OSSRH_USER" ) ? : return @sonatype)
376
399
password.set(System .getenv(" OSSRH_PASSWORD" ) ? : return @sonatype)
377
400
}
0 commit comments