File tree 4 files changed +48
-15
lines changed
cordapp-configuration-publish
4 files changed +48
-15
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,10 @@ subprojects {
94
94
}
95
95
}
96
96
97
+ ext {
98
+ releasable = true // all corda-api jars are externally consumable
99
+ }
100
+
97
101
version rootProject. version
98
102
group ' net.corda'
99
103
@@ -264,6 +268,32 @@ subprojects {
264
268
265
269
tasks. register(' allDependencyInsight' , DependencyInsightReportTask )
266
270
tasks. register(' allDependencies' , DependencyReportTask )
271
+
272
+ tasks. register(' releasableArtifacts' ) {
273
+ description = " Prints a list of all modules which will be released externally"
274
+ group = " Release"
275
+ if (project. hasProperty(' releasable' ) && project. releasable. toBoolean()) {
276
+ logArtifacts(project)
277
+ }
278
+ }
279
+
280
+ tasks. register(' unReleasableArtifacts' ) {
281
+ description = " Prints a list of all modules which will not be released externally"
282
+ group = " Release"
283
+ if (! project. hasProperty(' releasable' ) || ! project. releasable. toBoolean()) {
284
+ logArtifacts(project)
285
+ }
286
+ }
287
+ }
288
+
289
+ // helper to log artifacts we will or will not publish during a release process
290
+ def logArtifacts (Project project ) {
291
+ project. publishing. publications. each { publication ->
292
+ logger. quiet(" \n ${ publication.groupId} :${ publication.artifactId} :${ publication.version} [${ project.path} ]" )
293
+ publication. artifacts. each { artifact ->
294
+ logger. quiet(" * ${ artifact.file.name} " )
295
+ }
296
+ }
267
297
}
268
298
269
299
// report updatable dependencies: gradle dependencyUpdates
Original file line number Diff line number Diff line change
1
+ // Allow us to publish to S3 bucket if this plugin is applied to a specific sub module
2
+ // for use in projects which do not use corda.common-publishing plugin
3
+ if (project. hasProperty(' maven.repo.s3' ) && project. hasProperty(' releasable' )) {
4
+ publishing {
5
+ repositories {
6
+ maven {
7
+ url = project. findProperty(' maven.repo.s3' )
8
+ credentials(AwsCredentials ) {
9
+ accessKey " ${ System.getenv('AWS_ACCESS_KEY_ID')} "
10
+ secretKey " ${ System.getenv('AWS_SECRET_ACCESS_KEY')} "
11
+ sessionToken " ${ System.getenv('AWS_SESSION_TOKEN')} "
12
+ }
13
+ }
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
id ' java-platform'
3
3
id ' maven-publish'
4
4
id ' com.jfrog.artifactory'
5
+ id ' corda.s3-publish'
5
6
}
6
7
7
8
description = ' Declares the Corda API component versions.'
@@ -95,21 +96,6 @@ publishing {
95
96
}
96
97
}
97
98
98
- if (project. hasProperty(' maven.repo.s3' )){
99
- publishing {
100
- repositories {
101
- maven {
102
- url = project. findProperty(' maven.repo.s3' )
103
- credentials(AwsCredentials ) {
104
- accessKey " ${ System.getenv('AWS_ACCESS_KEY_ID')} "
105
- secretKey " ${ System.getenv('AWS_SECRET_ACCESS_KEY')} "
106
- sessionToken " ${ System.getenv('AWS_SESSION_TOKEN')} "
107
- }
108
- }
109
- }
110
- }
111
- }
112
-
113
99
artifactoryPublish {
114
100
publications(' apiConfiguration' )
115
101
}
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ plugins {
6
6
id ' com.jfrog.artifactory'
7
7
id ' maven-publish'
8
8
id ' base'
9
+ id ' corda.s3-publish'
9
10
}
10
11
11
12
description ' Publishes the cordapp-configuration Gradle plugin.'
You can’t perform that action at this time.
0 commit comments