Gradle-play-publisher: Play extension not found

Created on 7 Jun 2019  Â·  5Comments  Â·  Source: Triple-T/gradle-play-publisher

Describe the bug

After the plugin is applied, the 'play' extension cannot be found and I instead have to configure the plugin using configure<PlayPublisherExtension> {} instead of play {}.

How To Reproduce

Apply plugin to project, sync project and then try to add 'play {}' extension block to app/build.gradle.kts.

Versions

  • Gradle Play Publisher: 2.2.1
  • Gradle Wrapper: Gradle 5.4.1
  • Android Gradle Plugin: 3.4.0

Tasks executed

No tasks executed

Expected behavior

The play extension block works.

Additional context (if a crash, provide stack trace)

Using Kotlin Gradle DSL.

bug

All 5 comments

That's because you're using apply(plugin = foo) instead of plugins { id(foo) }.

That's because you're using apply(plugin = foo) instead of plugins { id(foo) }.

Okay thank you. I had to use apply(plugin = foo) syntax in order to only apply the plugin conditionally if the Play credentials file was present. Thought I saw examples that did this using apply plugin syntax and then still used the 'play' extension so thought I should be able to.

Thank you very much for the explanation @SUPERCILEX.

Don't do that. Use play { isEnabled = file("cred.json").exists() }.

Even better, thank you very much. Sorry for wasting your time with my
issue. Appreciate the help.

On Fri, 7 Jun 2019, 17:14 Alex Saveau, notifications@github.com wrote:

Don't do that. Use play { isEnabled = file("cred.json").exists() }.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Triple-T/gradle-play-publisher/issues/584?email_source=notifications&email_token=ACWLLE7SSRRSM2RZPO24ZQ3PZKCPZA5CNFSM4HVXYG4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXGJMDY#issuecomment-499947023,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWLLEYLU4FOW5KZQKHQTRTPZKCPZANCNFSM4HVXYG4A
.

Lol, no worries. 😊

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhelanov picture zhelanov  Â·  6Comments

aat-antoine picture aat-antoine  Â·  6Comments

MaTriXy picture MaTriXy  Â·  4Comments

daniele-pecora picture daniele-pecora  Â·  5Comments

blazsolar picture blazsolar  Â·  3Comments