Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26944] Inconsistent Android SDK/NDK and JDK detection logic

GitHub Issuen/a
TypeStory
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.0.0
Fix Version/sn/a
ComponentsAndroid, CLI, Tooling
Labels2019-cl, cb-tooling
ReporterChristopher Williams
AssigneeChris Barber
Created2019-03-27T19:55:03.000+0000
Updated2019-04-11T16:19:34.000+0000

Description

This is an internal development and architecture issue. We have 3 separate "codebases" around detecting the Android SDK/NDK and the JDK/JAVA_HOME. For developers building our SDK, we have some logic I wrote up in our "scons" scripts: https://github.com/appcelerator/titanium_mobile/tree/master/build/lib/android For SDK users (Titanium/Appc CLI) we delegate to node-titanium-sdk: https://github.com/appcelerator/node-titanium-sdk/blob/master/lib/android.js Which also delegates the jdk/Java stuff to node-apps: https://github.com/appcelerator/node-appc/blob/master/lib/jdk.js And for the Daemon, it uses androidlib and jdklib: - https://github.com/appcelerator/androidlib/tree/master/src - https://github.com/appcelerator/jdklib/tree/master/src (And although not explicit, it really also uses https://github.com/appcelerator/appcd-plugin-jdk/blob/master/src/jdk-info-service.js to scan Windows registry, etc) We should not keep re-inventing the wheel repeatedly here. We should be re-using the same logic to detect these pieces regardless of whether we are building the SDK, using the SDK or using the daemon.

Comments

  1. Chris Barber 2019-04-11

    androidlib and jdklib exist to replace the jdk logic in node-appc and android logic in node-titanium-sdk. I don't believe we should invest in updating the existing tooling to use androidlib/jdklib. Instead, spend that time getting the new toolchain out the door, which everyday we're getting closer to doing. This ticket has no direct actionable item and will be indirectly resolved when the new Titanium CLI ships.

JSON Source