diff --git a/build.gradle b/build.gradle index 4cd7231f..2ad53ca8 100644 --- a/build.gradle +++ b/build.gradle @@ -6,15 +6,12 @@ buildscript { jcenter() } dependencies { - classpath 'com.netflix.nebula:gradle-info-plugin:9.3.0' + classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:0.4.10' classpath 'com.palantir.javaformat:gradle-palantir-java-format:0.3.9' - classpath 'com.netflix.nebula:nebula-publishing-plugin:16.0.0' - classpath 'com.netflix.nebula:gradle-info-plugin:9.3.0' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.28.0' classpath 'com.palantir.baseline:gradle-baseline-java:2.49.2' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.3' classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' } } @@ -28,13 +25,14 @@ repositories { jcenter() } +apply plugin: 'com.palantir.external-publish' apply plugin: 'java-gradle-plugin' apply plugin: 'groovy' apply plugin: 'com.palantir.baseline' apply plugin: 'com.palantir.consistent-versions' apply plugin: 'com.palantir.git-version' apply plugin: 'org.inferred.processors' -apply from: "$rootDir/gradle/publish-jar.gradle" +apply plugin: 'com.palantir.external-publish-jar' group 'com.palantir.gradle.docker' version System.env.CIRCLE_TAG ?: gitVersion() diff --git a/gradle/publish-jar.gradle b/gradle/publish-jar.gradle deleted file mode 100644 index ff3e89cd..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 = 'gradle-docker' - 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 -}