bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 194 forks source link

Issue with bintray-gradle-plugin 1.7 #132

Open vivekkiran opened 8 years ago

vivekkiran commented 8 years ago

(class: org/apache/maven/project/MavenProject, method: getSnapshotArtifactRepository signature: ()Lorg/apache/maven/artifact/repository/ArtifactRepository;) Incompatible argument to function

eyalbe4 commented 8 years ago

@vivekkiran, How can we reproduce this issue? Does this happen with a specific gradle or JDK versions? To troubleshoot the issue, you can try running the project-examples

TakWolf commented 8 years ago

@eyalbe4

Hi, I have the same problem.

:fragmentswitcher:install                 
:fragmentswitcher:bintrayUpload FAILED          

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fragmentswitcher:bintrayUpload'.
> (class: org/apache/maven/project/MavenProject, method: getSnapshotArtifactRepository signature: ()Lorg/apache/maven/artifact/repository/ArtifactRepository;) Incompatible argument to function

My environments:

I use the scripts in this https://github.com/TakWolf/JCenter-Publish-Script

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        ......
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
        ......
    }
}

ext {
    bintrayRepo = 'maven'
    bintrayName = 'MyRepository'

    siteUrl = 'https://github.com/TakWolf/MyRepository'
    gitUrl = 'https://github.com/TakWolf/MyRepository.git'

    groupId = 'com.takwolf'
    artifactId = 'myrepository'

    libraryVersion = '0.0.1'
    libraryName = 'MyRepository'
    libraryDescription = 'This is my repository.'

    developerId = 'TakWolf'
    developerName = 'TakWolf'
    developerEmail = 'takwolf@foxmail.com'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}
......
apply from: 'https://raw.githubusercontent.com/TakWolf/JCenter-Publish-Script/master/install.gradle'
apply from: 'https://raw.githubusercontent.com/TakWolf/JCenter-Publish-Script/master/bintray.gradle'

It work well for classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5' But for 1.6 (1.7 and 1.7.1), i have the error.

dcendents commented 8 years ago

I believe the problem is the android-maven plugin and the bintray plugin have a dependency on different versions of maven-core.

I released version 1.4.1 of android-maven without a dependency on maven-core (compileOnly so not transitive anymore) which should fix the problem.

Sorry for the inconvenience

eyalbe4 commented 8 years ago

Thanks for this @dcendents! Please me know in case we need make changes to the gradle-bintray-plugin.