clojure-android / neko

The Clojure/Android Toolkit
Other
297 stars 36 forks source link

How do you build neko? #19

Closed alexander-yakushev closed 10 years ago

alexander-yakushev commented 10 years ago

Issue by osbert from Tuesday Jul 09, 2013 at 22:38 GMT Originally opened as https://github.com/clojure-android/neko/issues/3


I'd like to deploy my own releases/snapshots to clojars to be able to make my own changes to neko and/or experiment with neko.ui.menu given that 3.0.0-SNAPSHOT is currently a bit old, but can't seem to find any documentation on how to build a neko jar suitable for deployment to clojars. I've tried:

lein jar - Fails because it cannot find symbols like android.view.View, android.widget.BaseAdapter when trying to compile InterchangeableListAdapter.java.

ant -Dsdk.dir=$ANDROID_HOME release - This seems to call into the android build system which also fails due to the error message, "Unable to resolve project target 'android-7'.

Please advise. Thanks.

alexander-yakushev commented 10 years ago

Comment by alexander-yakushev from Wednesday Jul 10, 2013 at 07:11 GMT


Hello Osbert,

It is lein droid jar used to build neko. Sorry for not pointing it out anywhere.

alexander-yakushev commented 10 years ago

Comment by osbert from Wednesday Jul 10, 2013 at 20:30 GMT


Thanks, but on a fresh neko alex/master lein droid jar fails with the same errors as lein jar, due to being unable to find android.* packages. I'm running lein-droid 0.1.0-preview5 (I think I've also tried clojure-android/lein-droid/master).

I am able to run lein droid doall from an independent project and everything works, and have in my user profile a proper :android :sdk-path value, so I'm kind of confused. Any additional help or insight you can provide would be very helpful.

Thanks.

alexander-yakushev commented 10 years ago

Comment by alexander-yakushev from Thursday Jul 11, 2013 at 09:54 GMT


Hello Osbert,

Sorry for the late reply, I just got home. That is really strange that lein droid jar can't find android packages. Are you sure there is no faulty :android/:sdk-path record in neko's project clj?

Anyways it would be a bit easier if you provide me with output of DEBUG=1 lein droid jar.

Or last minute guess. Check if you have the exact version of SDK installed as specified in :target-version in neko's project clj. Or you can compile it against different SDK version, it doesn't really matter.

alexander-yakushev commented 10 years ago

Comment by osbert from Thursday Jul 11, 2013 at 17:29 GMT


Thanks, your guess was right on. neko's project.clj has :target-sdk 15, I changed this line to be :target-version "17", since that's the newest and only one I had installed. lein droid jar then worked as expected. When experimenting with this, I sometimes had to run lein clean to get it to break/work again. I've submitted a separate pull request to update the README accordingly.

Do you think the project.clj file should have :target-version "17" in it since that's the current SDK version and also what lein-droid recommends having? If so I can submit a separate patch for that, just let me know. I'm rather conflicted as to what the value should be. Thanks.

alexander-yakushev commented 10 years ago

Comment by alexander-yakushev from Thursday Jul 11, 2013 at 20:36 GMT


I'm glad it was sorted out.

Thank you for the info on building neko. I decided to drop some legacy information from the README and emphasize more on usage in conjunction with lein-droid (since it is now the only way to use Neko). Also I incorporated your paragraph into README as well (with some minor rewording if you don't mind).

Can we close the issue and the PR now, or is there more to this topic?