5

After i have updated android studio to 3.4.2 and gradle, when i run this line

gradlew publishApkappNameRelease 

im getting this error :

* What went wrong: Some problems were found with the configuration of task ':app:generateappNameReleasePlayResources'.
> File 'E:\Projects\packagename\app\src\main\play' specified for property '$1' does not exist.
> File 'E:\Projects\packagename\app\src\appName\play' specified for property '$2' does not exist.
> File 'E:\Projects\packagename\app\src\release\play' specified for property '$3' does not exist.
> File 'E:\Projects\packagename\app\src\appNameRelease\play' specified for property '$4' does not exist.

* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 47s 56 actionable tasks: 55 executed, 1 from cache

note: this line is used to auto publish apk using

apply plugin: 'com.github.triplet.play'
classpath 'com.github.triplet.gradle:play-publisher:1.1.5'

same when i run this command line gradlew --recompile-scripts i get error

Unknown command-line option '--recompile-scripts'

These commands were running fine before the updates.

UPDATE:

when i try to update the triplet.play to any of t hose versions (2.2.1 - 2.2.0 - 2.1.1 - 2.1.0 - 2.0.0 - 2.0.0-rc2) i get this error

Could not find com.github.triplet.gradle:play-publisher:2.2.1.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://dl.google.com/dl/android/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
  - https://jcenter.bintray.com/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://jcenter.bintray.com/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
  - https://repo.maven.apache.org/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://repo.maven.apache.org/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
Required by:
    project :
SUPERCILEX
  • 3,929
  • 4
  • 32
  • 61
Hossam Hassan
  • 795
  • 2
  • 13
  • 39

2 Answers2

1

Apparently this can be fixed by upgrading the version of the play-publisher plugin from 1.1.5 to 2.1.1 as per the GitHub issue here: https://github.com/Triple-T/gradle-play-publisher/issues/532

However, it seems that the newer versions of the plugin aren't available on all artifact repositories. I found it here which has clear steps of doing it: https://plugins.gradle.org/plugin/com.github.triplet.play

Lastly it is advised that you check their GitHub page again to make sure that the config you currently have is still compatible: https://github.com/Triple-T/gradle-play-publisher

With regards to gradlew --recompile-scripts, this has been deprecated and removed in the new version since most of the times the gradle daemon is running and ignores this option. More info here: https://github.com/gradle/gradle/issues/1425

ahasbini
  • 6,761
  • 2
  • 29
  • 45
  • when i try to change the version it says it cant find it – Hossam Hassan Jul 14 '19 at 19:41
  • 1
    Could you post the complete `build.gradle` file(s)? – ahasbini Jul 14 '19 at 19:46
  • 1
    my build gradle is big but the relative things in it are : apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' //apply plugin: 'com.amazonaws.appsync' apply plugin: 'com.github.triplet.play' and i have updated my question with error i get with newer version – Hossam Hassan Jul 15 '19 at 09:27
  • The solution was to change play-publisher to version 1.1.5 and in gradle-wrapper.properties change distributionUrl version to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip and now its working fine – Hossam Hassan Jul 15 '19 at 09:41
0

First, add a new repo to your repositories on build.gradle (Project)

repositories {
            maven { url 'https://plugins.gradle.org/m2/' }
        }

Now , upgrade your classpath.
classpath 'com.github.triplet.gradle:play-publisher:2.1.1'

Amjad Alwareh
  • 2,926
  • 22
  • 27