My goal is add possibility to invoke part of Kotlin code as standalone executable in PC, without android dependencies. Currently I have done this via creating another project in child folder with custom gradle script and symlinks to reused classes. But I lack code completion in Android studio, and symlinks will not be work on Windows, as I know. I not want to create jar library and use it both in android and standalone project, because in that case I will have to manually update that library for each update. Maybe, there are some another way?
Asked
Active
Viewed 83 times
0
-
https://developer.android.com/studio/projects/android-library.html – leonardkraemer Apr 18 '18 at 15:05
-
Use `JavaScript libraries`, it works on both PC, Android, iOS ... – Jon Goodwin Apr 18 '18 at 15:05
-
@leoderprofi android library cannot be used in regular Java app, isn't it right? – wingear Apr 18 '18 at 19:45
-
you have to use `apply plugin: 'java-library'` than gradle creates a normal .jar file – leonardkraemer Apr 18 '18 at 19:59
-
@leoderprofi and I will able to use that project as dependency for other? Because, if it just creates .jar file, I will have to manual update it in both android and standalone projects – wingear Apr 18 '18 at 20:35
-
1Your question is somewhat vague, so the answer is generic: yes gradle can handle it. e.g. https://stackoverflow.com/questions/19299316/require-gradle-project-from-another-directory – leonardkraemer Apr 18 '18 at 20:56