File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ buildscript {
17
17
18
18
springBootVersion = ' 2.2.7.RELEASE'
19
19
springCloudVersion = ' Hoxton.SR4'
20
- springDependencyManagementVersion = ' 1.0.9.RELEASE'
21
20
springCloudAlibabaNacosVersion = ' 2.2.1.RELEASE'
22
21
springSecurityOAuthVersion = ' 2.4.1.RELEASE'
23
22
Original file line number Diff line number Diff line change 1
1
apply plugin : ' maven-publish'
2
2
apply plugin : ' signing'
3
3
4
- gradle. taskGraph. whenReady { taskGraph ->
5
- if (taskGraph. allTasks. any { it instanceof Sign } && project. ext. isReleaseVersion) {
6
- def id = System . getenv(' GPG_ID' )
7
- def file = ' /home/travis/.gnupg/secring.gpg'
8
- def password = System . getenv(' GPG_PASSWORD' )
9
-
10
- allprojects { ext. " signing.keyId" = id }
11
- allprojects { ext. " signing.secretKeyRingFile" = file }
12
- allprojects { ext. " signing.password" = password }
13
- }
14
- }
15
-
16
4
ext {
17
5
isReleaseVersion = ! (projectVersion =~ / -SNAPSHOT$/ )
18
- isNeedSign = System . getenv(' GPG_ID' ) && isReleaseVersion
19
6
}
20
7
21
8
task sourcesJar (type : Jar ) {
@@ -67,6 +54,15 @@ publishing {
67
54
url = ' https://github.com/yidongnan/grpc-spring-boot-starter'
68
55
}
69
56
}
57
+
58
+ versionMapping {
59
+ usage(' java-api' ) {
60
+ fromResolutionOf(' runtimeClasspath' )
61
+ }
62
+ usage(' java-runtime' ) {
63
+ fromResolutionResult()
64
+ }
65
+ }
70
66
}
71
67
}
72
68
repositories {
@@ -83,8 +79,12 @@ publishing {
83
79
}
84
80
}
85
81
82
+ tasks. withType(Sign ) {
83
+ onlyIf { project. ext. isReleaseVersion && gradle. taskGraph. hasTask(" publish" ) }
84
+ }
85
+
86
86
signing {
87
- required { project . ext . isNeedSign }
87
+ useGpgCmd()
88
88
sign publishing. publications. mavenJava
89
89
}
90
90
You can’t perform that action at this time.
0 commit comments