Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit d83f636

Browse files
committed
Tweak publications for custom artifacts
1 parent e8b96a5 commit d83f636

File tree

2 files changed

+3
-37
lines changed

2 files changed

+3
-37
lines changed

build.gradle

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -298,43 +298,6 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
298298
}
299299
}
300300

301-
// Create an optional "with dependencies" distribution.
302-
// Not published by default; only for use when building from source.
303-
task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
304-
group = 'Distribution'
305-
archiveClassifier = 'dist-with-deps'
306-
description = "Builds -${archiveClassifier} archive, containing everything " +
307-
"in the -${distZip.archiveClassifier} archive plus all dependencies."
308-
309-
from zipTree(distZip.archiveFile)
310-
311-
gradle.taskGraph.whenReady { taskGraph ->
312-
if (taskGraph.hasTask(":${zipTask.name}")) {
313-
def projectName = rootProject.name
314-
def artifacts = new HashSet()
315-
316-
rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
317-
def dependency = artifact.moduleVersion.id
318-
if (!projectName.equals(dependency.name)) {
319-
artifacts << artifact.file
320-
}
321-
}
322-
323-
zipTask.from(artifacts) {
324-
into "${distZip.baseDir}/deps"
325-
}
326-
}
327-
}
328-
}
329-
330-
artifacts {
331-
// archives sourcesJar
332-
// archives javadocJar
333-
archives distZip
334-
archives docsZip
335-
archives schemaZip
336-
}
337-
338301
task dist(dependsOn: assemble) {
339302
group = 'Distribution'
340303
description = 'Builds -dist, -docs and -schema distribution archives.'

publish-maven.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ publishing {
55
publications {
66
mavenJava(MavenPublication) {
77
from components.java
8+
artifact docsZip
9+
artifact schemaZip
10+
artifact distZip
811
pom {
912
afterEvaluate {
1013
name = project.description

0 commit comments

Comments
 (0)