-
Notifications
You must be signed in to change notification settings - Fork 134
/
publish-jar.gradle
49 lines (44 loc) · 1.43 KB
/
publish-jar.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// This file is managed by the excavator 'consistent-publish-scripts' check, changes will be overwritten.
apply plugin: 'com.jfrog.bintray'
// Intentionally not applying nebula.maven-publish, but most of its constituent plugins,
// because we do _not_ want nebula.maven-compile-only
apply plugin: 'maven-publish'
apply plugin: 'nebula.maven-nebula-publish'
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-developer'
apply plugin: 'nebula.maven-manifest'
apply plugin: 'nebula.maven-scm'
apply plugin: 'nebula.javadoc-jar'
apply plugin: 'nebula.source-jar'
jar {
manifest {
attributes("Implementation-Version" : project.version)
}
}
bintray {
user = System.env.BINTRAY_USERNAME
key = System.env.BINTRAY_PASSWORD
publish = true
pkg {
repo = 'releases'
name = 'gradle-baseline'
userOrg = 'palantir'
licenses = ['Apache-2.0']
publications = ['nebula']
}
}
publish.dependsOn bintrayUpload
bintrayUpload.onlyIf {
versionDetails().isCleanTag
}
// See: https://docs.gradle.org/5.2/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
// This replaces nebula.maven-resolved-dependencies, which doesn't work with the 'com.gradle.plugin-publish' plugin
publishing {
publications.withType(MavenPublication).configureEach {
versionMapping {
allVariants {
fromResolutionResult()
}
}
}
}