@@ -12,59 +12,58 @@ def gpgPassphrase = System.getenv('GPG_PASSPHRASE')
12
12
def gpgPrivateKey = System . getenv(' GPG_PRIVATE_KEY' )
13
13
14
14
allprojects {
15
-
16
15
apply plugin : ' signing'
17
16
18
- tasks. register(' artifactoryPublish' , org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask ) {
19
- enabled(false )
20
- setCiServerBuild()
21
- }
22
-
23
17
apply plugin : org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
24
18
25
- artifactory {
26
- publish {
27
- contextUrl = System . getenv(' ARTIFACTORY_URL' )
28
- repository {
29
- repoKey = System . getenv(' ARTIFACTORY_REPOSITORY' )
30
- username = System . getenv(' ARTIFACTORY_USERNAME' )
31
- password = System . getenv(' ARTIFACTORY_PASSWORD' )
32
- }
33
- defaults {
34
- def zipArtifactProps =
35
- [' zip.name' : project. name,
36
- ' zip.displayname' : project. description,
37
- ' zip.deployed' : ' false' ]
38
- properties {
39
- mavenJava zipArtifactProps, ' *:*:*:*@zip'
40
- mavenJava ' zip.type' : ' docs' , ' *:*:*:docs@zip'
41
- mavenJava ' zip.type' : ' dist' , ' *:*:*:dist@zip'
42
- }
43
- }
44
- publishForkCount = 10
45
- }
46
-
47
- buildInfo {
48
- setProject(System . getenv(' ARTIFACTORY_BUILD_PROJECT' ))
49
- setBuildName(System . getenv(' ARTIFACTORY_BUILD_NAME' ))
50
- setBuildNumber(System . getenv(' ARTIFACTORY_BUILD_NUMBER' ))
51
- setBuildUrl(System . getenv(' ARTIFACTORY_BUILD_URL' ))
52
- setAgentName(System . getenv(' ARTIFACTORY_USER_AGENT_NAME' ))
53
- setAgentVersion(System . getenv(' ARTIFACTORY_USER_AGENT_VERSION' ))
54
- setVcsRevision(System . getenv(' ARTIFACTORY_VCS_REVISION' ))
55
- setVcsUrl(System . getenv(' ARTIFACTORY_VCS_URL' ))
56
- setArtifactoryPluginVersion(' 4.33.12' )
57
- }
58
-
59
- clientConfig. connectionRetries = 4
60
- clientConfig. insecureTls = false
19
+ tasks. named(' artifactoryPublish' ) {
20
+ enabled = false
61
21
}
62
22
63
23
afterEvaluate {
64
24
pluginManager. withPlugin(' maven-publish' ) {
25
+ artifactory {
26
+ publish {
27
+ contextUrl = System . getenv(' ARTIFACTORY_URL' )
28
+ repository {
29
+ repoKey = System . getenv(' ARTIFACTORY_REPOSITORY' )
30
+ username = System . getenv(' ARTIFACTORY_USERNAME' )
31
+ password = System . getenv(' ARTIFACTORY_PASSWORD' )
32
+ }
33
+ defaults {
34
+ def zipArtifactProps =
35
+ [' zip.name' : project. name,
36
+ ' zip.displayname' : project. description,
37
+ ' zip.deployed' : ' false' ]
38
+ properties {
39
+ mavenJava zipArtifactProps, ' *:*:*:*@zip'
40
+ mavenJava ' zip.type' : ' docs' , ' *:*:*:docs@zip'
41
+ mavenJava ' zip.type' : ' dist' , ' *:*:*:dist@zip'
42
+ }
43
+ }
44
+ publishForkCount = 10
45
+ }
46
+
47
+ buildInfo {
48
+ setProject(System . getenv(' ARTIFACTORY_BUILD_PROJECT' ))
49
+ setBuildName(System . getenv(' ARTIFACTORY_BUILD_NAME' ))
50
+ setBuildNumber(System . getenv(' ARTIFACTORY_BUILD_NUMBER' ))
51
+ setBuildUrl(System . getenv(' ARTIFACTORY_BUILD_URL' ))
52
+ setAgentName(System . getenv(' ARTIFACTORY_USER_AGENT_NAME' ))
53
+ setAgentVersion(System . getenv(' ARTIFACTORY_USER_AGENT_VERSION' ))
54
+ setVcsRevision(System . getenv(' ARTIFACTORY_VCS_REVISION' ))
55
+ setVcsUrl(System . getenv(' ARTIFACTORY_VCS_URL' ))
56
+ setArtifactoryPluginVersion(' 4.33.12' )
57
+ }
58
+
59
+ clientConfig. connectionRetries = 4
60
+ }
61
+
65
62
tasks. named(' artifactoryPublish' ) {
66
- enabled(true )
67
- publications ' mavenJava'
63
+ enabled = true
64
+ setCiServerBuild()
65
+ publications publishing. publications. mavenJava
66
+ publishIvy = false
68
67
}
69
68
70
69
if (! ossrhUrl && gpgPassphrase && gpgPrivateKey) {
0 commit comments