I have project which has some dependencies, I am using Gradle.
I am declaring them by:
dependencies {
compile 'org.json:json:20180130'
compile 'com.test.myapi:1.0.1'
}
the com.test.myapi:1.0.1
jar has org.json inside it (Really bad deprecated thing I have..).
Now, I need to use the function JSONTokener
which has new constructor in the latest version, and I do not have it in my com.test.myapi
package.
The build successfully creating me jar and tgz as I taking distroJar, but I am getting runtime error because for some reason it takes the JSONTokener
method from the old version.
Is there any way to force the project taking org.json from the new one, or disable the org.json from the internal package?
Thanks.