From be5b13477888aba055b80160326137bd6490d39d Mon Sep 17 00:00:00 2001 From: Callum Rogers Date: Tue, 23 Mar 2021 18:53:24 +0000 Subject: [PATCH] Test out gradle-external-publish-plugin excavator (#233) --- build.gradle | 5 ++- gradle/publish-jar.gradle | 55 ------------------------------- human-readable-types/build.gradle | 2 +- 3 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 gradle/publish-jar.gradle diff --git a/build.gradle b/build.gradle index 1aa31a4f..bd0c6b5f 100644 --- a/build.gradle +++ b/build.gradle @@ -26,9 +26,7 @@ buildscript { } dependencies { - classpath 'com.netflix.nebula:gradle-info-plugin:9.3.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' - classpath 'com.netflix.nebula:nebula-publishing-plugin:17.3.2' + classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:0.3.3' classpath 'com.palantir.baseline:gradle-baseline-java:2.49.2' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.3' } @@ -38,6 +36,7 @@ apply plugin: 'com.palantir.baseline-config' apply plugin: 'com.palantir.baseline-idea' apply plugin: 'com.palantir.git-version' apply plugin: 'com.palantir.baseline' +apply plugin: 'com.palantir.external-publish' allprojects { group 'com.palantir.human-readable-types' diff --git a/gradle/publish-jar.gradle b/gradle/publish-jar.gradle deleted file mode 100644 index e54c79df..00000000 --- a/gradle/publish-jar.gradle +++ /dev/null @@ -1,55 +0,0 @@ -// 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 = 'human-readable-types' - 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 -} diff --git a/human-readable-types/build.gradle b/human-readable-types/build.gradle index 83ead1d9..3c1dfc26 100644 --- a/human-readable-types/build.gradle +++ b/human-readable-types/build.gradle @@ -14,7 +14,7 @@ * limitations under the License. */ -apply from: "$rootDir/gradle/publish-jar.gradle" +apply plugin: 'com.palantir.external-publish-jar' dependencies { compile 'com.fasterxml.jackson.core:jackson-databind'