hyperdevs-team / poeditor-android-gradle-plugin

Gradle plug-in that enables importing PoEditor localized strings directly to an Android project
Apache License 2.0
51 stars 26 forks source link

invocation of 'Task.project' at execution time is unsupported #76

Open bogdanzurac opened 9 months ago

bogdanzurac commented 9 months ago

SW details (please complete the following information):

Summary and background of the bug

When running the importPoEditorStrings Gradle task, after the files are properly downloaded and saved:

Retrieving project languages...
Available languages: [en]
Retrieving translation file URL for language code: en
Downloading file from URL: https://api.poeditor.com/v2/download/file/...
Saving strings to /Users/.../Workspace/.../app/src/main/res/values

Gradle throws the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache problems found in this build.

- Task `:app:importPoEditorStrings` of type `com.hyperdevs.poeditor.gradle.tasks.ImportPoEditorStringsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

I've tested this on Gradle 8.2 and 8.5, same result. I've tested the following library versions:

adriangl commented 8 months ago

Hello! Sorry for the late reply.

Can you share your poEditor configuration? I've got a clue about why this could happen, but I'd like to verify it by checking your config if possible (no need to post API tokens nor project IDs, just the config).

bogdanzurac commented 8 months ago

There it is, apart from API token and project id:

poEditor {
    order.set("terms")
    unescapeHtmlTags.set(false)
    unquoted.set(true)
    tags.set(listOf("android", "app"))
}