[DAEMON-174] jdklib: Implement options mechanism
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2017-12-01T16:45:15.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Appc Daemon 1.0.0 |
| Components | jdklib |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Ewan Harris |
| Created | 2017-11-20T18:12:43.000+0000 |
| Updated | 2017-12-01T17:06:17.000+0000 |
Description
This ticket is to implement an options mechanism similar to ioslib and androidlib.
[~cbarber] I'm not sure what would be added to jdklib here? We should mixin java.home here in [jdk-info-service](https://github.com/appcelerator/appc-daemon/blob/b39102772b8463279f33b259f45bd2958a87b02c/plugins/appcd-plugin-jdk/src/jdk-info-service.js#L24) but I'm not grasping the usefulness of overriding the executables object for a jdk?
This ticket is simply adding support for
jdk.searchPathsoption. In the core'sserver.js, we can importjava.homefrom the Ti CLI's config and copy it intojdk.searchPaths. Then in the JDK plugin, we simplyget(options, 'jdk.searchPaths')or fall back to the default ones (or whatever we do for Android, etc).Ah ok, I assumed it extended to executables too as we included them in the java import change here https://github.com/appcelerator/appc-daemon/pull/166/files#diff-955bce450ab6d9d1deaeeb4d6f5a6124R381
Ah, yeah, all of those settings need to be removed. We only need
jdk.home(String) ->jdk.searchPaths(Array.https://github.com/appcelerator/appc-daemon/pull/214