I have a project I'm working on in which we will eventually plan to open source portions of the project. Part of the project involves some IP that we don't want to open source. I would end up having two "packages" as part of the overall project
package Open
- This is the open source portionspackage IP
- This is the closed source portions, and customers would pay to get this
Ideally I'd like to do something similar to the following
package Open
class MyOpenClass (val hasIP: Boolean = false){
if(hasIP){
import IP
//do stuff with IP
} else {
//do stuff without IP
}
}
This doesn't seem to work as IP
is not found at compile time. I guess it's possible I could create a dummy IP
package to be included with the Open
project. That is a possibility, however I wanted to see if there was something I'm missing that can resolve this without the need of blackbox packages.