0

I migrated my project from buildSrc to build-logic with conversion plugins. All plugins work good but I also have a Gradle task that downloads localizations from 3rd party service and stores its to the res/values folder from different modules. The problem is that this task is registered in the root of the project (room build.gradle.kts) but its class is not visible from the build-logic directory. I tried to move it to different places but it did not help. How can I make it visible or register it as a conversion plugin but for the root project, not submodules?

Update: build-logic is a folder that defines project-specific convention plugins. As an example I use the nowinandroid app https://github.com/android/nowinandroid/tree/main/build-logic

3
  • What is build-logic? An included build? Why can't you move your class to the build-logic directory? Because it is also used by the main program? Commented Mar 20, 2024 at 20:48
  • build-logic is a folder that defines project-specific convention plugins. As an example, I use the nowinandroid app github.com/android/nowinandroid/tree/main/build-logic. I moved it but then it does not visible from root build.gradle.kts. As I understand the conversion plugin includes common rules for each module and prevents its duplication but I have to get a grade task for the whole application. Commented Mar 20, 2024 at 22:16
  • Ok great: you have an included build. Well you can move your task and its class into build-logic, register that task inside a new plugin written in build-logic, publish the plugin like your other plugins in build-logic, then apply the new plugin in your root build.gradle Commented Mar 20, 2024 at 22:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.