I have a Cordova project, and I am building a android plugin for it. My plugin then uses a library that uses the diamond operation (<>). I tried to run it but I receive t
Okay, what worked for me was adding all the sub-projects(libraries) that you plugin uses as main-libraries of yout cordova project.
Here what I did: Copy all the libraries to libs, go to eclipse>build path>order and export>Mark everything. After that, you have to create a build-extras.gradle file on your root/platforms/android folder. Put this code on your file:
ext.postBuildExtras = {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
allprojects {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}
}
}
Keeping referencing in the subprojects, though. You have to make the reference from the project and the subproject (not sure why, but worked.).