nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

[Bug]: Cannot locate tasks that match ':build-logic:convention:clean'

Open ThanosFisherman opened this issue 2 years ago • 8 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is there a StackOverflow question about this issue?

  • [X] I have searched StackOverflow

What happened?

On Intellij 2023.2.5 When I try to Rebuild the project, it fails with the following error

Cannot locate tasks that match ':build-logic:convention:clean' as project 'build-logic' not found in root project 'build-logic'.

Relevant logcat output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ThanosFisherman avatar Nov 28 '23 18:11 ThanosFisherman

Hi @ThanosFisherman, checkout the Development Environment in the main README.md:

Now in Android uses the Gradle build system and can be imported directly into Android Studio (make sure you are using the latest stable version available here).

Can you reproduce the issue with this configuration?

SimonMarquis avatar Nov 28 '23 19:11 SimonMarquis

Hi @SimonMarquis, Yes I can still reproduce this error on Intellij 2023.2.5 IDE However it builds fine on the latest version of Android Studio so maybe this is a bug of intellij?

ThanosFisherman avatar Nov 28 '23 21:11 ThanosFisherman

Android projects are not really meant to be built using the default IntelliJ IDEA, but rather Android Studio. This is probably an issue with IntelliJ IDEA itself, and it will probably be discarded as such.

SimonMarquis avatar Nov 28 '23 21:11 SimonMarquis

It's not an IDE thing, It's reproducible on main in terminal using this command, looks like a gradle issue maybe?

./gradlew :core:ui:clean, :feature:settings:clean, :core:data:clean, :sync:sync-test:clean, :feature:bookmarks:clean, :feature:topic:clean, :core:analytics:clean, :core:common:clean, :feature:search:clean, :core:database:clean, :feature:foryou:clean, :core:model:clean, :core:network:clean, :core:testing:clean, :core:notifications:clean, :core:datastore-test:clean, :core:domain:clean, :core:designsystem:clean, :app:clean, :build-logic:convention:clean, :app-nia-catalog:clean, :benchmarks:clean, :lint:clean, :ui-test-hilt-manifest:clean, :sync:work:clean, :feature:interests:clean, :core:datastore:clean, :core:data-test:clean, :core:ui:assembleDemoDebug, :core:ui:assembleDemoDebugUnitTest, :core:ui:assembleDemoDebugAndroidTest, :feature:settings:assembleDemoDebug, :feature:settings:assembleDemoDebugUnitTest, :feature:settings:assembleDemoDebugAndroidTest, :core:data:assembleDemoDebug, :core:data:assembleDemoDebugUnitTest, :sync:sync-test:assembleDemoDebug, :sync:sync-test:assembleDemoDebugUnitTest, :feature:bookmarks:assembleDemoDebug, :feature:bookmarks:assembleDemoDebugUnitTest, :feature:bookmarks:assembleDemoDebugAndroidTest, :feature:topic:assembleDemoDebug, :feature:topic:assembleDemoDebugUnitTest, :feature:topic:assembleDemoDebugAndroidTest, :core:analytics:assembleDemoDebug, :core:analytics:assembleDemoDebugUnitTest, :core:common:assembleDemoDebug, :core:common:assembleDemoDebugUnitTest, :feature:search:assembleDemoDebug, :feature:search:assembleDemoDebugUnitTest, :feature:search:assembleDemoDebugAndroidTest, :core:database:assembleDemoDebug, :core:database:assembleDemoDebugUnitTest, :core:database:assembleDemoDebugAndroidTest, :feature:foryou:assembleDemoDebug, :feature:foryou:assembleDemoDebugUnitTest, :feature:foryou:assembleDemoDebugAndroidTest, :core:model:assemble, :core:model:testClasses, :core:network:assembleDemoDebug, :core:network:assembleDemoDebugUnitTest, :core:testing:assembleDemoDebug, :core:testing:assembleDemoDebugUnitTest, :core:notifications:assembleDemoDebug, :core:notifications:assembleDemoDebugUnitTest, :core:datastore-test:assembleDemoDebug, :core:datastore-test:assembleDemoDebugUnitTest, :core:domain:assembleDemoDebug, :core:domain:assembleDemoDebugUnitTest, :core:designsystem:assembleDemoDebug, :core:designsystem:assembleDemoDebugUnitTest, :core:designsystem:assembleDemoDebugAndroidTest, :app:assembleDemoDebug, :app:assembleDemoDebugUnitTest, :app:assembleDemoDebugAndroidTest, :build-logic:convention:assemble, :build-logic:convention:testClasses, :app-nia-catalog:assembleDebug, :app-nia-catalog:assembleDebugUnitTest, :app-nia-catalog:assembleDebugAndroidTest, :benchmarks:assembleDemoBenchmark, :lint:assemble, :lint:testClasses, :ui-test-hilt-manifest:assembleDemoDebug, :ui-test-hilt-manifest:assembleDemoDebugUnitTest, :sync:work:assembleDemoDebug, :sync:work:assembleDemoDebugUnitTest, :sync:work:assembleDemoDebugAndroidTest, :feature:interests:assembleDemoDebug, :feature:interests:assembleDemoDebugUnitTest, :feature:interests:assembleDemoDebugAndroidTest, :core:datastore:assembleDemoDebug, :core:datastore:assembleDemoDebugUnitTest, :core:data-test:assembleDemoDebug, :core:data-test:assembleDemoDebugUnitTest

andreiverdes avatar Dec 14 '23 15:12 andreiverdes

Obviously, if you try to run a task that does not exist, Gradle will fail. This works as expected.

SimonMarquis avatar Dec 14 '23 15:12 SimonMarquis

But the task does exist...what am I missing?

Screenshot 2023-12-14 at 17 43 45

andreiverdes avatar Dec 14 '23 15:12 andreiverdes

...wrong repo screenshot from above but it's the same project...here's the right one

Screenshot 2023-12-14 at 17 46 08

andreiverdes avatar Dec 14 '23 15:12 andreiverdes

yeah, I'm missing literally the commas 🤦‍♂️

andreiverdes avatar Dec 14 '23 16:12 andreiverdes