I want to include enterprise.jar file of salesforce in my project at build time using gradle Could anyone help me out how to include a local jar file that exists in src/main/resources folder in my project.
Right click the module > Open module settings > Artifacts > + > JAR > from modules with dependencies. Set the main class.
Gradle declares dependencies on JAR files inside your project's module_name /libs/ directory (because Gradle reads paths relative to the build.gradle file). This declares a dependency on version 12.3 of the "app-magic" library, inside the "com.example.android" namespace group.
This is explained in the documentation. The following should do:
dependencies { compile files('./src/main/resources/enterprise.jar') }
I wouldn't put the jar in src/main/resources
though. It's not a resource of your project, but a compile dependency. I would put it in a lib directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With