Skip to content

Commit 965dcbe

Browse files
authored
Remove Artifactory publishing logic from gradle build (#3256)
We no longer need the artifactory publishing logic that we used to use for publishing in the gradle build as new releases are no longer being published there. This removes the now dead code from the build, which means we no longer need to include the artficatory plugin in our build-time dependencies, which is nice. There are a few other build files that appear to be dead code that we can remove, but this is more targeted. I've validated that I can still publish to maven local with this change, and all of the logic seems to be pretty specific to actually running an artifactory build, so this shouldn't disrupt our other build procedures, but I guess one never knows. This resolves #3249.
1 parent cda59cc commit 965dcbe

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ plugins {
3737
alias(libs.plugins.versions)
3838
alias(libs.plugins.spotbugs)
3939
alias(libs.plugins.nexus)
40-
alias(libs.plugins.artifactory)
4140
alias(libs.plugins.download)
4241
}
4342

fdb-record-layer-core-shaded/fdb-record-layer-core-shaded.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ publishing {
119119
}
120120

121121
}
122-
artifactoryPublish {
123-
publications (publishing.publications.shadow)
124-
}
125122
}
126123

127124
if (Boolean.parseBoolean(centralPublish)) {

gradle/libs.versions.toml

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ test-compileOnly = [ "autoService", "jsr305" ]
150150

151151
[plugins]
152152

153-
artifactory = { id = "com.jfrog.artifactory", version = "4.29.2" }
154153
download = { id = "de.undercouch.download", version = "5.6.0" }
155154
gitversion = { id = "com.palantir.git-version", version = "3.1.0" }
156155
jmh = { id = "me.champeau.jmh", version = "0.7.2" }

gradle/publishing.gradle

-34
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* limitations under the License.
1919
*/
2020

21-
apply plugin: 'com.jfrog.artifactory'
2221
apply plugin: 'signing'
2322

2423
// Add various details to the pom file to allow for publishing
@@ -74,17 +73,6 @@ if (ext.publishLibrary) {
7473
}
7574
}
7675
}
77-
artifactoryPublish {
78-
// As a safeguard, only actually publish to artifactory if -PpublishBuild=true is passed to gradle
79-
// Note: skip is documented, but onlyIf seems to also be required to make this work for some reason
80-
// See: https://gist.github.com/DALDEI/40925568cef57e16e8a7
81-
def publishBuild = Boolean.parseBoolean(publishBuild)
82-
skip = !publishBuild
83-
onlyIf {
84-
publishBuild
85-
}
86-
publications(publishing.publications.library)
87-
}
8876
createDistribution.configure {
8977
afterEvaluate {
9078
dependsOn generatePomFileForLibraryPublication
@@ -128,25 +116,3 @@ publishing {
128116
}
129117
}
130118
}
131-
132-
if (System.getenv('ARTIFACTORY_USER') != null && System.getenv('ARTIFACTORY_KEY') != null) {
133-
artifactory {
134-
clientConfig.setIncludeEnvVars(true)
135-
publish {
136-
def artifactoryUrl = System.getenv('ARTIFACTORY_URL') ?: 'https://ossartifacts.jfrog.io/artifactory/'
137-
contextUrl = artifactoryUrl
138-
repository {
139-
repoKey = System.getenv('ARTIFACTORY_REPO') ?: 'fdb-record-layer'
140-
username = System.getenv('ARTIFACTORY_USER')
141-
password = System.getenv('ARTIFACTORY_KEY')
142-
}
143-
defaults {
144-
publications('mavenJava')
145-
publishPom = publishBuild
146-
publishArtifacts = publishBuild
147-
publishBuildInfo = publishBuild
148-
publishIvy = false
149-
}
150-
}
151-
}
152-
}

0 commit comments

Comments
 (0)