Comments (8)
I find when I set track to ${track}
that non-publish tasks like assemble now fail if I don't specify org.gradle.project.track.
./gradlew assembleDevDebug
...
* What went wrong:
A problem occurred evaluating root project 'nextdoor'.
> Track has to be one of 'alpha', 'beta', 'rollout' or 'production'.
Is this the expected behaviour? Does this mean that I need to add -Dorg.gradle.project.track=alpha
to every invocation of Gradle for this project? Is there a way to specify a default?
from gradle-play-publisher.
Another solution would be to use a property for the track
play {
// ...
track = "${track}"
}
and then define your CI server to run the publish task with an additional argument:
./gradlew publishApkRelease -Dorg.gradle.project.track=alpha
Jenkins for example does that automatically if you are using parameterized builds along with the gradle build step.
Does that help you?
from gradle-play-publisher.
@bhurling Yep, that works. Thank you so much!
from gradle-play-publisher.
If you use properties in your build script you have to provide them externally. But you can set defaults in your gradle.properties
:
track=alpha
-Dorg.gradle.project.track
overrides the values in the gradle.properties
(see here).
from gradle-play-publisher.
That works great. Thanks! It might be worth mentioning that trick in the docs.
from gradle-play-publisher.
Add it to docs PLEASE.
from gradle-play-publisher.
For some reason, using
play {
track = "${track}"
}
always pushed to alpha even if I set the default to internal
in gradle.properties
and passed in the -Dorg.gradle.project.track=internal
parameter...
Changing the syntax to the following
play {
track = project.properties['track']
}
worked for me.
I'm a bit confused about this since "${track}"
seems like valid syntax, and if I test it in other places in the build.gradle
file, it works as intended. Also, if the syntax isn't working and is thus creating a null or empty string, I thought that Gradle Play Publisher would complain that the specified track isn't in the accepted list and fail instead of defaulting to Alpha, which seems to be what's happening.
from gradle-play-publisher.
Worked for me, as long as you default the track i.e. track = internal in your gradle.properties you can refer to it in your build.gradle as
play { track = project.properties['track'] }
and then in your CI you can override e.g
./gradlew publishApkRelease -Dorg.gradle.project.track=alpha
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.