Comments (11)
My fork has working DSL (see example in PlayPublisherPluginTest.groovy). It does require change to the config but I've been using this in production for a month now with 89 flavors spread over 6 different play-accounts.
from gradle-play-publisher.
@tunjid excellent, thank you! Already hacked together a working version but useful nonetheless.
from gradle-play-publisher.
Available in 1.2.0-beta3
from gradle-play-publisher.
Ended up using jvm variables similar to the workaround in #65
Would still be nice to know what the collaborators opinion is on having this per signing config.
from gradle-play-publisher.
I thought of something similar to Android's signingConfigs. So one can define one or more playSigninigConfigs
and then use it inside of the build flavour block. I think we would have to extend their DSL to do something like that. Is that even possible?
from gradle-play-publisher.
I've sort of worked around this issue myself in a different way. I too have one project with many flavors that go to different Google Play accounts.
What I've done, is in my build.gradle file, specify signingConfigs for each dev account (even if the keystore info is the same) for each flavor config.
I created some property files based on the signingConfig name with the dev service account info in it, and dropped them into the module root directory.
Then in 'PlayPublishApkTask.groovy', I added the following to the publishApk() function:
@TaskAction
publishApk() {
def signingConfigName = variant.signingConfig.name;
def propertiesFileName = "${signingConfigName}.play.properties"
File propFile = new File(propertiesFileName.toString());
if (propFile.exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(propFile))
extension.serviceAccountEmail = properties['serviceAccountEmail']
extension.pk12File = new File(properties['pk12File'])
}
super.publish()
...
}
This gives the result of the correct dev service account info feeding in, if available, else it'll use the standard 'play' closure configuration in build.gradle.
Not worrying about having to switch service account information when submitting app updates was my main goal. It's a bit messy and requires some extra setup, but working with limited Android DSL property availability, this was an alternative solution I came to.
from gradle-play-publisher.
Hi @mattxander12 . Your solution sounds like a better option. Do you mind sharing a repo with all the needed directories/files ? Thanks
from gradle-play-publisher.
Hello,
At this point I still can't use multiple service accounts with this plugin out-of-the-box, even when I compile the branch playSigningConfigs. I suppose it's because this branch is still a WIP and everything's not ready yet?
Anyway, do you have an ETA for this feature? Thank you
from gradle-play-publisher.
You're right. This is not really satisfying, I completely understand. But I'm kind of stuck right now and could use some help or a least a hint what I am doing wrong here.
I added a failing test to show what I am aiming at. My goal is to extend the DSL with the concept of playAccountConfigs
similar to sigingConfigs
. I managed to add this property to the com.android.build.gradle.AppExtension
but now I can't reference it from within a flavor.
Can anyone shed some light on this issue?
from gradle-play-publisher.
As per Googles recommendation we've started putting our customers apps (basically a flavor) on different accounts so this is something that is badly needed (that or Google fixing so you can use a service account for other Play-accounts that you have access-rights to...)
I stumbled across this when I was looking for a solution:
http://stackoverflow.com/questions/30772201/google-services-json-for-different-productflavors
So basically nothing in the build.gradle but instead the json-file in the flavor directory (configuration by location kind of thing). Doesn't really feel like the prettiest solution but feels like it should be easy to implement (might take a stab at it, had a go at the DSL solution but couldn't get my head around it).
Wouldn't solve things like track / uploadImages per flavour of course.
from gradle-play-publisher.
@brp-david I have a repo forked off this with that functionality built in: https://github.com/tunjid/gradle_play_publisher/commits/develop
from gradle-play-publisher.
Related Issues (20)
- 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')
- PublishBundle$Processor fails with SunCertPathBuilderException HOT 1
- Workaround colon track names
- Ok
- ResolutionStrategy.AUTO: appears not to respect track HOT 1
- Add support for sentry crash reporting plugin
- When running `bootstrapListing` get crash for `getSubscriptions()` HOT 3
- http://play.google.com/store/apps/details?id=com.vdp.vid.points
- Release v3.10.1 is missing from releases dashboard HOT 1
- publish 2 modules (app and tv) to the same test track HOT 3
- Add support for Managed Publishing HOT 3
- Support for Chromebook Screenshots HOT 1
- Snapshot builds are not working because Sonatype repository gives 504
- Enabling AUTO version bump causes exception in gradle HOT 3
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.