Skip to content

Commit

Permalink
#1121 Workaround for colon track names
Browse files Browse the repository at this point in the history
Gradle has an [issue](gradle/gradle#862) that `DirectoryProperties.file()` does always resolve file names with colon (`:`) as URI. This breaks when a colon is used as part of a file name.

In this case this is needed for the dedicated PlayStore tracks: tv and wear. They require a corresponding prefix separated by a colon, e.g. "tv:internal". See: developers.google.com/android-publisher/tracks#ff-track-name

Resolving the file paths without `DirectoryProperty.file` does work around this Gradle issue on Plugin side.
  • Loading branch information
SebastianHeil authored and SUPERCILEX committed Mar 8, 2024
1 parent f737033 commit 77263a0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ internal abstract class PublishArtifactWorkerBase<T : PublishArtifactWorkerBase.
return if (config.releaseName != null) {
config.releaseName
} else if (parameters.consoleNamesDir.isPresent) {
val dir = parameters.consoleNamesDir.get()
val file = dir.file("$track.txt").asFile.orNull()
?: dir.file(RELEASE_NAMES_DEFAULT_NAME).asFile.orNull()
val dir = parameters.consoleNamesDir.get().asFile
val file = File(dir, "$track.txt").orNull()
?: File(dir, RELEASE_NAMES_DEFAULT_NAME).orNull()

file?.readProcessed()?.lines()?.firstOrNull()
} else {
Expand Down

0 comments on commit 77263a0

Please sign in to comment.