From 2eba367b124b10cf61496af53cd37c00da429b43 Mon Sep 17 00:00:00 2001 From: Felipe Orozco Date: Wed, 22 Jul 2020 10:08:31 -0400 Subject: [PATCH] Update and rename bintray-publish.gradle to publish-jar.gradle --- gradle/bintray-publish.gradle | 36 ----------------------- gradle/publish-jar.gradle | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 36 deletions(-) delete mode 100644 gradle/bintray-publish.gradle create mode 100644 gradle/publish-jar.gradle diff --git a/gradle/bintray-publish.gradle b/gradle/bintray-publish.gradle deleted file mode 100644 index 4c16315..0000000 --- a/gradle/bintray-publish.gradle +++ /dev/null @@ -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 -} - diff --git a/gradle/publish-jar.gradle b/gradle/publish-jar.gradle new file mode 100644 index 0000000..d5cbeb8 --- /dev/null +++ b/gradle/publish-jar.gradle @@ -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 +}