Update and rename bintray-publish.gradle to publish-jar.gradle
This commit is contained in:
parent
daf65397c8
commit
2eba367b12
2 changed files with 55 additions and 36 deletions
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
bintray {
|
||||
user = System.env.BINTRAY_USERNAME
|
||||
key = System.env.BINTRAY_PASSWORD
|
||||
publish = true
|
||||
pkg {
|
||||
repo = 'releases'
|
||||
name = rootProject.name
|
||||
userOrg = 'palantir'
|
||||
licenses = ['Apache-2.0']
|
||||
publications = ['nebula']
|
||||
}
|
||||
}
|
||||
|
||||
publish.dependsOn bintrayUpload
|
||||
bintrayUpload.onlyIf {
|
||||
versionDetails().isCleanTag
|
||||
}
|
||||
|
55
gradle/publish-jar.gradle
Normal file
55
gradle/publish-jar.gradle
Normal file
|
@ -0,0 +1,55 @@
|
|||
// 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.info-scm'
|
||||
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-graal'
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Turning off module metadata so that all consumers just use regular POMs
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
Loading…
Reference in a new issue