Only build static library

I am trying to not allow for the creation of the shared library. I followed How can I prevent shared lib building in Gradle? I only want static libs and it worked fine for removing the actual creation of the shared library BUT if you do a “gradle tasks” the task for building a shared library still shows up - how can I completely remove this task?

I am using 4.4.1 and am new to gradle (and build scripts in general). Thanks for your help!

I believe there is no way to do what you ask. Tasks are inserted in the task graph and removing them is not an easy thing to do. It is not just one task either that you would need to remove. There are several related tasks that need removing which you can see with gradle tasks --all