Comments (8)
I am not proficient user of gradle, but I see, that this has to work this way.
For example: http://stackoverflow.com/a/11105927
from gradle-play-publisher.
Can you post some more lines of your build file? How do you initialize the generateReleasePlayResources
property? It must be something like
def generateReleasePlayResources = project.tasks."generateReleasePlayResources"
from gradle-play-publisher.
Thank you for quick reply.
I have tried few different way of initialisation.
For example. For code, that you posted:
def generateReleasePlayResources = project.tasks."generateReleasePlayResources"
generateReleasePlayResources.dependsOn loadStoreListing
I am getting:
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find property 'generateReleasePlayResources' on task set.
Also, if I do something like this:
def generateReleasePlayResources = project.tasks.getByName("generateReleasePlayResources")
I am getting:
> Task with name 'generateReleasePlayResources' not found in project ':app'.
So, I have a feeling, that tasks from "play" plug-ing are not visible to my script for some reason.
But at the same time this code
gradle.taskGraph.whenReady {taskGraph ->
def taskExists = taskGraph.hasTask(generateReleasePlayResources)
println "generateReleasePlayResources exists: " + taskExists
}
produces
generateReleasePlayResources exists: true
So, it's actually visible somehow.
It's looks strange for me. Anyway, if you need any additional info - feel free to ask me.
from gradle-play-publisher.
Ok, can you try the following
project.afterEvaluate {
def generateReleasePlayResources = project.tasks.getByName("generateReleasePlayResources")
generateReleasePlayResources.dependsOn loadStoreListing
}
I think the tasks aren't initialized at the time you try to access them.
from gradle-play-publisher.
Thank you a lot for this suggestion. Now all working fine when I define dependencies this way.
Btw, previously I tried to do similar thing
gradle.taskGraph.whenReady {taskGraph ->
def generateReleasePlayResources = project.tasks.getByName("generateReleasePlayResources")
generateReleasePlayResources.dependsOn loadStoreListing
}
But my code was silently doing nothing.
Looks like project.afterEvaluate
is called after Initialisation phase, while gradle.taskGraph.whenReady
is called after Configuration phase and no changes to tasks' dependencies are really happening.
Thanks a lot, that you took care of this issue so quickly.
Also, it's definitely your responsibility, but I highly suggest adding this info somewhere to first "readme.md" page. For example, to "Configuration" section or just to the end of the page.
from gradle-play-publisher.
Pull Requests are always welcome, if you want to add such section yourself.
from gradle-play-publisher.
Sounds good, I will make it today-tomorrow.
from gradle-play-publisher.
As I promised, I have added this info to readme
section (together with some more info concerning adding additional dependencies for tasks from "play" plug-in).
Here is pull request: #51
from gradle-play-publisher.
Related Issues (20)
- Can't publish wearable version of the same app HOT 1
- Consider shading Google API client dependencies HOT 2
- A gradle task for uploading native debug symbols HOT 1
- Deprecation warning about `Project.getConvention()` when run using gradle 8.2.1 HOT 7
- Wear release note is not retrieve with bootstrapListing HOT 1
- set :play:android-publisher as an API dependency HOT 1
- Conflict with 'com.google.firebase.appdistribution' plugin HOT 1
- Error: insufficient data written HOT 24
- bootstrapReleaseListing: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden" HOT 2
- Error: PKIX path building failed HOT 1
- Task installRelease not found when publishing is disabled HOT 1
- Release notes languages management HOT 6
- Release notes for 3.8.5 release? Where to find? HOT 2
- Key Signature Mismatch on CI and not Locally HOT 4
- Publish to Wear OS only? HOT 6
- Build fails on the version conflict with ResolutionStrategy.IGNORE HOT 3
- available-version-codes.txt (No such file or directory) when turned on gradle configuration cache HOT 3
- in-app update priority is always 0 HOT 1
- The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. HOT 1
- Some problems were found with the configuration of task ':app:promoteArtifact' (type 'UpdatableTrackLifecycleTask')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-play-publisher.