Code Monkey home page Code Monkey logo

Comments (15)

avalanchas avatar avalanchas commented on June 13, 2024 4

Thanks @positive-infinity, can confirm, this is the minimal working example as of version 3.8.4 of this plugin:

play {
    track.set("wear:$yourTrackName")
    releaseName.set("$yourVersionName")
}
play {
    track.set("automotive:$yourTrackName")
    releaseName.set("$yourVersionName")
}

from gradle-play-publisher.

positive-infinity avatar positive-infinity commented on June 13, 2024 2

I think the problem is that GPP tries to generate and/or read from files which are named by the track name (e.g. File(locale, "$track.txt")). In case of track names with prefix (i.e. wear:production) this name contains the char ":" which is invalid for file names (at least on Windows).
This is why it works if you set the release name explicitely by usage of releaseName.set("XXX") and only use default release notes. In this case, the track name file are not needed (not read at all or a fallback in case of failure exists).

from gradle-play-publisher.

JBassett avatar JBassett commented on June 13, 2024 1

Are there any workarounds other than manually deploying?

from gradle-play-publisher.

markchristopherng avatar markchristopherng commented on June 13, 2024 1

Hi, we also require this for our wear app where Google requires all wear apps to be on a seperate track by end of August 2023

https://support.google.com/googleplay/android-developer/answer/13295490?hl=en

from gradle-play-publisher.

sorinirimies avatar sorinirimies commented on June 13, 2024

We have a wear app and since Google has started enforcing form factor publishing we can't use properly this plugin.
A form factor option would really be great.

from gradle-play-publisher.

crysxd avatar crysxd commented on June 13, 2024

Is there any workaround? We are kinda slowly approaching the deadline. I assume we need to enable the form factor track and then publish the wear app manually?

from gradle-play-publisher.

adrianolc avatar adrianolc commented on June 13, 2024

We're running into the same problem now. Is there any update on when it will be supported or any workaround to solve the issue?

from gradle-play-publisher.

SUPERCILEX avatar SUPERCILEX commented on June 13, 2024

I'm not involved with the project anymore, but I still do PR reviews if people want to fix this.

from gradle-play-publisher.

damiafuentes avatar damiafuentes commented on June 13, 2024

We're facing the same issue.

from gradle-play-publisher.

crysxd avatar crysxd commented on June 13, 2024

I looked at this problem again as it has to be solved soon and now it seems to all work for me as expected.

What I did:

  • Create the Wear track in Google Play, this was offered to me in a banner in the Release overview in the Google Play Console
  • Update my wear gradle config
play {
    serviceAccountCredentials.set(project.rootProject.ext.play_credentials)
    track.set("wear:" + project.findProperty("play.track"))
    defaultToAppBundles.set(true)
    if (project.rootProject.ext.play_release_fraction >= 1d) {
        releaseStatus.set(com.github.triplet.gradle.androidpublisher.ReleaseStatus.COMPLETED)
    } else {
        releaseStatus.set(com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS)
    }
    updatePriority.set(project.rootProject.ext.play_update_priority)
    userFraction.set(project.rootProject.ext.play_release_fraction)
    releaseName.set(project.rootProject.ext.version_name)
}
  • For reference, my phone gradle config:
play {
    serviceAccountCredentials.set(project.rootProject.ext.play_credentials)
    track.set(project.findProperty("play.track"))
    defaultToAppBundles.set(true)
    if (project.rootProject.ext.play_release_fraction >= 1d) {
        releaseStatus.set(com.github.triplet.gradle.androidpublisher.ReleaseStatus.COMPLETED)
    } else {
        releaseStatus.set(com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS)
    }
    updatePriority.set(project.rootProject.ext.play_update_priority)
    userFraction.set(project.rootProject.ext.play_release_fraction)
    releaseName.set(project.rootProject.ext.version_name)
}
  • I then uploaded a new build to the closed beta with ./gradlew :app-wear:publishReleaseBundle -Pplay.track=closed-beta -Pplay.fraction=1.0 (Make sure "Closed Beta" is set up for the wear form factor)

from gradle-play-publisher.

damiafuentes avatar damiafuentes commented on June 13, 2024

Hey @crysxd , thanks for your input. I can't manage to make it work still. This is what we currently have, which seems to replicate your behavior above by adding wear: to the track:

build.gradle project level

buildscript {
    ...
    dependencies {
        ...
        classpath 'com.github.triplet.gradle:play-publisher:3.8.4'
    }
}

build.gradle mobile app level

apply plugin: 'com.github.triplet.play'

...

play {
    track = "internal"
    serviceAccountCredentials = file(GOOGLE_ACCOUNT_SERVICE_FILE)
    // Commit this build separately from the wear build.
    commit = true
}

build.gradle wear app level

apply plugin: 'com.github.triplet.play'

...

play {
    track = "wear:internal"
    serviceAccountCredentials = file(GOOGLE_ACCOUNT_SERVICE_FILE)
    // Commit this build separately from the mobile build.
    commit = true
}

However, I'm receiving the following error:

Screenshot 2023-08-09 at 2 15 29 PM

What am I missing?

from gradle-play-publisher.

damiafuentes avatar damiafuentes commented on June 13, 2024

Which version are you using?

from gradle-play-publisher.

crysxd avatar crysxd commented on June 13, 2024

3.7.0

from gradle-play-publisher.

damiafuentes avatar damiafuentes commented on June 13, 2024

Found it, had to remove the commit = true line. Thank you!

from gradle-play-publisher.

positive-infinity avatar positive-infinity commented on June 13, 2024

I am also facing this issue and I am still getting the "Cannot convert URL 'wear:production.txt' to a file." error, no matter if I remove commit property entirely or set it to true or false. @damiafuentes: Did you change anything else?, @crysxd: Which OS are you on? Maybe this is a Linux / Windows issue? I am on Windows.

from gradle-play-publisher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.