Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

FixDependencyVersion

Michael Barth edited this page Jul 20, 2017 · 3 revisions

Purpose

The maven publication plugin maven-publish creates poms with the gradle like '+' as version, if defined in this way. This will confuse the whole P2-M2 mapping, so this plugin replaces the '+' version with the version taken from the MANIFEST versions resolved by the ManifestDependencyPlugin. If no number was found, an error message is printed and the dependency is removed from the dependecy list of the artefact pom file. This should results in an error, because the dependency was not part of the MANIFEST.MF (or build.properties) used by Eclipse.

Declaration

Using this plugin needs the following plugin declarations:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "de.monkeyworks.buildmonkey:gradle.projectsetup:0.4.1"
  }
}

apply plugin: "de.monkeyworks.buildmonkey.FixDependencyVersion"

or in the incubating script snippet notation:

plugins {
  id "de.monkeyworks.buildmonkey.FixDependencyVersion" version "0.4.1"
}

Configuration

There is no configuration needed.

Gradle tasks

There is no task available. The functionality is executed during the apply phase. It must run in the project context and must apply together with "maven-publish".