Issue
I have a library with different dependencies, and I want to exclude/ignore all data source dependencies when I introduce this library in my API.
I know that I can easily ignore dependencies in my API by using exclude:
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
But how do I do that on the "Gradle" level, how do I do that in my library before building the JAR file and before using it in my API?
Solution
The best approach for me was to use:
compileOnly 'org.example'
testImplementation 'org.example'
Answered By - noob234
Answer Checked By - Mildred Charles (JavaFixing Admin)