Mahdi
Mahdi

Reputation: 6389

Task ‘bintrayUpload’ not found in root project after update Android studio to 3.0

Before I update gradle and android studio I used to upload my library to bintray with these tasks from this tutorial:

first: gradlew install

second: gradlew bintrayUpload

But after updating android studio and gradle I had to change fist task to: gradlew installDebug but gradle can not find taskbintrayUpload and I get this error:

* What went wrong:
Task 'bintrayUpload' not found in root project 'MyProject'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

Upvotes: 1

Views: 985

Answers (2)

Mahdi
Mahdi

Reputation: 6389

The solution was here: I had to add these lines in lib gradle.

// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

And it loads and adds bintray tasks to the gradle.

Upvotes: 0

Oguz Ozcan
Oguz Ozcan

Reputation: 1537

You need to define a bintray task in your build.gradle. Since you do not have one, gradlew cannot find and therefore execute that task. Define something like the following according to your settings and you will be fine.

apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'


bintray {
    user = ...
    key = ....
    publications = ....
    pkg {
        ...
    }
}

Upvotes: 1

Related Questions