gradlegradle-pluginbintray

gradle-bintray-plugin Plugin [id: 'com.jfrog.bintray', version: '1.+'] was not found


I'm trying to use the gradle plugin gradle-bintray-plugin.

Currently using Gradle 4.4

Following the tutorial in the github page I should add the plugin in this way:

plugins {
    ...
    id "com.jfrog.bintray" version "1.+"
}

I'm receiving this error message and not being able to continue:

Plugin [id: 'com.jfrog.bintray', version: '1.+'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Plugin Repositories (dynamic plugin versions are not supported) Open File

Solution

  • Dynamic versions were maybe authorized in the past for the plugins block (as the tutorial gives it as an example) but now it's forbidden

    if (versionSelectorScheme.parseSelector(markerVersion).isDynamic()) {
        result.notFound(SOURCE_NAME, "dynamic plugin versions are not supported");
        return;
    }
    

    But it's not the case for the old buildscript way and the below code is working fine with Gradle 4.10

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
        }
    }