I created a jar Library(i.e. without main class) of gradle project using the below steps Files -> Project Structure -> Artifacts -> + -> jar -> From modules with dependencies -> all modules -> extract to a target jar -> Ok -> Build -> Build Artifacts.
Is this the correct way to build a jar without the main class? because I'm getting errors when I try to import it into another Gradle project. Suppose jar file name is test.jar
I added jar into src/libs/test.jar
In build.gradle dependencies I added implementation fileTree(dir: 'libs', include: ['*.jar'])
Right click on test.jar -> add to library -> module test
Files -> Project Structure -> modules -> dependencies -> + -> test.jar -> Ok
Still getting class not found error and can't find symbol error